DRI_PRIME
is not Respected in NVidia Hybrid Setup
#3464
Labels
api: vulkan
Issues with Vulkan
platform: wayland
Issues with integration with linux/wayland
platform: x11
Issues with integration with linux/x11
type: enhancement
New feature or request
Milestone
Description
My Linux PC has an integrated GPU and a discrete GPU. The discrete GPU drives the monitor, and the compositor runs on it. If I have Vulkan drivers installed for both and don't set any environment variables,
initialize_adapter_from_env_or_default
selects the integrated GPU.Repro steps
On a device with integrated and discrete GPUs, plug the monitor into the discrete GPU and configure it in your BIOS as the boot GPU, leaving the integrated GPU enabled. Install Vulkan drivers for both GPUs. Run one of the wgpu examples and check which adapter it uses.
Expected vs observed behavior
It selects the integrated GPU, regardless of
DRI_PRIME
. I would expect it to choose the first physical device fromvkEnumeratePhysicalDevices
, which is normally "the one used by Wayland/Xorg or the one connected to a display."I would make the case that this should be the behavior when a low power preference is requested, too. A discrete GPU will probably be powered on anyway if the compositor is using it, and choosing the integrated GPU in this case will cause the framebuffer to be copied to the discrete GPU every frame. I'd be interested to hear other opinions on that, though. (This would mean the integrated GPU would never be selected by default, which is what I would prefer. The only reason I have a Vulkan driver installed for it is so I can test applications on both devices.)
Platform
OS: Arch Linux
wgpu commit: 5b8c55c
Integrated and discrete GPUs both use Mesa drivers.
The text was updated successfully, but these errors were encountered: