8000 Add option to un/mask power-profiles-daemon · aroundthfur/auto-cpufreq@1aed0f7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1aed0f7

Browse files
committed
Add option to un/mask power-profiles-daemon
1 parent ec4556c commit 1aed0f7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

auto-cpufreq-installer

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ function tool_remove {
184184
[ -f $stats_file ] && rm $stats_file
185185

186186
# enable GNOME power profiles in case it was disabled by auto-cpufreq
187+
systemctl unmask power-profiles-daemon
187188
systemctl start power-profiles-daemon
188189
systemctl enable power-profiles-daemon
189190

auto_cpufreq/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,6 @@ def gnome_power_disable_live():
10931093
if(gnome_power_stats == 0):
10941094
print("Disabling GNOME power profiles")
10951095
call(["systemctl", "stop", "power-profiles-daemon"])
1096-
#call(["systemctl", "mask", "power-profiles-daemon"])
10971096
else:
10981097
print("GNOME power already disabled")
10991098

@@ -1104,6 +1103,7 @@ def gnome_power_disable():
11041103
print("Disabling GNOME 8501 power profiles")
11051104
call(["systemctl", "stop", "power-profiles-daemon"])
11061105
call(["systemctl", "disable", "power-profiles-daemon"])
1106+
call(["systemctl", "mask", "power-profiles-daemon"])
11071107
else:
11081108
print("GNOME power already disabled")
11091109

@@ -1112,6 +1112,7 @@ def gnome_power_enable():
11121112
gnome_power_stats = call(["systemctl", "is-active", "--quiet", "power-profiles-daemon"])
11131113
if(gnome_power_stats == 0):
11141114
print("Enabling GNOME power profiles")
1115+
call(["systemctl", "unmask", "power-profiles-daemon"])
11151116
call(["systemctl", "start", "power-profiles-daemon"])
11161117
call(["systemctl", "enable", "power-profiles-daemon"])
11171118
else:

0 commit comments

Comments
 (0)
0