-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU is always disabled when running in headless mode. #1260
Comments
@aslushnikov should we only use this flag on Windows? https://chromium-review.googlesource.com/c/chromium/src/+/522068 fixed the libmesa issue on Linux. |
I did try to add that type of logic in locally [0], but that seems to cause unit tests to fail. I'm not sure why that is, so I haven't opened a PR yet. |
@ebidel @stephenash it looks like protocol's |
If anyone wants to ignore the defaults and run webgl in headless mode, you can just use the args instead of the options. These are just the args passed in the code without
|
This patch conditionally adds the `--disable-gpu` flag if only we run headless on windows. Fixes puppeteer#1260.
@dosentmatter some puppeteer screenshot tests were failing; looks like it was fixed since than so we can drop the PR is out for a review. |
This patch conditionally adds the `--disable-gpu` flag if only we run headless on windows. Fixes #1260.
Can the flag be removed for windows now, too? From the original chromium issue #737678:
It looks like that other issue #729961 is now fixed, as well. |
It looks like https://crbug.com/737678 and https://crbug.com/729961 are fixed - so we shouldn't need the `--disable-gpu` flag on windows headless. Reference puppeteer#1260
@gkjohnson I wonder! Let's try dropping it #4523 |
It looks like https://crbug.com/737678 and https://crbug.com/729961 are fixed - so we shouldn't need the `--disable-gpu` flag on windows headless. Reference #1260
Also in need of as solution here - trying to run Web ML models on the server to automate a testing process that need GPU to execute in timely fashion using the new headless Chrome as shown here: https://developer.chrome.com/articles/new-headless/ However GPU is software only and not using the actual NVIDIA GPU attached to my Linux instance. Any fix for this would help all of us folk working in the Web ML space (Machine Learning in JavaScript) |
@jasonmayes Any luck with this? |
Yes! I cracked it here: https://github.com/jasonmayes/headless-chrome-nvidia-t4-gpu-support Write up here: And here: |
@jasonmayes Thanks a lot! I've already found it myself and it works great on RTX 4090. This is basically the only solution that worked for me, at least on the kind of machines I'm using. |
Has anyone had any luck with this in a github action? I don't need hardware acceleration, software is fine, but i can't even get that far. I tried all the flags @jasonmayes suggested, as well as this set:
|
Not familiar with github actions but for me there was a driver issue too on linux that needed resolving before I could use those flags successfully. See first lines of my script. Does action allow you to use those drivers? |
I'm trying to use puppeteer to interact with a webpage that requires WebGL support. When puppeteer launches Chromium in headless mode, the
--disable-gpu
flag is always used. Based on https://bugs.chromium.org/p/chromium/issues/detail?id=737678#c1, that flag is not necessary on Linux or MacOS anymore.Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
What is the expected result?
WebGL Support: { gl: true, expGl: true }
What happens instead?
WebGL Support: { gl: null, expGl: null }
The text was updated successfully, but these errors were encountered: