Describe the buggamemoderun does not renice all processes it should. This happens with Proton-games in Steam Flatpak, unclear if it works as intended outside of a Flatpak sandbox.
To Reproduce
1) Launch a Steam+Proton game (e.g. Worms Armageddon) with launch option: gamemoderun %command%
2) List gamemode-processes within Flatpak with gamemodelist (not available in Steam Flatpak, running it as shell script). Note that only one process (reaper) has been properly reniced to -5:
[📦 com.valvesoftware.Steam ~]$ find /proc -maxdepth 2 -type f -user "${USER}" -readable -name maps -exec awk -- '$0 ~ /libgamemodeauto\.so\.0/ {pid=FILENAME; gsub("[^0-9]", "", pid); print pid;nextfile}' {} + | xargs | xargs -I{} -- ps -o pid,ppid,user,ni,psr,comm --pid '{}'
PID PPID USER NI PSR COMMAND
71621 28806 user -5 7 reaper
71732 71698 user 0 3 python3
71734 71732 user 0 3 steam.exe
71736 71698 user 0 4 wineserver
71740 71698 user 0 2 services.exe
71743 71698 user 0 1 winedevice.exe
71753 71698 user 0 6 winedevice.exe
71766 71698 user 0 1 plugplay.exe
71772 71698 user 0 0 svchost.exe
71780 71698 user 0 11 conhost.exe
71782 71698 user 0 0 explorer.exe
71791 71698 user 0 8 rpcss.exe
71801 71698 user 0 5 tabtip.exe
71818 71698 user 0 3 WA.exe
3) The process-tree makes it clear what is going on:
Describe the bug
gamemoderun
does notrenice
all processes it should. This happens with Proton-games in Steam Flatpak, unclear if it works as intended outside of a Flatpak sandbox.To Reproduce 1) Launch a Steam+Proton game (e.g. Worms Armageddon) with launch option:
gamemoderun %command%
2) List gamemode-processes within Flatpak withgamemodelist
(not available in Steam Flatpak, running it as shell script). Note that only one process (reaper
) has been properly reniced to -5:3) The process-tree makes it clear what is going on:
Possible solution 1) Reuse
gamemodelist
script to renice relevant processes:2) Result of above in process tree:
Expected behavior Note that this behavior is not seen with native Linux games launched within the Steam Flatpak.
System Info (please complete the following information): [1] com.valvesoftware.Steam 1.0.0.78, Proton 8.0-4 or GE-Proton8-25 [2] Linux host 6.6.8-arch1-1 https://github.com/FeralInteractive/gamemode/pull/1 SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:01:01 +0000 x86_64 GNU/Linux [3] flatpak 1:1.15.6-1, gamemode 1.8.1-1, dbus 1.14.10-1