diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 95b6834a..882d3ffb 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -5,6 +5,7 @@ - [Chrome headless doesn't launch on Windows](#chrome-headless-doesnt-launch-on-windows) - [Chrome headless doesn't launch on UNIX](#chrome-headless-doesnt-launch-on-unix) +- [Chrome headless disables GPU compositing](#chrome-headless-disables-gpu-compositing) - [Chrome is downloaded but fails to launch on Node.js 14](#chrome-is-downloaded-but-fails-to-launch-on-nodejs-14) - [Setting Up Chrome Linux Sandbox](#setting-up-chrome-linux-sandbox) * [[recommended] Enable user namespace cloning](#recommended-enable-user-namespace-cloning) @@ -135,6 +136,17 @@ yum update nss -y - [#379](https://github.com/puppeteer/puppeteer/issues/379) - Alpine troubleshooting
+## Chrome headless disables GPU compositing + +Chrome/Chromium requires `--use-gl=egl` to [enable GPU acceleration in headless mode](https://github.com/chromium/chromium/commit/19671359ae25aa1e30bde90f8ff92453eeaac2ba). + +```js +const browser = await puppeteer.launch({ + headless: true, + args: ['--use-gl=egl'], +}); +``` + ## Chrome is downloaded but fails to launch on Node.js 14 If you get an error that looks like this when trying to launch Chromium: