gamemode/data/polkit/rules.d/gamemode.rules.in
Henrik Holst dc2f7bbcd0 added polkit rules for cpucorectl
added polkit rules so we can run the cpucorectl utility without being root
2023-12-04 14:18:38 +00:00

14 lines
470 B
Plaintext

/*
* Allow users in privileged gamemode group to run cpugovctl &
* gpuclockctl without authentication
*/
polkit.addRule(function (action, subject) {
if ((action.id == "com.feralinteractive.GameMode.governor-helper" ||
action.id == "com.feralinteractive.GameMode.gpu-helper" ||
action.id == "com.feralinteractive.GameMode.cpu-helper") &&
subject.isInGroup("@GAMEMODE_PRIVILEGED_GROUP@"))
{
return polkit.Result.YES;
}
});