Kenneth Russell | ab62ee3 | 2024-07-23 05:02:13 | [diff] [blame] | 1 | ## Using GPU Hardware in Headless Chrome |
| 2 | |
| 3 | Headless Chrome can utilize the local machine's GPU, at least in some |
| 4 | circumstances. This capability is useful for Continuous Integration |
| 5 | setups, running web workloads server-side, and in other scenarios. |
| 6 | |
| 7 | With headless Chrome, pass the command line argument `--enable-gpu` to |
| 8 | disable forcing software rendering. This defers to Chrome's default |
| 9 | OpenGL driver autodetection, which on Linux requires that X display is |
| 10 | available (i.e. X11 server is available and `DISPLAY` env var is set |
| 11 | accordingly). While the default auto-detection doesn't seem to work |
| 12 | without X11, forcing Vulkan backend (--use-angle=vulkan) have been |
| 13 | found to work at least on some Linux configurations. |
| 14 | |
| 15 | Linux NVIDIA users may find [Server Side Headless Linux Chrome With |
| 16 | GPUs] helpful. |
| 17 | |
| 18 | For additional background and information please see |
| 19 | [crbug.com/40540071](https://crbug.com/40540071), |
| 20 | [crbug.com/338414704](https://crbug.com/338414704), |
| 21 | [crbug.com/40256775](https://crbug.com/40256775), and |
| 22 | [crbug.com/40062624](https://crbug.com/40062624). |
| 23 | |
| 24 | [Server Side Headless Linux Chrome With GPUs]: server-side-headless-linux-chrome-with-gpus.md |