protonscr

How to use intel gpu for the client.

steamopen Steam clientDistro Family: Arch
ValveSoftware/steam-for-linux#11478 · opened 2024-11-17 by alexzk1 · updated 2024-12-09 · 4 comments · github
Aalexzk1 2024-11-17 github

Your system information

Steam Beta Branch: Steam Beta Update
Steam Version: 1731716808
Steam Client Build Date: Sat, Nov 16 00:15 UTC -08:00
Steam Web Build Date: Sat, Nov 16 02:11 UTC -08:00
Steam API Version: SteamClient021
Arch linux
GPU: Intel + NVIDIA

Not so long ago steam GUI client started to use NVIDIA gpu (which I see by hardware led ON). GPU intensive games start to lag 10-20 mins heavy.
Before that I had ALL GUI apps running on Intel and games only were using nvidia prime.
So question is how to revert this back and enforce this fancy store to use Intel GPU ?
I tried things like

PrefersNonDefaultGPU=false
X-KDE-RunOnDiscreteGpu=false

And it didn't work.
P.S. would be great if steam completely unloads it's GUI when game is started as I could do 2 years ago.

Aalexzk1 2024-11-17 github

This script releases nvidia GPU (led is immediately off):

NAME=steamwebhelper
HELPER=/home/alex/.local/share/Steam/ubuntu12_64/$NAME

chmod -x $HELPER
killall -9 $NAME

Reverse script turns it back on.
So it seems webhelper enumerates GPUs and keeps it ON. This is bad. Because it is extra electricity for nothing, if I forgot to turn off steam before sleep, it will be full game price during the 1 month.

Aalexzk1 2024-11-17 github

Probably we need more tests, but I just run "TESO" for a hour, usually it was stuttering in 20-30 mins last couple weeks. Once I killed steam by script above, all is perfect as it was before.
Please, revise how you use GPUs. It is critical on laptops and/or on GPUs with low memory like 4Gbs.

Aalexzk1 2024-12-09 github

So what I see here, GPU process
image
Opens files related to nvidia on sysfs:
image
And this powers ON dedicated card, which is bad for temperature, power consumption etc on laptop. Unacceptable to waste my resources in such way :/
Also I turned OFF ALL switches into "interface" settings.

Aalexzk1 2024-12-09 github

Update, fixed issue using chatGPT and apparmor, the rule is:

/home/alex/.local/share/Steam/ubuntu12_64/steamwebhelper {
    # Запрет на доступ ко всем устройствам NVIDIA
    deny /dev/nvidia0 rw,
    deny /dev/nvidiactl rw,
    deny /dev/nvidia-modeset rw,
    deny /dev/nvidia-uvm rw,
    deny /dev/nvidia-uvm-tools rw,
    deny /dev/nvidia-caps/* rw,

    # Разрешить всё остальное
    file,
    network,
    capability,
    signal peer=steam,
    signal peer=unconfined,
    signal peer=/home/alex/.local/share/Steam/ubuntu12_64/steamwebhelper,
}
  • Change path to what you have there in fact.
    ** Deny list in full you can get by doing ls -l /dev/nvid*

Nothing extracted yet.