Skip to content

Commit

Permalink
Add system files to set up group access for performance mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
qzed committed Feb 5, 2021
1 parent 4ae4afa commit 190f21f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/sysusers/surface-control.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
g surface-control - -
2 changes: 2 additions & 0 deletions etc/udev/40-surface-control.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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"
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 comments on commit 190f21f

Please sign in to comment.