Jump to content

Recommended Posts

Posted

I'm really struggling to get chromium to work correctly with hardware acceleration.

1) I have custom kernel image from master branch last week. Which maybe could cause some issues?

2) I added the two repos (panfork and mesa) 

sudo add-apt-repository ppa:liujianfeng1994/panfork-mesa
sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia

3) I've ran all the updates

4) I installed ubuntu desktop to enable Wayland which is working nicely

5) I've added the HDMI audio output

6) My default chromium configuration does already have the egl enabled. When I start Chromium, I get the following errors

 

39610:39643:0125/091804.694008:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal
/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[39610:39643:0125/091804.694207:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[39655:39655:0125/091804.826811:ERROR:gpu_init.cc(537)] Passthrough is not supported, GL is egl, ANGLE is
[39655:39655:0125/091804.829891:ERROR:gl_display.cc(508)] EGL Driver message (Error) eglQueryDeviceAttribEXT: eglQueryDeviceAttribEXT
[39655:39655:0125/091804.830069:ERROR:gl_angle_util_vulkan.cc(189)] Failed to retrieve vkGetInstanceProcAddr
[39655:39655:0125/091804.830187:ERROR:vulkan_instance.cc(91)] Failed to get vkGetInstanceProcAddr pointer from ANGLE.
[39655:39655:0125/091807.500915:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[39655:39655:0125/091809.004733:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[39655:39655:0125/091829.513030:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

 

I cannot figure out the "Passthrough" error. Sounds like egl should be enabled... What am I missing?

 

libva error - this is usually because there is no LIB_VA - but from what I've seen there is no lib va available for Orange PI 5. Correct or am I missing something?

 

 

Posted

There is a lot more you have to do, did you follow the instructions from both ppas? You need to download the mail firmware and rockchip compatible versions of chromium-browser, chromium-codecs-ffmpeg-extra, libv4l-rkmpp, v4l-util. You also need set up some udev rules etc.

Posted
6 minutes ago, svoboda77 said:

There is a lot more you have to do, did you follow the instructions from both ppas? You need to download the mail firmware and rockchip compatible versions of chromium-browser, chromium-codecs-ffmpeg-extra, libv4l-rkmpp, v4l-util. You also need set up some udev rules etc.

Forgot to mention these - I have all of that as well. I have all package from both ppas installed.

Posted (edited)

Did you do a --dist-upgrade? Because then all the panfork drivers will be overwritten (heard from a friend🙄)

You could download them here manually: 

https://launchpad.net/~liujianfeng1994/+archive/ubuntu/panfork-mesa/+sourcepub/14203345/+listing-archive-extra

 

https://launchpad.net/~liujianfeng1994/+archive/ubuntu/rockchip-multimedia/+packages

 

Or shall they not install either when you've upgraded before?

You could force install/reinstall them

 

Edit: Strange, I do have the same now when I play videos in youtube, before I could play 8k videos with around 1/8 cpu load, now it doesn't. Maybe a part (Mesa?) gets overwritten by a kernel update?

 

Update: I had evidently updated chromium-browser and the chromium-ffmpeg plugin, reinstalled and it's working again (low cpu usage @4k video). Except for 8k youtube videos, not that I need that, although I'm convinced that it did work. Easy way to reinstall is download all the debs in one folder: sudo apt install ./*     or when apt is whining about an impossible situation or something with dpkg -i * 

Edited by royk
Same problem - now solved
Posted

I might have this one figured out... @royk do you mind confirming *which* tool you used to monitor the CPU when you play videos in Chromium?

One thing I just realized is that every linux tool has a different opinion - I've been using the antique top tool but that one is only scaled to *one* core (aka CPU utilization can reach 400%) where as other system tools do account for cores... So the whole time - my videos have been consuming only 30% of one core. Even my 4k test video does 30% of one core - no matter which player I use... So either the hardware encoding is working or this board is insanely fast (both are possible). 

 

 

Posted

I also use top, that's why I said that I usually had a 1/8 cpu load while play yt videos. Coincidentally when I went to check it I had a cpu load of around 600, as it is an octa core, it could theoretically go up to 800. After reinstalling some of the packages it is back to 100% aka 1/8 cpu load. At least you've found a nice way to prevent it from upgrading the panfrost stuff😄

Posted

I use "htop" it shows each core separately and is a more modern view than top. Though if you really want to see it all then prometheus + node-exporter + grafana

Posted

after following all the instructions, u do get hw accel except with hw video decode missing. it lists hw decode in chrome://gpu but it maxes the cpu at 4k youtube. it can only do 1440p on youtube with cpu nearing max so its clear hw decode isnt working. on the official debian build, it has hw decode and it can do 4k youtube with barely any drops using 10-20% cpu, unfortunately, the official debian doesnt have hw accel besides the video decode so things get sluggish elsewhere.

Posted

Did you got the official Debian build work on the OPI 5 or do you mean the vendor provided one? As you could see it does work by different other people. With Armbian I've got a smooth ui and around 20% cpu load while playing 4k yt videos. 

Check these topics, make sure you're using Wayland: echo $XDG_SESSION_TYPE

 

 

 

Posted

I did  the "Orange Pi 5 Kodi ..." and Kodi working fine with a satellite TV PVR (low CPU usage, thus using hardware acceleration).

However Chromium is sluggish, even by scrolling normal web pages with no video!

I use the lasted "Armbian jammy" from the 23 January, and chromium comes already installed on it.

 

I have not done anything else special for the chromium configuration, do I need something?

 

Any idea what could be wrong?

Posted

Do you guys know how reliable the chrome://gpu is? Mine says that hardware video decoding is enabled - I don't get the great 14% cpu usage that @royk gets but the machine plays 4k videos without any hickup with ~ 60% cpu which is imo already fast. 

Posted

@Tony3 It should be that you are running under X11. I had the same problem for 2 days turning around and finally followed @royk proposition :

 echo $XDG_SESSION_TYPE

If result is not Wayland then logout  and choose Gnome with Wayland.

Then everything will be OK.

 

Posted

@OttawaHacker Do you mean 60% of 100 or the 60% from "top". Just checked and still about 15-20% with 2 cpus isolated (some testing with LinuxCNC). Then I resized the window, switched to another window and back and the cpu load stayed at 60% for a while, then had to reload and cpu load was as low as normal again. Perhaps an accelerator crashed at that moment?

You could compare your report with mine, I had installed the Vulkan driver which Chromium seems to use, not sure if that's getting installed automatically witch the ppa?

gpu-report-chromium.txt

Posted

After updating the chromium-browser and gpu drivers I'd also a high cpu usage. After searching for way too long I realized that chromium-browser was running under xwayland.

To set it back to Wayland:

chrome://flags/

search for "Preferred Ozone platform"

Set to Wayland

 

The cpu usage is back to around 10/15% while playing 4k YouTube video again.

Posted

How I enabled 3D hardware acceleration and 4k60fps video hardware acceleration on Chromium for Armbian 23.02 Jammy Gnome-OrangePi5. Thanks to @royk, @amazingfate, @adr3nal1n27, @OttawaHacker and @martivo for supplying the information I used to do this. I'm aggregating all the steps that worked for me here for those who specifically want 3D acceleration and Chromium video acceleration.

 

Open Terminal

sudo add-apt-repository ppa:liujianfeng1994/panfork-mesa
sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia
sudo apt update
sudo apt dist-upgrade
sudo apt install mali-g610-firmware rockchip-multimedia-config
sudo apt install libv4l-rkmpp
sudo apt install v4l-utils
sudo apt install ffmpeg

sudo nano /etc/rc.local

Copy and paste below, above the "exit o" line.

Quote

echo dec > /dev/video-dec0
chown root:video /dev/video-dec0
chmod 0660 /dev/video-dec0
echo enc > /dev/video-enc0
chown root:video /dev/video-enc0
chmod 0660 /dev/video-enc0

Save and exit back to terminal

sudo nano /etc/udev/rules.d/11-rockchip-multimedia.rules

Copy and paste below

Quote

KERNEL=="mpp_service", MODE="0660", GROUP="video"
KERNEL=="rga", MODE="0660", GROUP="video"
KERNEL=="system-dma32", MODE="0666", GROUP="video"
KERNEL=="system-uncached-dma32", MODE="0666", GROUP="video" RUN+="/usr/bin/chmod a+rw /dev/dma_heap"

save and exit back to terminal

sudo nano /etc/gdm3/custom.conf

Find #WaylandEnable=false and copy and replace with below

Quote

WaylandEnable=true

Save and exit back to terminal

sudo reboot

Make sure to always use choose Ubuntu on Wayland when logging in.

 

Extra tip #1

Open terminal and type

echo $XDG_SESSION_TYPE

If the result comes back wayland, then it's okay. If comes back x11 or something else, then some procedures weren't properly followed.

Extra tip #2

When updating packages from the terminal use sudo apt dist-upgrade instead of sudo apt upgrade. This will avoid overwriting the GPU drivers.

Extra tip #3

If you can't trust yourself to remember to use sudo apt dist-upgrade, read the thread below on how to pin the drivers to keep them from being overwritten.

 

Posted

I'm having a random issue playing standard definition videos in the Amazingfate Chromium browser with the PPA GPU and Rockchip multimedia drivers. Sometimes they'll look completely green when playing in the browser. If I download the video and play it with MPV player, it's fine. If I play back the video in Firefox ESR, it's fine.

 

Here's a youtube video that exhibits this issue for me in Chromium.

 

 

Posted

Are these repos

 

sudo add-apt-repository ppa:liujianfeng1994/panfork-mesa
sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia

suitable for all RK chipsets?

I have RK3288 (Tinkerboard S R2.0) and would like to install Chromium with Web GL 2 support. Can't find the proper repo with this browser for RK3288.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines