Skip to content

Commit 190f21f

Browse files
committed
Add system files to set up group access for performance mode
Add a sysusers.d file to create a 'surface-control' group as well as udev rules to change the group ownership of the sysfs 'perf_mode' attribute to that group. This group can then be used to change the performance mode without sudo.
1 parent 4ae4afa commit 190f21f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

etc/sysusers/surface-control.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
g surface-control - -

etc/udev/40-surface-control.rules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
KERNEL=="01:03:01:00:01", SUBSYSTEM=="surface_aggregator", RUN+="/usr/bin/chmod 664 /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"
2+
KERNEL=="01:03:01:00:01", SUBSYSTEM=="surface_aggregator", RUN+="/usr/bin/chown root:surface-control /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"

0 commit comments

Comments
 (0)