Lace
Posts: 1
Joined: Thu Jun 27, 2019 10:08 am

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

Thu Jun 27, 2019 10:26 am

Hi,

today I tested stuff on my new Pi 4 and I discovered, there is no hardware acceleration enabled in Chromium. Therefore Video and WebGL is very laggy/slow. I am using the "Raspian Buster with Desktop" image (without recommended software)

I enabled GL in raspi-config -> Advanced Options -> GL Driver -> GL (fake KMS)

Chromium output of chrome://gpu is:
Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
Flash: Software only. Hardware acceleration disabled
Flash Stage3D: Software only. Hardware acceleration disabled
Flash Stage3D Baseline profile: Software only. Hardware acceleration disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Out-of-process Rasterization: Disabled
Hardware Protected Video Decode: Disabled
Rasterization: Software only. Hardware acceleration disabled
Skia Renderer: Disabled
Surface Control: Disabled
Surface Synchronization: Enabled
Video Decode: Software only. Hardware acceleration disabled
Viz Service Display Compositor: Enabled
WebGL: Software only, hardware acceleration unavailable
WebGL2: Software only, hardware acceleration unavailable

The h264ify Plugin is installed by default in chrome.

I need advice how to activate the hardware acceleration in Chrome for WebGL and Video.

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

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

Thu Jun 27, 2019 10:58 am

This is disabled at the moment due to the last minute discovery of a bug when playing video. We are actively trying to fix the issue.

You can re-enable the HW acceleration, but video will probably not work correctly. Edit /usr/bin./chromium-browser and look for the FKMS section for more details on the disabling.
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."


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

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

Tue Jul 09, 2019 7:38 pm

Same! I'm really eager to use hardware accelerated WebGL on the RPi 4

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

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

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

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

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

Tue Jul 09, 2019 8:15 pm

Great! Can you please be more specific about the section of the file I should modify? I searched for that string and couldn't find anything. What line number would it be in a stock Chromium install on Buster?

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

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

Tue Jul 09, 2019 9:22 pm

philletourneau wrote:
Tue Jul 09, 2019 8:15 pm
Great! Can you please be more specific about the section of the file I should modify? I searched for that string and couldn't find anything. What line number would it be in a stock Chromium install on Buster?
I don't have the exact recipe handy, Google might find it.
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: 3455
Joined: Wed Aug 28, 2013 3:31 am

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

Wed Jul 10, 2019 5:32 am

What sort of fps should we get now with the Aquarium example?
https://webglsamples.org/
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Wed Jul 10, 2019 6:50 am

Think I was getting 18, but depends greatly on resolution.
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: 3455
Joined: Wed Aug 28, 2013 3:31 am

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

Wed Jul 10, 2019 7:21 am

Think I was getting 18, but depends greatly on resolution.
Will check tonight but 18 is very good. :D
I have only been getting 1fps, time to do a raspi-update.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Wed Jul 10, 2019 8:51 am

Gavinmc42 wrote:
Wed Jul 10, 2019 7:21 am
Think I was getting 18, but depends greatly on resolution.
Will check tonight but 18 is very good. :D
I have only been getting 1fps, time to do a raspi-update.
Canvas size 1024x1024, in a window on 1200p display, 500 fish, 21-22 fps.

Full screen (1920x1200), 17-20fps
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: 3455
Joined: Wed Aug 28, 2013 3:31 am

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

Wed Jul 10, 2019 10:45 am

Thanks Jamesh.

On 1280 x 1024 screen I got up to 27fps :D
This stress test has passed.
It's not 60fps but it is enough to now add "learn to code WebGL" to my list of things to do.

Going to be interesting to see what Sakaki can do with her Gentoo64.
It always ran WebGL faster than Raspbian on the Pi3B+, even Firefox was not bad.

Now need to look for a new stress test that breaks Pi's.
WebGL gaming? Roblox?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
rpdom
Posts: 14757
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

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

Wed Jul 10, 2019 11:16 am

Interesting. My old laptop (about 4 years old) gets 11-12fps with 500 fish at that resolution, so the Pi 4B is a lot better.

My current laptop gets 60fps with 1000 fish, but it cost slightly more than a Pi 4B 4GB ;-)

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

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

Wed Jul 10, 2019 11:31 am

Gavinmc42 wrote:
Wed Jul 10, 2019 10:45 am
Thanks Jamesh.

On 1280 x 1024 screen I got up to 27fps :D
This stress test has passed.
It's not 60fps but it is enough to now add "learn to code WebGL" to my list of things to do.

Going to be interesting to see what Sakaki can do with her Gentoo64.
It always ran WebGL faster than Raspbian on the Pi3B+, even Firefox was not bad.

