Steam Deck

Steam Deck

Feature Request: Enable/Disable CPU Cores & CPU Governor Selection in the Right Side menu
I currently have a cpl of scripts to enable / disable CPU cores and select different CPU governor, and I have to do this manually.

It would be nice to have it as part of the right side menu together with other performance related as part of the per app config feature.
< >
Showing 1-12 of 12 comments
toidi May 12, 2022 @ 2:08am 
Yeah stick it in with the clock speed settings, toggle switches for each core ore something, could lead to real gains in battery life.

There is already a governor switch in there, it doesn’t allow you to select a specific governor but does allow you to switch to a more power saving one.
retrogunner May 12, 2022 @ 7:16am 
1. feature request of you - if you don't mind, could you share your scripts here or better yet, via github/gitlab/etc.

2. feature request for valve - you'll need to use the feature request sub-discussion to this top level one. Considering the per game performance tuning is available now (no perf profile sharing yet), this would be something that falls into that perf tuning topic.
Vitameanslife May 12, 2022 @ 7:44am 
Agreed, I would really like this feature. Games like Cyber Sleuth run at like 35fps uncapped because, apparently, it was really made to run on one fast CPU core.
Last edited by Vitameanslife; May 12, 2022 @ 7:47am
Below are the scripts.

Search for !!_WRITE_YOUR_PASSWD_HERE_!! in set_core.sh and replace it with your own password.

If you haven't yet set a password, in console run "passwd" to set it. Be aware that there are no '*' shown as you type it, just press enter/return after you inserted it.

You need to create the files (pref in /home/deck/<some_folder)> , copy the content in between the == and make them executable.

To make the scripts executable run in console:
chmod u+x lsc.sh
chmod u+x _set_cores.sh
chmod u+x set_cores.sh

After that you must add them as a non steam game and supply the no of cores as an additional parameter.

Expected console call:

All cores enabled:
./set_cores.sh 8

Only 4 enabled:
./set_cores.sh 4

Only 1 enabled:
./set_cores.sh 1

etc.

Good Luck & Have Fun
---------------------------------------

File name: "lsc.sh" <= prints status
==============
#!/bin/sh
lscpu | grep "line CPU"
==============

File name: "_set_cores.sh" <= set the cores to enabled/disabled state
==============
#!/bin/sh
for ((i=1; i<__SU_SC_PARAMS; i++)); do
echo ENABLE CORE "$i"
echo 1 > /sys/devices/system/cpu/cpu$i/online
done

for ((i=__SU_SC_PARAMS; i<8; i++)); do
echo DISABLE CORE "$i"
echo 0 > /sys/devices/system/cpu/cpu$i/online
done
===============

File name: "set_cores.sh" <= calls _set_console.sh as root
===============
#!/bin/sh
export HISTIGNORE='*sudo -S*'
export __SU_SC_PARAMS=$1
echo !!_WRITE_YOUR_PASSWD_HERE_!! | sudo -E -S -k su -m -c ./_set_cores.sh
export __SU_SC_PARAMS=
./lsc.sh
==============
Shibby May 12, 2022 @ 12:45pm 
There is a sub forum for feature requests in case you didn't notice it.
I haven't. Thank you for pointing that out. I'll post my request there too.
Shibby May 12, 2022 @ 11:53pm 
Originally posted by alexandru.stefan.miron:
I haven't. Thank you for pointing that out. I'll post my request there too.

Hopefully they add that to the system soon. I think they check that forum more than this one as well but I am not positive on that.
ReBoot May 13, 2022 @ 12:56am 
Out of curiosity: do you need scripts on Linux for that? Nailing a game to a single core on Windows (old games) is a fire-and-forget ordeal (with that fire using first-party system functionality).
I was thinking more from the power envelope perspective, such, I wanted to disable the cores all together . There is the taskset command to start a process on a set of cores, and I presume you can do that too. I could also make a script on a per game basis that first sets the core count and then launches the game. For the moment I just call it manually before starting a specific game.
ReBoot May 13, 2022 @ 1:30am 
Originally posted by alexandru.stefan.miron:
I was thinking more from the power envelope perspective, such, I wanted to disable the cores all together . There is the taskset command to start a process on a set of cores, and I presume you can do that too. I could also make a script on a per game basis that first sets the core count and then launches the game. For the moment I just call it manually before starting a specific game.
I'll take this as "yes, there is no proper way to solve this on Linux". Thanks for the info! :)
It seems that exactly what I wanted is avaiable using the PowerTools plugin. https://www.gamingonlinux.com/2022/05/powertools-is-a-steam-deck-plugin-for-power-users/
and someone already asked for such a feature officialy implemented in the Feature Request section.
Shibby May 13, 2022 @ 11:01am 
Originally posted by ReBoot:
Originally posted by alexandru.stefan.miron:
I was thinking more from the power envelope perspective, such, I wanted to disable the cores all together . There is the taskset command to start a process on a set of cores, and I presume you can do that too. I could also make a script on a per game basis that first sets the core count and then launches the game. For the moment I just call it manually before starting a specific game.
I'll take this as "yes, there is no proper way to solve this on Linux". Thanks for the info! :)

I think you are misunderstanding a part of what they are saying. They want to disable the cores for the entire system as well as just for certain games. I would imagine the main interface of the Deck doesn't need all cores and threads at all times. This would allow you to limit the Deck's power overall and not just on a per game basis when they are running. Say you are running a YouTube video and turned off some cores and threads to possibly save battery life.

In windows you would need other programs or boot into the bios to do this as well.
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: May 12, 2022 @ 1:58am
Posts: 12