Run wine games (DXVK) by integrated GPU

I have a laptop with AMD Ryzen 7 4800h (has iGPU) and gtx 1660 ti. I installed nvidia proprietary drivers. The default behavior for starting wine games (in lutris and in steam (proton)) is that they use dGPU automatically without telling them to use it. This is great for most of the time, but when I’m travelling and laptop is on battery, when I want to play some simple 2D games, I would like them to run on iGPU. When they run on dGPU my whole battery is consumed in just an hour.
How could I achieve telling game to use my integrated GPU?

I don’t have hybrid GPU, but I believe there a PRIME Profiles menu in nvidia-settings to select between power saving or performance.

1 Like

I do not understand why you would be using that system for power hungry gaming when traveling. If you do not have a power source then it would be a lot smarter to use it in a way that does not drain the battery quickly, such as a less demanding game or simply reading or something similar.

The suggestion to use nvidia settings for power saving mode is one option, as is setting the system in gnome settings → power to the ‘power saver’ mode.

That is why I said I would play simple 2D games that run quiet on iGPU. But they are making dGPU work so power consumption goes high.
Edit: Even simple 2D games are being rendered by dGPU by default.

unfortunately there isn’t PRIME Profiles menu in nvidia-settings. I installed nvidia by RPM Fusion

When you installed the nvidia driver did you by chance set it as the primary GPU? If you did then it will always be used.

What I always do with a laptop with nvidia dGPU is to copy the /usr/share/X11/xorg.conf.c/nvidia.conf file to /etc/X11/xorg.conf.d/nvidia.conf. Then when I reboot the nvidia config is set properly.

In the case where I want the nvidia GPU to be primary I add this
Option "Primary" "yes"
to both stanzas in that file, but if I do not desire it to be the primary usage gpu but to allow the IGP to function instead I do not put that in the file.

If you did not copy that file then it is possible the auto config is making it primary for you.

There is also a difference in the way the system uses the video devices when running xorg vs wayland, and you have not said which you are using. The features needed for some games will only function on the dGPU which may also be a factor.

All these variables that affect operation and you will need to rule out each one, one at a time.

Thanks for trying to help me. I’m using Wayland at the moment. In nvidia-smi I can see that only games are running on Nvidia GPU. I didn’t copy and set my Nvidia to be primary. In about page I can still see Amd as first GPU followed by “/Nvidia…” Running glx gears make it run on iGPU by default. So it must be some wine configuration that makes dgpu to be selected as default card.

After several days of heavy googling I found solution to my problem. I need to set in environmental variables or in launch options: VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json

And the game will be forced to open on integrated gpu.
Thanks again for everyone trying to help