this post was submitted on 10 Jul 2025
40 points (87.0% liked)

Linux Gaming

19976 readers
237 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

No memes/shitposts/low-effort posts, please.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 2 years ago
MODERATORS
 

[SOLVED] The custom launch command below works to force it to use the correct GPU!

DXVK_FILTER_DEVICE_NAME="NVIDIA GeForce RTX 4090 Laptop GPU" %command%

[ORIGINAL] So, I have this new laptop I got which has an NVIDIA RTX 4090M GPU, and also an integrated Intel GPU. Obviously, I only want to use the Intel GPU for less intensive apps, and to use the NVIDIA GPU for games or other intensive applications, such as AI.

Through trial, error, and lucky searches on the internet, I figured out some things that do and don't work.

  • Plugging in the laptop makes the NVIDIA GPU run much faster
  • The default Fedora NVIDIA drivers work fine, I don't need to install any alternatives
  • To make a normal app use the GPU, all I have to do is right click the icon and click 'Launch with discrete GPU' (on GNOME), or to make it open with discrete GPU by default (and launching with the integrated GPU would be an option in the context menu), I have to copy the desktop file to ~/.local/share/applications, and edit the .desktop file so it contains the line PrefersNonDefaultGPU=true
  • For Steam apps, the previous method doesn't work (for some reason - maybe it uses a custom launch process?), but after trying many different ways, I was able to get most Steam apps to use the correct GPU (GPU 0) by adding the custom launch option PROTON_USE_WINED3D=0 %command%
  • For some reason, this doesn't work for Hogwarts Legacy. It, of all games, really wants to use the Intel graphics - even with the custom launch command, PrefersNonDefaultGPU=true, and in game setting the preferred GPU to my NVIDIA one - yes, it is listed and recognised in game - I can tell both from the Resources app and the abysmal performance that my NVIDIA GPU is not being used and my Intel GPU is
  • Other apps like Portal RTX, The Witcher 3, ComfyUI (running through Krita AI Diffusion), Blender, and Civilisation 6 are running great with the NVIDIA GPU
  • I do not have prime-run installed and do not need it

My laptop model is MEDION Beast X40.

I'm honestly at my wits end.

Any suggestions?

top 12 comments
sorted by: hot top controversial new old
[–] bjoern_tantau@swg-empire.de 34 points 2 days ago

Rowling striking again with her TERF views that only integrated GPUs matter.

[–] just_another_person@lemmy.world 23 points 2 days ago (1 children)
[–] TheLeadenSea@sh.itjust.works 21 points 2 days ago (1 children)

Thanks so much! That page enabled me to try the launch command DXVK_FILTER_DEVICE_NAME="NVIDIA GeForce RTX 4090 Laptop GPU" %command% which fixed it!

[–] just_another_person@lemmy.world 17 points 2 days ago

👍

Always check ProtonDB when in doubt. Add your comments as well to let other users know it worked as they may be in a similar situation.

[–] Duke_Nukem_1990@feddit.org 16 points 2 days ago (2 children)

Ewww I hope you pirated that POS game.

[–] iAmTheTot@sh.itjust.works 3 points 1 day ago

Even the cracker is an unapologetic transphobe and Rowling supporter. Downloading their crack felt just as dirty to me as buying it.

It's pretty fun, and I think the studio that made it is located near me.

[–] sunzu2@thebrainbin.org 7 points 2 days ago

The comments here really helpful lol

[–] Dima@feddit.uk 4 points 1 day ago* (last edited 1 day ago) (1 children)
  • For Steam apps, the previous method doesn't work (for some reason - maybe it uses a custom launch process?), but after trying many different ways, I was able to get most Steam apps to use the correct GPU (GPU 0) by adding the custom launch option PROTON_USE_WINED3D=0 %command%

Steam runs the commands to launch the games directly, so editing .desktop files won't affect anything launched through steam directly.
PROTON_USE_WINED3D=0 is related to the graphics back ends, so I wouldn't use it for selecting the GPU, as, while it might work for making a game use the dedicated GPU, it probably won't work reliably as you've discovered. For setting a game to run on the NVIDIA GPU I think PRIME and NVIDIA Optimus are the solution, but I can't help you much since all my systems have only a single GPU enabled. One of the following 3 launch options in steam should work:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only %command%

DRI_PRIME=1 %command%

prime-run %command%

[–] TheLeadenSea@sh.itjust.works 2 points 1 day ago* (last edited 1 day ago) (1 children)

I did actually try all those other commands, and they didn't work, that was when I discovered that I didn't have prime-run installed and didn't need it. If this command works, I'm not going to mess with it, lol.

But thanks for all your intended help!

[–] Dima@feddit.uk 2 points 1 day ago (1 children)

Fair enough, but I think the DXVK_FILTER_DEVICE_NAME command you've got now will only work for DXVK, if you launch a game that uses vulkan directly (rather than via translating DirectX calls through DXVK) you might possibly find the game running on the wrong GPU, just bare that in mind

[–] TheLeadenSea@sh.itjust.works 2 points 1 day ago

I guess I'll have to figure that out if I want to get a new game to run, then, but all my current games are working.