Skip to content

Commit

Permalink
Add configuration files for systemd, dbus and polkit
Browse files Browse the repository at this point in the history
  • Loading branch information
zacikpa committed Jan 15, 2024
1 parent 986e897 commit fb81cf1
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tuned/ppd/tuned-ppd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">

<busconfig>
<policy user="root">
<allow own="net.hadess.PowerProfiles"/>
</policy>

<policy context="default">
<allow send_destination="net.hadess.PowerProfiles" send_interface="net.hadess.PowerProfiles"/>
<allow send_destination="net.hadess.PowerProfiles" send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_destination="net.hadess.PowerProfiles" send_interface="org.freedesktop.DBus.Properties"/>
<allow send_destination="net.hadess.PowerProfiles" send_interface="org.freedesktop.DBus.Peer"/>
</policy>
</busconfig>
29 changes: 29 additions & 0 deletions tuned/ppd/tuned-ppd.policy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

<vendor>TuneD</vendor>
<vendor_url>https://tuned-project.org/</vendor_url>

<action id="net.hadess.PowerProfiles.HoldProfile">
<description>Hold power profile</description>
<message>Authentication is required to hold power profiles.</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

<action id="net.hadess.PowerProfiles.ReleaseProfile">
<description>Release power profile</description>
<message>Authentication is required to release power profiles.</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

</policyconfig>
13 changes: 13 additions & 0 deletions tuned/ppd/tuned-ppd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=TuneD-to-PPD API Translation Daemon
Requires=tuned.service
Before=multi-user.target display-manager.target

[Service]
Type=dbus
PIDFile=/run/tuned/tuned-ppd.pid
BusName=net.hadess.PowerProfiles
ExecStart=/usr/sbin/tuned-ppd

[Install]
WantedBy=graphical.target

0 comments on commit fb81cf1

Please sign in to comment.