Steam for Linux

Steam for Linux

Do you guys know how to permanently renice all games launched from steam?
I get audio fry when playing a game while listening to a podcast or whatever. I played with Pipewire but the issue was that the game was set to low priority. If I set it to normal it's fine. I don't really want to do it every time though. The renice command doesn't permanently change it either.
< >
Mostrando 1-9 de 9 comentarios
Thiesen 5 ENE a las 10:28 p. m. 
Let me guess... you're using Linux Mint 22 with Pipewire?

Yeah... Pipewire sucks in LM22... I aam holding out for LM22.1 which hoopefully is due for release sometime in January...
Zyro 6 ENE a las 12:10 a. m. 
Not optimal, but if you'd nice Steam, wouldn't it pass its niceness level to its children (the games)? And why are the games set to low priority in the first place?!?
Cray 7 ENE a las 3:33 a. m. 
I believe gamemode can do this?

apt install gamemode

launch options: gamemoderun %command%

There's a settings option in /usr/share/gamemode/gamemode.ini for renicing the game process.
And note this 'lil caveat:
https://www.reddit.com/r/linux_gaming/comments/1cx8py9/remember_to_add_the_user_to_gamemode_group_using/

Tbh. I'm not sure exactly how gamemode implements this, whether it just renices the game process and leaves it at that, or if it checks for subprocesses, and whether it periodically checks for new subprocesses. Renicing a process doesn't automatically renice children it spawns, after all.

It is possible to throw something together and use it as a custom launch option to accomplish that of course, but perhaps gamemode can get the job done?
shadow_of_apollo 7 ENE a las 6:05 p. m. 
Publicado originalmente por Thiesen:
Let me guess... you're using Linux Mint 22 with Pipewire?

Yeah... Pipewire sucks in LM22... I aam holding out for LM22.1 which hoopefully is due for release sometime in January...

I switched from Mint to PopOS! but yeah I had random, different audio problems in mint a couple years ago in Mint 20, before pipewire. In this case it's just the system setting the priority to low. I wouldn't blame pipewire.
shadow_of_apollo 7 ENE a las 6:27 p. m. 
Publicado originalmente por Zyro:
Not optimal, but if you'd nice Steam, wouldn't it pass its niceness level to its children (the games)? And why are the games set to low priority in the first place?!?
Steams's niceness is automatically set to -5 while every game that launches from steam is set to +6.



Publicado originalmente por Cray:
I believe gamemode can do this?

apt install gamemode

launch options: gamemoderun %command%

There's a settings option in /usr/share/gamemode/gamemode.ini for renicing the game process.
And note this 'lil caveat:
https://www.reddit.com/r/linux_gaming/comments/1cx8py9/remember_to_add_the_user_to_gamemode_group_using/

Tbh. I'm not sure exactly how gamemode implements this, whether it just renices the game process and leaves it at that, or if it checks for subprocesses, and whether it periodically checks for new subprocesses. Renicing a process doesn't automatically renice children it spawns, after all.

It is possible to throw something together and use it as a custom launch option to accomplish that of course, but perhaps gamemode can get the job done?


Awesome. I'll install it and try it. A launch option would be nice if there was one. It probably copies all the games in your steam library to a .config and runs htop piped into renice on a loop, or something similar to that.
shadow_of_apollo 7 ENE a las 8:00 p. m. 
Publicado originalmente por Cray:
I believe gamemode can do this?

apt install gamemode

launch options: gamemoderun %command%

There's a settings option in /usr/share/gamemode/gamemode.ini for renicing the game process.
And note this 'lil caveat:
https://www.reddit.com/r/linux_gaming/comments/1cx8py9/remember_to_add_the_user_to_gamemode_group_using/

Tbh. I'm not sure exactly how gamemode implements this, whether it just renices the game process and leaves it at that, or if it checks for subprocesses, and whether it periodically checks for new subprocesses. Renicing a process doesn't automatically renice children it spawns, after all.

It is possible to throw something together and use it as a custom launch option to accomplish that of course, but perhaps gamemode can get the job done?

I take back my guess on how it works. I think the reddit post is a little out of date. It says the group doesn't exist.

less /etc/group doesn't show it, but it does show games. which gamemoderun says it's under /usr/games/gamemoderun.

I'll run it without the usrmod command and with and see if either do anything.
shadow_of_apollo 7 ENE a las 11:11 p. m. 
The problems solved. I don't know why. gamemode wasn't initially working. I was having problems even manually changing the priority from the terminal or system monitor gui. It wouldn't stick even though it said it did. As soon as I changed windows and asked the nice value again it showed the old value.

What I'm going to say now doesn't make any sense to me, but it's the last thing I did so I'm going to say it anyways.

I use Tilix. When I noticed the renice command wasn't sticking nor changing it in sysmonitor I eventually tried it in "Terminal". It worked. So there was some issue with Tilix. I looked for system files that controlled how Tilix worked and found one in /usr/shared/applications called
com.gexperts.Tilix.desktop. I basically just searched the whole root directory for anything that had the word Tilix in it.

I opened the file and saw one of the lines said Terminal=false. I thought that was wrong because this was a terminal. I changed it to true. It worked. I could change the nice value.

Why did this affect System Monitor? I don't know. How did it make steam launch the games in high priority? I don't know.
Cray 8 ENE a las 6:28 a. m. 
Publicado originalmente por shadow_of_apollo:
I don't know why. gamemode wasn't initially working.

Something was missing in the reddit link, and for some reason I thought they mentioned it, but they didn't:

You have to give your user permission to set its own processes to priorities lower than 0, which normally requires sudo/root. Same ususally goes for setting a process priority back to 0 if it was raised (the latter which you are allowed to do without sudo).

So just add this line to /etc/security/limits.conf :

myuser - nice -5

That limit takes effect after logging out and back in, and allows you to renice to -5 without sudo, and gamemode can then also use it.

Haven't used it much, but I tested it now and gamemode does in fact renice all subprocesses when it launches, so it should take care of the game in its entirety.
Última edición por Cray; 8 ENE a las 6:36 a. m.
shadow_of_apollo 8 ENE a las 6:05 p. m. 
Thanks for the help. I ended up doing that. Now everything starts at a higher priority. Had the audio issues show up again but putting the launch command in solved it.
< >
Mostrando 1-9 de 9 comentarios
Por página: 1530 50