Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3763

Troubleshooting • How to Enable Hardware Acceleration in Headless Chromium

$
0
0
I'm using Raspberry Pi OS 64bit and trying to take screenshots in Chromium's headless mode.

However, Chromium falls back to software rendering instead of using hardware acceleration.

When running in GUI mode, hardware acceleration works fine.

I've tried various launch parameters, but they haven't resolved the issue. How can I enable hardware acceleration for headless screenshots in Chromium?

My goal is to automate webpage screenshots using hardware acceleration on Raspberry Pi OS. This issue isn’t limited to Chromium—I've encountered similar problems with Playwright and Puppeteer. I've tried various configurations with Wayland and Xvfb, but nothing has worked so far.

Has anyone managed to enable hardware acceleration in headless mode for such setups?


ps: raspberry pi 5 4gb


for example:

projectx@raspberrypi:~ $ xvfb-run -a chromium --use-gl=desktop --enable-gpu-rasterization --disable-software-rasterizer --window-size=1280,1024 --screenshot="google.png" https://google.com


[50441:50441:1027/112239.998826:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[50441:50441:1027/112240.000218:ERROR:viz_main_impl.cc(181)] Exiting GPU process due to errors during initialization
[50495:50495:1027/112240.201124:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[50495:50495:1027/112240.202404:ERROR:viz_main_impl.cc(181)] Exiting GPU process due to errors during initialization
[50514:50514:1027/112240.260504:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[50514:50514:1027/112240.264382:ERROR:viz_main_impl.cc(181)] Exiting GPU process due to errors during initialization
[50521:50521:1027/112240.279137:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=none,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[50521:50521:1027/112240.281245:ERROR:viz_main_impl.cc(181)] Exiting GPU process due to errors during initialization
[50528:50528:1027/112240.296718:ERROR:gpu_init.cc(561)] Passthrough is not supported, GL is disabled, ANGLE is

Statistics: Posted by sns8 — Sun Oct 27, 2024 10:55 am



Viewing all articles
Browse latest Browse all 3763

Trending Articles