Now need to look for a new stress test that breaks Pi's.
WebGL gaming? Roblox?
If you really want to stress the GPU out beyond its capabilities (sometimes), try the shadertoy website. Its does take ages to compile the shaders for the first page, so worth jump to specific ones asap.
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
bensimmo
Posts: 4128
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

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

Wed Jul 10, 2019 11:42 am

rpdom wrote:
Wed Jul 10, 2019 11:16 am
Interesting. My old laptop (about 4 years old) gets 11-12fps with 500 fish at that resolution, so the Pi 4B is a lot better.

My current laptop gets 60fps with 1000 fish, but it cost slightly more than a Pi 4B 4GB ;-)
interestingly, as I just booted up my old Medion AIO from 2010 (Intel Pentium Dual core T4500, 4GB memory) it has a bargain basement GeForce 9100M G that is ticking over at 450MHz iirc.
It has WebGL/GL2 enabled in hardware (checked as per first post).
1080p at full native screen (F11) is a steady 17FPS
It was about £600 from Aldi back then (it is an All In One and has a useful touch screen).


Anyway, do you think there is more 3D performance, WebGL or otherwise that can be unlocked from the Pi4 ?

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

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

Wed Jul 10, 2019 12:02 pm

Any update when this release will be stable via apt update?!
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.

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

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

Wed Jul 10, 2019 12:07 pm

thatchunkylad198966 wrote:
Wed Jul 10, 2019 12:02 pm
Any update when this release will be stable via apt update?!
Soon, next day or two. Currently in testing.
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."

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

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

Wed Jul 10, 2019 12:11 pm

jamesh wrote:
Wed Jul 10, 2019 12:07 pm
thatchunkylad198966 wrote:
Wed Jul 10, 2019 12:02 pm
Any update when this release will be stable via apt update?!
Soon, next day or two. Currently in testing.
Sounds good! Thanks for the update. :mrgreen:
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.

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

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

Thu Jul 11, 2019 1:02 am

I had been testing Aquarium in Gerntoo64 for ages against my mobile phone and other PC's.
My work Dell Optiplex 9020 Win10 gets to 60fps.

The Buster/Chromium/Pi4 is over 2 times faster now, 27fps against 12fps.
The phone was over two times more expensive than the Pi4, so still a cheap 4 core phone.
The Dell even more expensive.
Anyway, do you think there is more 3D performance, WebGL or otherwise that can be unlocked from the Pi4 ?
I suspect a 64bit version OS will be a bit faster, just guessing mainly from how Chromium and Firefox used NEON etc for acceleration.
I think they also use OpenCL which on the VC4 only doe300 knows how to get going?

The VC6 is supposed to be OpenCL friendly, but it is still very early in that learning curve.
I would say WebGL is now very usable on the Pi4 and should only improve.

Whether it will ever get to 60fps, only time will tell.
Chromium and Firefox get better too and now the Pi4 is basically mainstream who knows what will happen.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Thu Jul 11, 2019 6:51 am

Gavinmc42 wrote:
Thu Jul 11, 2019 1:02 am
I had been testing Aquarium in Gerntoo64 for ages against my mobile phone and other PC's.
My work Dell Optiplex 9020 Win10 gets to 60fps.

The Buster/Chromium/Pi4 is over 2 times faster now, 27fps against 12fps.
The phone was over two times more expensive than the Pi4, so still a cheap 4 core phone.
The Dell even more expensive.
Anyway, do you think there is more 3D performance, WebGL or otherwise that can be unlocked from the Pi4 ?
I suspect a 64bit version OS will be a bit faster, just guessing mainly from how Chromium and Firefox used NEON etc for acceleration.
I think they also use OpenCL which on the VC4 only doe300 knows how to get going?

The VC6 is supposed to be OpenCL friendly, but it is still very early in that learning curve.
I would say WebGL is now very usable on the Pi4 and should only improve.

Whether it will ever get to 60fps, only time will tell.
Chromium and Firefox get better too and now the Pi4 is basically mainstream who knows what will happen.
Going 64bit won't make a perceptible difference. CPU demand when running webgl is minimal, it's all GPU. No we don't use Open CL. There is some minimal space for speed improvement, but not much.
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
bensimmo
Posts: 4128
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

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

Thu Jul 11, 2019 7:19 am

Gavinmc42 wrote:
Thu Jul 11, 2019 1:02 am
I had been testing Aquarium in Gerntoo64 for ages against my mobile phone and other PC's.
My work Dell Optiplex 9020 Win10 gets to 60fps.

