0
Files
src/docs/gpu/using-gpu-hardware-in-headless-chrome.md
Kenneth Russell ab62ee3256 Document using the GPU in headless Chrome.
Copy and slightly revise the resolution from crbug.com/40540071 into a
Markdown document.

Bug: 40540071
Change-Id: Id39bb765865c4b1c5a7e65f6e9ce7ad70e009381
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5731222
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1331551}
2024-07-23 05:02:13 +00:00

1.1 KiB

Using GPU Hardware in Headless Chrome

Headless Chrome can utilize the local machine's GPU, at least in some circumstances. This capability is useful for Continuous Integration setups, running web workloads server-side, and in other scenarios.

With headless Chrome, pass the command line argument --enable-gpu to disable forcing software rendering. This defers to Chrome's default OpenGL driver autodetection, which on Linux requires that X display is available (i.e. X11 server is available and DISPLAY env var is set accordingly). While the default auto-detection doesn't seem to work without X11, forcing Vulkan backend (--use-angle=vulkan) have been found to work at least on some Linux configurations.

Linux NVIDIA users may find Server Side Headless Linux Chrome With GPUs helpful.

For additional background and information please see crbug.com/40540071, crbug.com/338414704, crbug.com/40256775, and crbug.com/40062624.