-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
docs: Update linux.md to include NVIDIA PRIME workaround #23438
base: main
Are you sure you want to change the base?
Conversation
We require contributors to sign our Contributor License Agreement, and we don't have @Vanuan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
Thanks! For clarity let's:
When you say "fail to render correctly" in the original issue, does it just not show up? Or are there different symptoms. |
I submitted the screenshot. The window shows up, it's just rendering nothing. It's not transparent. It just freezes whatever is displayed as a static picture. Maybe it initializes some a framebuffer image, I don't know how to explain it. When I run the example gpui app, the window is just transparent, but still not rendering until I force the NVIDIA card. |
Here's the driver for Intel:
Maybe it doesn't fully support Vulkan API? NVIDIA:
|
I think this might be a smoking gun:
So, I'm using the performance mode in NVIDIA PRIME settings. It probably means that Intel GPU is actually disabled for rendering. Here's vulkaninfo output:
So apparently, by default Vulkan Loader is used. It discovers ICD profiles and selects the first compatible ICD it finds which happens to be NVIDIA when PRIME is set to perfomance mode. So, it means that zed has its own GPU selection logic that disregards PRIME set to perfornance mode and tries to render to Intel card which is disabled in this mode. |
The selection logic is inherited from blade: https://github.com/kvark/blade/pull/210/files#diff-1e88249f181d87457b584699773e7fd5eac7933f9c19079a483f2fde18f51c0cR59 We already do some things to work around known bugs, and I imagine that if we can narrow down the cases that are broken for you precisely enough that we won't be breaking anyone else, we could fix the logic. In the meantime (or in addition) I'd love to update the docs with any workarounds that work (though as above, I don't want to add digressions and background information; though links out to external resources would be helpful). |
@ConradIrwin Currently, there are multiple ways to influence device selection / rendering mode in hybrid graphics environemtn:
I think now is crucial than ever to document functionality using plain text rather than code. I understand linux troubleshooting guide might not be a great place for background information. But if Zed somehow influence device selection in addition to OS level settings, troubleshooting steps should at least reference all the device selection pipeline at the concept level. |
I was trying to link to "inspect_adaptor" code, not the PR, sorry! Do you have a personal blog you could put the background information on? We could link out. The problem with this level of detail in the top level document is that most people don't need it, and one of the 5 other random env var hacks is what they're looking for. |
Related to #22900
Release Notes: