isola
Posts: 1
Joined: Thu Jul 11, 2019 3:32 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Thu Jul 11, 2019 3:42 pm

jamesh wrote:
Tue Jul 09, 2019 7:44 pm
It's fixed. If you are happy using prerelease firmware, do an `sudo rpi-update` then re-enable the GPU acceleration by editing the /usr/bin/chromium-browser file and look for the FKMS section and remove the disabling stuff.
Hello!
I have Pi 4B with latest Raspbian Buster Desktop image. I did follow the instructions as below. Result is that Chromium browser is non-responsive.
- Update using "rpi-update"
- Comment the --disable-gpu flag in /usr/bin/chromium-browser script

Chromium browser starts normally if revert the "--disable-gpu" flag as in the original script.
Anything else that I'm missing?

thatchunkylad198966
Posts: 112
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Thu Jul 11, 2019 6:41 pm

Thanks to the highlight on IRC; the fix is now out for Chromium.
The whole system feels faster, too.

Happy days! :D
One man's trash is another man's treasure! :) Pi's I have; Pi Zero, Pi Zero W, Pi 2 x2, Pi 3 x2, Pi 4 4GB x2.

philletourneau
Posts: 10
Joined: Thu May 28, 2015 5:13 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Thu Jul 11, 2019 7:08 pm

Is the rpi-update step all that's required to get this working?

Or do I still need to edit the Chromium configuration file?

thatchunkylad198966
Posts: 112
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Thu Jul 11, 2019 8:23 pm

philletourneau wrote:
Thu Jul 11, 2019 7:08 pm
Is the rpi-update step all that's required to get this working?

Or do I still need to edit the Chromium configuration file?
You don't need the "rpi-update" now or to edit anything.
Just run "apt update -y && apt upgrade -y" and you're good to go.
One man's trash is another man's treasure! :) Pi's I have; Pi Zero, Pi Zero W, Pi 2 x2, Pi 3 x2, Pi 4 4GB x2.

Pfuriosus77
Posts: 13
Joined: Sat Jul 06, 2019 10:38 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Fri Jul 12, 2019 12:23 am

The update seems to do nothing for being able to play 1080p60 video decently, let alone 4K video. Only 1080p30 seems to be possible without dropped frames. Has anyone been able to get the above to work or am I doing something wrong? Should not be this difficult on a device advertised to be capable of 4kp60!

Pfuriosus77
Posts: 13
Joined: Sat Jul 06, 2019 10:38 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Fri Jul 12, 2019 11:12 am

This has now been clarified here https://www.raspberrypi.org/forums/view ... 8&t=245388. Basically you will need LibreElec or omxplayer for 4kp60 or 1080p60 video, chromium still does not fully support hardware decoding.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Fri Jul 12, 2019 1:16 pm

Pfuriosus77 wrote:
Fri Jul 12, 2019 11:12 am
This has now been clarified here https://www.raspberrypi.org/forums/view ... 8&t=245388. Basically you will need LibreElec or omxplayer for 4kp60 or 1080p60 video, chromium still does not fully support hardware decoding.
It does support 1080p30, but the problem is the double data rate for p60. Chromium's render path is quite...convoluted..and AIUI cannot pass the required amount of data around in real time. There are certainly better options for faster frame rates than Chromium. LibreElec is best as that also supports H265 (This will come in Chromium and ffmeg in the future, being worked on now).
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Botspot
Posts: 162
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Yahoo Messenger

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 1:57 pm

I got a steady 24 fps on the WebGL aquarium, on a Pi3! How? I used Chromebook OS, which is fully hardware accelerated.
Besides being fully hardware accelerated, Chromebook OS loads most pages twice as fast as default Raspbian.

Here's my question: Could we improve Raspbian's chromium to match Chromebook OS's impressive browsing performance?
My doctor told me my brain is as useful as a Raspberry Pi. Is that a compliment?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7149
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 3:34 pm

Botspot wrote:
Mon Jul 15, 2019 1:57 pm
I got a steady 24 fps on the WebGL aquarium, on a Pi3! How? I used Chromebook OS, which is fully hardware accelerated.
Besides being fully hardware accelerated, Chromebook OS loads most pages twice as fast as default Raspbian.

Here's my question: Could we improve Raspbian's chromium to match Chromebook OS's impressive browsing performance?
Unfortuately much of it is a restriction of X. ChromeOS, Android, and various other OSes support adding hardware video overlays, so can easily put images on the screen. This doesn't work in a generic desktop (unless every component is an independent layer), as if you drag a window over the top of an overlay, how does it compose that together?
X uses the 3D hardware to compose together all the windows, which means that there isn't as much 3D compute power available to render your whizzy 3D thing.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
Botspot
Posts: 162
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Yahoo Messenger

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 4:07 pm

6by9 wrote:
Mon Jul 15, 2019 3:34 pm
Botspot wrote:
Mon Jul 15, 2019 1:57 pm
I got a steady 24 fps on the WebGL aquarium, on a Pi3! How? I used Chromebook OS, which is fully hardware accelerated.
Besides being fully hardware accelerated, Chromebook OS loads most pages twice as fast as default Raspbian.

Here's my question: Could we improve Raspbian's chromium to match Chromebook OS's impressive browsing performance?
Unfortuately much of it is a restriction of X. ChromeOS, Android, and various other OSes support adding hardware video overlays, so can easily put images on the screen. This doesn't work in a generic desktop (unless every component is an independent layer), as if you drag a window over the top of an overlay, how does it compose that together?
X uses the 3D hardware to compose together all the windows, which means that there isn't as much 3D compute power available to render your whizzy 3D thing.
Does that explain why chromium in Raspbian is not hardware accelerated like ChromiumOS is?
gpu compare.png
gpu compare.png (105.09 KiB) Viewed 2059 times
My doctor told me my brain is as useful as a Raspberry Pi. Is that a compliment?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7149
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 4:11 pm

Botspot wrote:
Mon Jul 15, 2019 4:07 pm
Does that explain why chromium in Raspbian is not hardware accelerated like ChromiumOS is?
Have you updated in the last few days. As documented in this thread, we did initially have hardware acceleration in Chromium disabled due to an issue, but it should now be enabled.
Where did you get that list of features from?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 4:12 pm

Something up with your Chromium on Raspbian

Code: Select all

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Unavailable
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Unavailable
Viz Service Display Compositor: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Do an apt update/dist-upgrade
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Botspot
Posts: 162
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Yahoo Messenger

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 5:03 pm

jamesh wrote:
Mon Jul 15, 2019 4:12 pm
Something up with your Chromium on Raspbian

Code: Select all

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Unavailable
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Unavailable
Viz Service Display Compositor: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Do an apt update/dist-upgrade
I am fully upgraded, but after enabling GL with fake KMS via raspi-config and then restarting, my chrome://gpu output was identical to yours. One problem though: the aquarium page would not render at all. It would flash some fish outlines, but once the page finished loading, the page would go black and CPU usage would remain below 5%.
I also noticed that the mouse cursor would not switch states smoothly anymore. For example, if the cursor was in the normal state and then transitioned to the animated "loading" state, there would be one or two frames when the cursor has been offset to accommodate the loading state, but the cursor still appears as the normal state. I find this very distracting.
Once I enabled GL with full KMS, the aquarium page rendered at an impressive 20 fps! (remember this is a Pi3) But the mouse cursor continued to not transition states smoothly.
My doctor told me my brain is as useful as a Raspberry Pi. Is that a compliment?

User avatar
Botspot
Posts: 162
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Yahoo Messenger

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 5:23 pm

Botspot wrote:
Mon Jul 15, 2019 5:03 pm
If the cursor was in the normal state and then transitioned to the animated "loading" state, there would be one or two frames when the cursor has been offset to accommodate the loading state, but the cursor still appears as the normal state.
I caught this phenomenon on video:
Image
Has anyone else had this problem?
My doctor told me my brain is as useful as a Raspberry Pi. Is that a compliment?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Mon Jul 15, 2019 9:42 pm

