Default GPU weirdness

Issue:
Since today, anything that starts full-screen uses the RTX4k. It has nothing plugged in and I have not knowingly touched anything that changes GPU-anything.
In normal desktop use, playing videos, etc. the RTX4k sleeps/idles along while the 7900xt does all the work. As expected the RTX4k takes up the CUDA-loads I sometimes have.

One thing I have noticed is that the RTX used to idle at 7W, now it reports 9W when doing “nothing”.

The moment a game/fullscreen application starts, the RTX4k kicks into gear:




And in desktop it goes back to sleep:


System:
CPU: TR 7960x
GPU 0: AMD 7900xt (2 monitors)
GPU1: Nvidia Quadro RTX 4000 (0 monitors)
OS: Fedora 40 (KDE)

System Overview

image

Help! :upside_down_face:

Did some poking:

switcherooctl list results in:

Device: 0
  Name:        Advanced Micro Devices, Inc. [AMD®/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] (PULSE RX 7900 XTX)
  Default:     yes
  Environment: DRI_PRIME=pci-0000_03_00_0

Device: 1
  Name:        NVIDIA Corporation TU104GL [Quadro RTX 4000]
  Default:     no
  Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only

Could you give an example of any such application? Does the same happen if you try to run the application explicitly on the AMD gpu?

Any game launched through Steam/Proton.

Tips on how to test this?


Launching anything from Lutris/Wine without specifying a GPU results in this:
image
Manually specifying a card works fine.

Resolve (which fought me while setting up this system) is happy:

E.g. switcherooctl launch -g 0, or on fedora (at least with gnome) you can right-click and choose the GPU (which I guess does the same)

I’ve had some weirdness with GPU selection too, but usually it turned out those applications decide on their own what to use, and have their own flags. Like some games on wine i found do not respond properly to the environment flags but they’ll have some GPU setting in their graphics menu.

Anything at all gives this specific message?

PS: I find ‘nvtop’ helpful to see which process is running on which GPU.

Does it matter which device claims the spot ot “Device 0”? Because if it does, then I got an idea…
image

I don’t think so, my nvidia GPU is also on top. I use it either as pass-through or for prime offloading, and have no issues with it being picked as default.

Work-around:
Thank you random dude in 2019 on the steam forums

  1. Figure out what GPU is what
  2. Launch steam from terminal like DRI_PRIME=x steam with x being the GPU of choice

Well that’s the same as what switcherooctl launch would do…

1 Like