mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Can't use MESA_VK_DEVICE_SELECT with two identical-model GPUs installed

Open LunarLambda opened this issue 6 months ago • 2 comments

I run a multi-seat system, that is, two dedicated GPUs, each with a set of keyboard/mouse/monitor. Using loginctl attach ... to assign devices to seats. Both wayland sessions.

This all works so far. Wayland applications automatically grab the correct GPU for things.

Unfortunately, the two GPUs are exactly identical:

selectable devices:
  GPU 0: 8086:e20b "Intel(R) Arc(tm) B580 Graphics (BMG G21)" discrete GPU 0000:03:00.0
  GPU 1: 8086:e20b "Intel(R) Arc(tm) B580 Graphics (BMG G21)" discrete GPU 0000:08:00.0

Same VID:DID.

This means applications that don't pick their GPU via Wayland, like vkcube, libsdl applications or indeed, steam games running in proton using DXVK, are impossible to tell the correct GPU to use, and will always default to using the first one. Neither DRI_PRIME=1! nor MESA_VK_DEVICE_SELECT=... seem to have any effect. The only thing I could get to work using vkcube was --gpu_number 1, but I need a session-wide solution that will also work for e.g. Proton/DXVK.

mesa version 26.0.6. Arch Linux

LunarLambda avatar May 19 '26 22:05 LunarLambda

Addendum:

~ ❯ DRI_PRIME_DEBUG=1 DRI_PRIME='1!' vkcube
Selected WSI platform: wayland
selectable devices:
  GPU 0: 8086:e20b "Intel(R) Arc(tm) B580 Graphics (BMG G21)" discrete GPU
  GPU 1: 8086:e20b "Intel(R) Arc(tm) B580 Graphics (BMG G21)" discrete GPU
device-select: device_select_find_wayland_pci_default selected 0
device-select: DRI_PRIME=1, default_idx so far: 0
device-select: find_non_cpu_skip selected 1
selectable devices:
  GPU 0: 8086:e20b "Intel(R) Arc(tm) B580 Graphics (BMG G21)" discrete GPU
  GPU 1: 8086:e20b "Intel(R) Arc(tm) B580 Graphics (BMG G21)" discrete GPU
device-select: device_select_find_wayland_pci_default selected 0
device-select: DRI_PRIME=1, default_idx so far: 0
device-select: find_non_cpu_skip selected 1
Selected GPU 0: Intel(R) Arc(tm) B580 Graphics (BMG G21), type: DiscreteGpu

Addendum 2: DRI_PRIME=1! seems to work okay for steam games (unfortunately gputop is buggy and keeps crashing), but vkcube and similar still do not.

LunarLambda avatar May 19 '26 22:05 LunarLambda

Wrong repo, mate 😅

codebreaker32 avatar May 21 '26 19:05 codebreaker32