mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(docs): add instructions for headless GPU acceleration (#6924)
This commit is contained in:
parent
57d1bd4240
commit
ae24bcaf6d
@ -5,6 +5,7 @@
|
||||
<!-- GEN:toc -->
|
||||
- [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 <br/>
|
||||
</details>
|
||||
|
||||
## 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:
|
||||
|
Loading…
Reference in New Issue
Block a user