Botspot wrote:
Mon Jul 15, 2019 5:23 pm
Botspot wrote:
Mon Jul 15, 2019 5:03 pm
If the cursor was in the normal state and then transitioned to the animated "loading" state, there would be one or two frames when the cursor has been offset to accommodate the loading state, but the cursor still appears as the normal state.
I caught this phenomenon on video:
Image
Has anyone else had this problem?
If this is on the Pi3, please start a new thread - this one is specifically titled for Pi4.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Gavinmc42
Posts: 3641
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Jul 16, 2019 7:07 am

The VC6 supports OpenGLES 3.0, therefore it should be able to do WebGL2.0.

This seems to indicate it does
https://get.webgl.org/webgl2/

Was looking for some WebGL2 examples to test and found this, not sure which version but I'm impressed.
https://alteredqualia.com/three/example ... namic.html

These seem to work.
http://webglsamples.org/WebGL2Samples/

This stuff is useful to know
https://alteredqualia.com/tools/webgl-features/

Do the eyes follow you?
https://alteredqualia.com/xg/examples/s ... ution.html

It is not the fastest PC around but pretty good for the price ;)
If the Pi4 can do this stuff in a Browser how good is it without all that bloat?

Wonder how it does the OpenGLES3.0 in WebGL2.0?
Via OpenGL or native OpenGLES3.0 in the VC6?
OpenGL benchmarks?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Notupus
Posts: 35
Joined: Tue Jun 19, 2018 9:57 am

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Jul 16, 2019 7:23 am

I don't think there is full kms for the rpi4 yet. Try going to raspi-config and setting it to fake kms.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Jul 16, 2019 9:18 am

Gavinmc42 wrote:
Tue Jul 16, 2019 7:07 am
The VC6 supports OpenGLES 3.0, therefore it should be able to do WebGL2.0.

This seems to indicate it does
https://get.webgl.org/webgl2/
See the post above where the specifics of what is accelerated is actually right in front of you. WebGL2 is one of them.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Jul 16, 2019 9:19 am

Notupus wrote:
Tue Jul 16, 2019 7:23 am
I don't think there is full kms for the rpi4 yet. Try going to raspi-config and setting it to fake kms.
Correct. Although the difference is simply that the firmware drives the final composition in Fake KMS, whereas it would be driven by the ARM in full KMS. Performance is approximately the same.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Gavinmc42
Posts: 3641
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Wed Jul 17, 2019 2:09 am

See the post above where the specifics of what is accelerated is actually right in front of you. WebGL2 is one of them.
I know that's why I went and checked, hence that link.

I keep forgetting this is a Pi and chose to close some tabs down when I get near 20 of them.
In Gentoo64 on a 3B+ I have tested Chromium and Firefox to 30+ tabs, so 20 was no surprise in these new versions.

Playing videos and listening to the music as well, while compiling code. ;)
Temp is less than 55C and still have 250MB+ of free memory on a 4B1.

For my purposes Chromium is very usable now.
But I don't have a 4K or even FHD screen.
Now running music on VLC, it makes things run a bit cooler.

2 weeks now of running the 4B1 as a Desktop replacement.
I was expecting some compromise with only 1GB,
.
Noticed nothing of any consequence so far since the OpenGL fix.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 3641
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Jul 23, 2019 10:52 am

A post got locked before I could answer this.
Have a look at my beginnings of a new webgl project here: https://otaniemi.conveqs.fi:3000/public/jatkasaari.html
Heater, It does work on my Pi4B1
Also tested it at work hours ago in Win10/MS Edge, it had no map.
On a Pi4 with Chromium is does have the road map, so not sure if that got added between tests.
Speed? Windows10 MS Edge I can get a bit dizzy, it is that fast.
Pi4 is much slower, but not painfully slow.
Pins works.
Is that map Finland?

Not sure if it matters, waiting on testing but my Pi4B1 has a 1GB swap file.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
bensimmo
Posts: 4162
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Jul 23, 2019 2:39 pm

