-
Notifications
You must be signed in to change notification settings - Fork 38
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
vk: detect prime-select forced to Nvidia #95
Conversation
This file is common to those distros that do have a gpu selector enabled xorg-nvidia mode so it's probably not a bad stop-gap solution. My own gpu selector (https://gitlab.com/asus-linux/supergfxctl/) doesn't use this at all, and doesn't touch any xorg stuff mostly assuming wayland. So in cases where distros like nobara are used (which use supergfx) the xorg thing is a non-issue. I'm okay with this solution particularly since it cuts the scope right down. |
A possible other way to find this info:
The above is what i get when I explicitly offload to Nvidia with Sample outputs:
This does require the mesa-utils package be installed. Possibly you could use GLX lib directly to find this info? |
results of testing this pr: blade]$ prime-select query running the next comand example/bunnymark.. it seems to run ok.. but it appears to be choosing the Adapter "Intel(R) UHD Graphics (CML GT2)" , not the nvidia..? RUST_LOG=blade_graphics=debug RUST_BACKTRACE=1 cargo run --example bunnymark > followup.pr95.txt 2>&1 execution log: |
@davidbuzz have you tried offloading |
This is the exact outcome I expect |
@flukejones the point of the fix is to make it run well without any configuration. "offloading" is therefore not something we can ask people to do. |
@flukejones also, @davidbuzz is running Wayland, not Xorg, which explains why the fix of this PR didn't affect execution on their end. So the original issue wasn't just Xorg. And it got resolved after the driver update. |
It also means that the current workaround in |
@kvark if the driver is openGL then the above is the correct output, but if it's supposed to be using Vulkan then yeah, usually vulkan apps default to dgpu. How do we tell which is being used? |
And from what I saw of the original issue, David is using what Ubuntu defaults to, which is Xorg. You see this in the nvidia-smi output. Most distros up until this years have always defaulted to xorg if nvidia is installed too. Lastly, the entire reason I ended up here in the first place is that I do not want Zed defaulting to my dgpu. But if this is the behaviour you want then I think there needs to be a configurable compile-time option. |
@flukejones I'm chatting with David, and it definitely looks like they are running Wayland. We checked "$XDG_SESSION_TYPE" as well as "About Ubuntu" screen to verify.
We are on the same page here. I, too, don't want Zed to run on dGPU unless it's the users choice. Ideally, this would be configured by the environment, such that we don't need any fixes in Blade. "offloading" is exactly this kind of environment. TL;DR: unless you do |
Sure but the problem is that So what you've really ended up with here is a quirk to try and work around something that shouldn't be in use anymore. But I guess if it works.. I just don't like it. |
Follow-up to #94 that makes our check as strict as possible (within the data we have).
Closes #93
See https://github.com/canonical/nvidia-prime/blob/master/prime-select for more info.