Add option to un/mask power-profiles-daemon
This commit is contained in:
parent
ec4556c835
commit
1aed0f7477
|
@ -184,6 +184,7 @@ function tool_remove {
|
||||||
[ -f $stats_file ] && rm $stats_file
|
[ -f $stats_file ] && rm $stats_file
|
||||||
|
|
||||||
# enable GNOME power profiles in case it was disabled by auto-cpufreq
|
# enable GNOME power profiles in case it was disabled by auto-cpufreq
|
||||||
|
systemctl unmask power-profiles-daemon
|
||||||
systemctl start power-profiles-daemon
|
systemctl start power-profiles-daemon
|
||||||
systemctl enable power-profiles-daemon
|
systemctl enable power-profiles-daemon
|
||||||
|
|
||||||
|
|
|
@ -1093,7 +1093,6 @@ def gnome_power_disable_live():
|
||||||
if(gnome_power_stats == 0):
|
if(gnome_power_stats == 0):
|
||||||
print("Disabling GNOME power profiles")
|
print("Disabling GNOME power profiles")
|
||||||
call(["systemctl", "stop", "power-profiles-daemon"])
|
call(["systemctl", "stop", "power-profiles-daemon"])
|
||||||
#call(["systemctl", "mask", "power-profiles-daemon"])
|
|
||||||
else:
|
else:
|
||||||
print("GNOME power already disabled")
|
print("GNOME power already disabled")
|
||||||
|
|
||||||
|
@ -1104,6 +1103,7 @@ def gnome_power_disable():
|
||||||
print("Disabling GNOME power profiles")
|
print("Disabling GNOME power profiles")
|
||||||
call(["systemctl", "stop", "power-profiles-daemon"])
|
call(["systemctl", "stop", "power-profiles-daemon"])
|
||||||
call(["systemctl", "disable", "power-profiles-daemon"])
|
call(["systemctl", "disable", "power-profiles-daemon"])
|
||||||
|
call(["systemctl", "mask", "power-profiles-daemon"])
|
||||||
else:
|
else:
|
||||||
print("GNOME power already disabled")
|
print("GNOME power already disabled")
|
||||||
|
|
||||||
|
@ -1112,6 +1112,7 @@ def gnome_power_enable():
|
||||||
gnome_power_stats = call(["systemctl", "is-active", "--quiet", "power-profiles-daemon"])
|
gnome_power_stats = call(["systemctl", "is-active", "--quiet", "power-profiles-daemon"])
|
||||||
if(gnome_power_stats == 0):
|
if(gnome_power_stats == 0):
|
||||||
print("Enabling GNOME power profiles")
|
print("Enabling GNOME power profiles")
|
||||||
|
call(["systemctl", "unmask", "power-profiles-daemon"])
|
||||||
call(["systemctl", "start", "power-profiles-daemon"])
|
call(["systemctl", "start", "power-profiles-daemon"])
|
||||||
call(["systemctl", "enable", "power-profiles-daemon"])
|
call(["systemctl", "enable", "power-profiles-daemon"])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue