mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-11-18 06:44:05 +01:00
Support setting the X3D V-Cache Mode
This commit is contained in:
@@ -70,4 +70,16 @@
|
||||
<annotate key="org.freedesktop.policykit.exec.path">@LIBEXECDIR@/platprofctl</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
|
||||
<action id="com.feralinteractive.GameMode.x3dmode-helper">
|
||||
<description>Modify the AMD X3D cache mode</description>
|
||||
<message>Authentication is required to modify AMD X3D cache mode</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>no</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">@LIBEXECDIR@/x3dmodectl</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
/*
|
||||
* Allow users in privileged gamemode group to run cpugovctl &
|
||||
* gpuclockctl without authentication
|
||||
* Allow users in privileged gamemode group to run gamemode utilities
|
||||
* (cpugovctl, gpuclockctl, cpucorectl, procsysctl, platprofctl, x3dmodectl)
|
||||
* 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" ||
|
||||
action.id == "com.feralinteractive.GameMode.procsys-helper" ||
|
||||
action.id == "com.feralinteractive.GameMode.profile-helper") &&
|
||||
action.id == "com.feralinteractive.GameMode.profile-helper" ||
|
||||
action.id == "com.feralinteractive.GameMode.x3dmode-helper") &&
|
||||
subject.isInGroup("@GAMEMODE_PRIVILEGED_GROUP@"))
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
|
||||
Reference in New Issue
Block a user