The Buster/Chromium/Pi4 is over 2 times faster now, 27fps against 12fps.
The phone was over two times more expensive than the Pi4, so still a cheap 4 core phone.
The Dell even more expensive.
...
My 4/5 year old desktop locks at 60fps, a think it's a cap.as it not trying.

My phone, a 2016 model from you favourite Chinese brand cost about £110 from Carphone warehouse or similar iirc using A53 cores with it 1080p display runs at a 40fps.
Given the cost of the 4GB Pi4 , the PSU, the uSD card and then no 1080p touch screen, speakers etc.
The Pi4 and its 'not very powerful for WebGL' so isn't a good product to buy for that.
At least compared to the Mali-T830MP2 in this phone.

But it has a different market.

Now for tinkering, testing things out and being able to do some office work and look at your large CSV data and now looking up webpages.
It is excellent.

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

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

Thu Jul 11, 2019 7:41 am

Going 64bit won't make a perceptible difference. CPU demand when running webgl is minimal, it's all GPU. No we don't use Open CL. There is some minimal space for speed improvement, but not much.
Not sure how it is done in Buster, WebGL is supposed to be OpenGLES 2.0 based.
And the open Source OpenGL driver is also going via the 32bit VC6, it probably won't make a difference.
But if the 128bit NEON is interfacing to Aarch64 and not Aarch32, it might be faster.
I don't expect a 2 or 3 times improvement, it could be 10% either way.
Time will tell.

I did notice if I increase the fish I can get some more heat and double cpu usage.
Increase it too much and it gives up ;)

It's still good enough for simple coding practice.
And looking at some of those other samples, perhaps some not so simple coding.

Anyway time to move on(back) to OpenGL and USB drive testing.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Thu Jul 11, 2019 10:04 am

Gavinmc42 wrote:
Thu Jul 11, 2019 7:41 am
Going 64bit won't make a perceptible difference. CPU demand when running webgl is minimal, it's all GPU. No we don't use Open CL. There is some minimal space for speed improvement, but not much.
Not sure how it is done in Buster, WebGL is supposed to be OpenGLES 2.0 based.
And the open Source OpenGL driver is also going via the 32bit VC6, it probably won't make a difference.
But if the 128bit NEON is interfacing to Aarch64 and not Aarch32, it might be faster.
I don't expect a 2 or 3 times improvement, it could be 10% either way.
Time will tell.

I did notice if I increase the fish I can get some more heat and double cpu usage.
Increase it too much and it gives up ;)

It's still good enough for simple coding practice.
And looking at some of those other samples, perhaps some not so simple coding.

Anyway time to move on(back) to OpenGL and USB drive testing.
Why bring up NEON? What does that have to do with the GPU? AFAIK, there little or no NEON code in the 3D driver - which talks directly to the VC6 HW registers and the quads to provide acceleration.
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: 3455
Joined: Wed Aug 28, 2013 3:31 am

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

Thu Jul 11, 2019 11:19 am

Why bring up NEON? What does that have to do with the GPU? AFAIK, there little or no NEON code in the 3D driver - which talks directly to the VC6 HW registers and the quads to provide acceleration.
Why NEON?
Because I think the browser engines are using those instructions, but I could be wrong.
Read something about NEON/OpenCL in the Gentoo forum about Neddy Seagoon, Firefox and Rust?

Google time
Well Firefox needs it, so I'm just assuming Chromium would use it too.
ARM based devices must have NEON support as of March 2017, released in Firefox 53.
Browsers are massive pieces of software I just assume they use every resource they can to make them faster.

How much is used for WebGL? No idea
But in WebGL there is more than just rendering going on.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

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

Thu Jul 11, 2019 12:02 pm

Gavinmc42 wrote:
Thu Jul 11, 2019 11:19 am
Why bring up NEON? What does that have to do with the GPU? AFAIK, there little or no NEON code in the 3D driver - which talks directly to the VC6 HW registers and the quads to provide acceleration.
Why NEON?
Because I think the browser engines are using those instructions, but I could be wrong.
Read something about NEON/OpenCL in the Gentoo forum about Neddy Seagoon, Firefox and Rust?

Google time
Well Firefox needs it, so I'm just assuming Chromium would use it too.
ARM based devices must have NEON support as of March 2017, released in Firefox 53.
Browsers are massive pieces of software I just assume they use every resource they can to make them faster.

How much is used for WebGL? No idea
But in WebGL there is more than just rendering going on.
NEON is best used when doing large quantities of same data e.g. video, some 3D. But these are already accelerated using HW drivers. I doubt the non-rendering parts of WebGL would benefit much from NEON.
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."

Return to “Troubleshooting”