Jump to content

Hardware acceleration with Chromium


OttawaHacker
 Share

Recommended Posts

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?

 

 

Link to comment
Share on other sites

Check forum guidelines to use maximum potential!

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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). 

 

 

Link to comment
Share on other sites

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😄

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

@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.

 

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

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...
 Share

×
×
  • Create New...