Closed flukejones closed 8 months ago
As noted on the linked issue it looks like the root cause of the other users problems are the fact they are using xorg with a config to make xorg run on the nvidia dgpu by default. This is a very unique special case that will become phased out very soon. I'm surprised it isn;t already but then I guess "Ubuntu".
My own gpu management tool removed that hack a long time ago.
I don't have a system at hand that would be subject to this problem, and so it's very hard to investigate and find a minimal workaround. Any ideas on how exactly to detect the affected platform are appreciated!
I would prefer the blocking code be removed because it was added for an edge case that is rarely used and will be even more uncommon with the coming distro releases.
We could perhaps restrict it to xorg only at least. That would be an env check at minimum.
It would be safe to check these two env:
echo $XDG_SESSION_TYPE
x11
echo $XDG_SESSION_TYPE
wayland
echo $DESKTOP_SESSION
gnome-xorg
echo $DESKTOP_SESSION
gnome-wayland
I think if xorg-nvidia is used then glxinfo -B | grep Device
will return with the Nvidia card name. So that could be another secondary check to prevent blocking folks using xorg as normal.
The recent commit https://github.com/kvark/blade/commit/30c4fa41f1476e932b9c1f104665b0a2904f94c4 makes it so that things like zed run on the dgpu full time, this is not an acceptable solution for https://github.com/kvark/blade/issues/88 as it causes excessive battery drain, heat, etc.
In that issue I reference https://github.com/gfx-rs/wgpu/pull/4110 because it appears to be a very similar use case.
My own system is currently:
Operating System: Fedora Linux 40 Kernel Version: 6.8.0-rc7+ (64-bit) Graphics Platform: Wayland Processors: 32 × Intel® Core™ i9-14900HX Memory: 62.4 GiB of RAM Graphics Processor: Mesa Intel® Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Strix SCAR 16 G634JYR_G634JYR_000045397 System Version: 1.0
Installed mesa version is: 24.0.0
Installed nvidia version: 550.54.14
I also have older laptops I can test. Plus I have tested on fedora 39 quite fine which used 6.6.x and 6.7.x kernels. The desktop is irrelevant here, I've tested on COSMIC, Gnome, KDE. What is of note however is that I do not use Xorg sessions and haven't done for years.
The proper and expected solution is to find the exact cause of https://github.com/kvark/blade/issues/88 and either fix that, or work around that one specific case. A blanket blocking of all intel/nvidia just handicaps everyone regardless.
Logs
Output from example using Intel:
The
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json
wasn't actually required here.Using nvidia
in all cases the example presented fine.