Closed sashahilton00 closed 1 day ago
Hello @sashahilton00
In the current version, GPU hardware acceleration is disabled by default. You will need to set up ENABLE_GPU=1
as an environment variable for the browser service.
You can find more details here
Hi Rahul,
I have set that environment variable to enable the GPU - the config at the top of my comment is the one that I am using.
The problem is that it only appears to enable the GPU for rasterisation - WebGL and OpenGL are both disabled
Hi
Yes, we were originally using the following flags when enabling GPU
--enable-features=WebRTC-H264WithOpenH264FFmpeg
--ignore-gpu-blacklist
--enable-gpu-rasterization
--force-gpu-rasterization
--gpu-sandbox-failures-fatal=no
--enable-native-gpu-memory-buffers
see here
Now, we set the following
--enable-zero-copy
--num-raster-threads=4
--ignore-gpu-blacklist
--enable-gpu-rasterization
as set here
You can use the FLAGS
var to try and find a working configuration for you.
Please note that this will overwrite the default flags we are using.
Can you please provide more details about your setup?
cat /mnt/boot/config.txt
?Thanks
I'll run some tests with the flags provided above. With regards to version and config, I'm running balenaOS 2.95.8 (development)
, I have vc4-kms-v3d
as a dtoverlay, and "i2c_arm=on","spi=on","audio=on"
as dtparams. I'll provide some logs and the boot config when I run the tests.
Hey all, I'm having similar issues. Interestingly I had no issues with WebGL on RPi3. On RPi4 I can't get it to work (trying to render https://get.webgl.org/).
This is seems to be caused by the version change in b2dd1a2067c561003b55a4bb5cd88d09df115a43. EDIT: Okay maybe it's caused by this #100 (0bc5e8933478a2c16a398a433e093c4fad09ebdf)
I have tested two versions of the browser block on a Raspberry Pi 4.
version | Chrome Version | WebGL |
---|---|---|
2.2.0 | Chromium 92.0.4515.98 Built on Raspbian , running on Debian 10 | ✅ |
2.4.3 | Chromium 89.0.4389.114 built on Debian 10.9, running on Debian 10.6 | ❌ |
Seems newer versions of the browser-block use a generic chromium build. And this causes issues.
We have this issue with the browser-aarch64
version 2.4.6
.
By changing the base image from balenalib/%%BALENA_MACHINE_NAME%%-debian-node:${NODEJS_VERSION}-buster-run
to balenalib/%%BALENA_MACHINE_NAME%%-node:${NODEJS_VERSION}-run
, I made the hardware acceleration working.
It seems the debian buster node base image doesn't come with the GPU acceleration support for RPI v4. I hope this can help.
If you use the browser-arm7hf
version of the block, it uses the RaspberryPi specific version of chromium, which has patches to enable the GPU correctly.
Hi,
I have been testing this block out in the hopes of using if for a kiosk where hardware accelerated graphics are required. After launching the block with the following configuration:
The
chrome://gpu
page is reporting that only rasterization is hardware accelerated - canvas, compositing and video decode are all software only, and opengl/webgl are unavailable all together. Please find attached a pastebin link for the full log fromchrome://gpu
: https://pastebin.com/XkZbdS75Is there something basic that I am missing? @rahul-thakoor commented on the balena forums a while back about needing to use a Pi specific build of chromium, but looking through this repo it looks as though any pi specific stuff has been removed/replaced by the generic aarch64 image. Thread is here. When trying the older, unmaintained balena blocks image hosted on Docker (balenablocks/browser:raspberrypi4-64) the hardware acceleration is fully functional. A pastebin of the
chrome://gpu
report when running that block is available here: https://pastebin.com/1B5TsJtz, which shows hardware acceleration working as expected.Any thoughts on where I might be going wrong would be much appreciated.