solus-project / linux-steam-integration

Helper for enabling better Steam integration on Linux
GNU Lesser General Public License v2.1
432 stars 19 forks source link

Automatically scale the CPU #27

Open ikeydoherty opened 6 years ago

ikeydoherty commented 6 years ago

Bit of a "would be nice" request atm, but it would be good if we make use of a decent polkit policy and daemon to automatically adjust the CPU to a performance governer.

Additionally newer Feral Ports (such as F1 2017) will complain on startup when not using a performance governor - which is kinda irritating even if it is true.

Thus:

Have some kind of magic pony daemon that knows how many "connections" (live games) we have, and move into performance mode when loading games but not the Steam client, and restore it again when the last client is gone.

Logically we could spawn this from the shim in a fork and kill the daemon when the child steam process has exited, to ensure we always perform our cleanup. The ref count can be a very simple "i have a connected socket and I live in a registered Steam installation path"

joebonrichie commented 6 years ago

I think x86_energy_perf_policy from linux-tools does something like this. I believe software has to specific a preference of MSR_IA32_ENERGY_PERF_BIAS for it to work (not sure on this), and, i'm not sure how many applications support it. Worth investigating at the very least.