Renice and SCHED_ISO mode not working
Hi, dont know what I'm doing wrong but I changed the gamemode.ini file in /usr/share/gamemode to have the following options: softrealtime=auto and renice=5. After launching game on steam (flatpak) if I run systemctl --user status gamemoded I'm getting the following errors:
Jul 31 23:42:25 asishpc gamemoded[1362]: ERROR: Failed setting client [3447] into SCHED_ISO mode, ignoring error condition: Invalid argument
Jul 31 23:42:25 asishpc gamemoded[1362]: ERROR: Refused to renice client [3447,3447]: prio was (0) but we expected (-5)
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Failed to renice client [3514,3514], ignoring error condition: Permission denied
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Skipping ioprio on client [3514,3514]: ioprio was (0) but we expected (4)
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Failed setting client [3514] into SCHED_ISO mode, ignoring error condition: Invalid argument
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Refused to renice client [3514,3514]: prio was (0) but we expected (-5)
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Failed to renice client [3517,3517], ignoring error condition: Permission denied
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Skipping ioprio on client [3517,3517]: ioprio was (0) but we expected (4)
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Failed setting client [3517] into SCHED_ISO mode, ignoring error condition: Invalid argument
Jul 31 23:42:26 asishpc gamemoded[1362]: ERROR: Refused to renice client [3517,3517]: prio was (0) but we expected (-5)
What step am I missing? Any help is appreciated. Running debian bookworm with gnome, on Ryzen 5 3600 with Rx 5700 XT.
I'm getting the same log spam in my journal, but according to htop the ioprios and nice values are nevertheless being set succesfully for all relevant processes
@ojsl1 I checked in System Monitor (GUI) and the nice values were not being set to the correct values. It really seems like they're not being applied in my case.
maybe add your user to gamemode group?
sudo usermod -a -G gamemode user
My user is already in the gamemode group
This is happening to me too on Archlinux. I am running linux-pf version 6.15.0-pf4. The service journal shows:
systemctl status gamemmoded.service
● gamemoded.service - gamemoded
Loaded: loaded (/usr/lib/systemd/user/gamemoded.service; disabled; preset: enabled)
Active: active (running) since Sun 2025-07-06 19:14:11 EDT; 7min ago
Invocation: 1bd08bb99c0a4251941563b876137ad9
Main PID: 4800 (gamemoded)
Status: "GameMode is now active."
Tasks: 2 (limit: 38237)
Memory: 1.1M (peak: 4.4M)
CPU: 48ms
CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/gamemoded.service
└─4800 /usr/bin/gamemoded
jui 06 19:14:11 leviathan systemd[2199]: Starting gamemoded...
jui 06 19:14:11 leviathan systemd[2199]: Started gamemoded.
jui 06 19:14:11 leviathan pkexec[4802]: pam_unix(polkit-1:session): session opened for user root(uid=0) by simon(uid=1000)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Failed to open file for read /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Failed to call Inhibit on org.freedesktop.ScreenSaver: No route to host
jui 06 19:14:12 leviathan gamemoded[4800]: org.freedesktop.DBus.Error.ServiceUnknown
jui 06 19:14:12 leviathan gamemoded[4800]: The name is not activatable
jui 06 19:14:12 leviathan pkexec[4815]: pam_unix(polkit-1:session): session opened for user root(uid=0) by simon(uid=1000)
jui 06 19:14:12 leviathan pkexec[4822]: pam_unix(polkit-1:session): session opened for user root(uid=0) by simon(uid=1000)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Skipping ioprio on client [4797,4797]: ioprio was (0) but we expected (4)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Failed setting client [4797] into SCHED_ISO mode, ignoring error condition: Invalid argument
jui 06 19:14:12 leviathan gamemoded[4800]: -- The error indicates that your kernel may not support this. If you
jui 06 19:14:12 leviathan gamemoded[4800]: -- don't know what SCHED_ISO means, you can safely ignore this. If you
jui 06 19:14:12 leviathan gamemoded[4800]: -- expected it to work, ensure you're running a kernel with MuQSS or
jui 06 19:14:12 leviathan gamemoded[4800]: -- PDS scheduler.
jui 06 19:14:12 leviathan gamemoded[4800]: -- For further technical reading on the topic start here:
jui 06 19:14:12 leviathan gamemoded[4800]: -- https://lwn.net/Articles/720227/
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Addition requested for already known client 4797 [/usr/bin/env].
jui 06 19:14:12 leviathan gamemoded[4800]: -- This may happen due to using exec or shell wrappers. You may want to
jui 06 19:14:12 leviathan gamemoded[4800]: -- blacklist this client so GameMode can see its final name here.
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Addition requested for already known client 4797 [/usr/bin/env].
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Refused to renice client [4828,4828]: prio was (-10) but we expected (0)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Skipping ioprio on client [4828,4828]: ioprio was (0) but we expected (4)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Failed setting client [4828] into SCHED_ISO mode, ignoring error condition: Invalid argument
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Refused to renice client [4830,4830]: prio was (-10) but we expected (0)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Skipping ioprio on client [4830,4830]: ioprio was (0) but we expected (4)
jui 06 19:14:12 leviathan gamemoded[4800]: ERROR: Failed setting client [4830] into SCHED_ISO mode, ignoring error condition: Invalid argument
In my case, the process tree for my game looks like this:
[-]─3608 bash (bash /home/simon/.local/share/Steam/steam.sh -srt-logg)
│ [-]─3745 steam (/home/simon/.local/share/Steam/ubuntu12_32/steam -)
│ │ [-]─4793 vk_radv (/bin/bash /usr/bin/vk_radv gamemoderun /home/)
│ │ │ [-]─4797 reaper (/home/simon/.local/share/Steam/ubuntu12_32/)
│ │ │ │ [-]─4828 srt-bwrap
│ │ │ │ │ [-]─4904 pv-adverb
│ │ │ │ │ │ [-]─5011 GZWClientEAC.ex (Z:\home\simon\.local\shar)
│ │ │ │ │ │ │ └─ 5063 GameThread (Z:\home\simon\.local\share\)
So, it seems like some processes in the tree have not be successfully reniced or affected by SCHED_ISO policy. But also, the actual game process of PID 5063 is mentioned no where.
I looked at the niceness for process 5063 and I found -1:
> ps ax -o pid,ni | grep 5063
5063 -1
Is this expected?
I took a look at scheduling info for PID 5063 and I found:
cat /proc/5063/sched
GameThread (5063, #threads: 173)
-------------------------------------------------------------------
se.exec_start : 923239.273705
se.vruntime : 2298630.695992
se.sum_exec_runtime : 87099.316249
se.nr_migrations : 66169
nr_switches : 1035941
nr_voluntary_switches : 1013854
nr_involuntary_switches : 22087
se.load.weight : 1307648
se.avg.load_sum : 4923
se.avg.runnable_sum : 5067116
se.avg.util_sum : 5067116
se.avg.load_avg : 134
se.avg.runnable_avg : 108
se.avg.util_avg : 108
se.avg.last_update_time : 922514179072
se.avg.util_est : 102
uclamp.min : 0
uclamp.max : 1024
effective uclamp.min : 0
effective uclamp.max : 1024
policy : 0
prio : 119
se.slice : 3000000
ext.enabled : 0
clock-delta : 30
mm->numa_scan_seq : 0
numa_pages_migrated : 0
numa_preferred_nid : -1
total_numa_faults : 0
current_node=0, numa_group_id=0
numa_faults node=0 task_private=0 task_shared=0 group_private=0 group_shared=0
Could these configs taken on the Arch wiki be conflicting with setting the scheduler policy to SCHED_ISO ? I don't believe so since they're actually suggested in the same wiki page along side setting scheduling policy to SCHED_ISO below.
Also, schedtool 4793 4797 4828 4904 5011 5063 shows:
PID 4793: PRIO 0, POLICY N: SCHED_NORMAL , NICE 0, AFFINITY 0xffffff
PID 4797: PRIO 0, POLICY N: SCHED_NORMAL , NICE -10, AFFINITY 0xffffff
PID 4828: PRIO 0, POLICY N: SCHED_NORMAL , NICE -10, AFFINITY 0xffffff
PID 4904: PRIO 0, POLICY N: SCHED_NORMAL , NICE -10, AFFINITY 0xffffff
PID 5011: PRIO 0, POLICY N: SCHED_NORMAL , NICE -10, AFFINITY 0xffffff
PID 5063: PRIO 0, POLICY N: SCHED_NORMAL , NICE -1, AFFINITY 0xffffff
My /etc/gamemode.ini config has
softrealtime=on
renice=10
So it seems some of thhe processes have their niceness levels set, but not all of them. The actual most important one has nicesness -1 instead of -10. And none have SCHED_ISO set.
My groups list shows that gamemode is set:
simon scanner transmission cups realtime gamemode docker saned video lp input wheel
Also, I just noticed that schedtool -r shows:
N: SCHED_NORMAL : prio_min 0, prio_max 0
F: SCHED_FIFO : prio_min 1, prio_max 99
R: SCHED_RR : prio_min 1, prio_max 99
B: SCHED_BATCH : prio_min 0, prio_max 0
I: SCHED_ISO : policy not implemented
D: SCHED_IDLEPRIO: prio_min 0, prio_max 0
So, SCHED_ISO doesn't seem implemented? I thought linux-pf had that scheduling policy activated. Any tips?