Gavinmc42 wrote:
Tue Jul 23, 2019 10:52 am
A post got locked before I could answer this.
Have a look at my beginnings of a new webgl project here: https://otaniemi.conveqs.fi:3000/public/jatkasaari.html
Heater, It does work on my Pi4B1
Also tested it at work hours ago in Win10/MS Edge, it had no map.
On a Pi4 with Chromium is does have the road map, so not sure if that got added between tests.
Speed? Windows10 MS Edge I can get a bit dizzy, it is that fast.
Pi4 is much slower, but not painfully slow.
Pins works.
Is that map Finland?

Not sure if it matters, waiting on testing but my Pi4B1 has a 1GB swap file.
It works in a newer
Edge Version 77.0.218.4 (Official build) dev(64-bit)
but the odler version
Microsoft Edge 44.18362.1.0
like you say doesn't have the Map, I guess EdgeHTML 18.18362 is missing something at the moment and probably necver will get it.

Chrome is also working
Version 75.0.3770.142 (Official Build) (64-bit)

no idea how to show F.P.S.
We should see 'Edge' coming to Linux land at some point.

jordiblanchcarles
Posts: 7
Joined: Wed Feb 14, 2018 6:27 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium?

Tue Aug 13, 2019 10:57 am

Hello everybody,

I've recently received my new Pi 4 2Gb and wanted to test the hardware decoding for videos in Chromium, so I found this thread. I've installed latest Raspbian Buster (Release date:2019-07-10), and just to compare cpu usage, I've created a small html file that loads and plays a FullHD mp4 video file from SD storage (H264 coded). I'm opening this file in Chromium, so that I can see whether hardware video decoding works or not in Chromium. I've also checked cpu usage playing the video with omxplayer and vlc. My screen is a FullHD screen, so Desktop size is 1920x1080 pixels.

So my results are that playing the H264 coded video inside Chromium results in a cpu usage of about 20% and video is not as smooth as it should be. On the other side, playing the video with omxplayer results in almost 0% cpu usage and video is playing absolutely smooth, and playing the video with vlc results in about 5% cpu usage and smooth playing in window mode, and in fullscreen mode the cpu usage is almost 0% and playing is as smooth as omxplayer.

I've also checked chrome://gpu information and it is telling that video decoding is not hardware accelerated (Video Decode: Unavailable):

Code: Select all

Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Unavailable
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Unavailable
Viz Service Display Compositor: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
So, I see there's an improvement when using FKMS driver instead of the Legacy driver, because cpu usage in Chrome when playing videos is lower, but it's still very high when compared to omxplayer or vlc which are using hardware video decoding.

So my questions are:
Is Chromium really using hardware video decoding although it tells it isn't in chrome://gpu?
If it is using hardware video decoding, why is it using so much cpu when compared to vlc (I know omxplayer is not really comparable because is is overriding the X system) and although it is using much more cpu, the videos are not playing as smooth as they should?
Are there any configuration changes that could improve these Chromium figures and make it approach to vlc performance?

Thank you!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23397
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium? [fixed]

Tue Aug 13, 2019 12:47 pm

Cannot comment on why the :gpu settings say it is not accelerated, but with regard to the higher CPU, Chrome has a much more complex path for the video data to get through to display. For example there are colour conversions and entire frame copies (done at 30 frames a second, multiplied by the data per frame and that is a lot of bandwidth used up) which are avoided by better data paths in OMXplayer and VLC. Shouldn't be glitchy though.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jordiblanchcarles
Posts: 7
Joined: Wed Feb 14, 2018 6:27 pm

Re: Pi 4 with Buster - No hardware acceleration for Video/WebGL in Chromium? [fixed]

Wed Aug 14, 2019 9:41 am

Hello @jamesh, thank you for your answer, but if chrome://gpu doesn't show whether the hardware video decoding is used or not in Chromium, is there any other way to make sure hardware video decoding is active in Chromium?

Also, is there someone that can confirm that playing a FullHD video in Chromium is using more or less 20% cpu usage and is clearly not as smooth as playing it in vlc or omxplayer?

Thank you!

Return to “Troubleshooting”