Skip to content

Commit

Permalink
Improve tuned detection (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
geragio authored Nov 4, 2024
1 parent 41081a5 commit d45a318
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions auto_cpufreq/power_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def gnome_power_start_live():
if systemctl_exists: call(["systemctl", "start", "power-profiles-daemon"])

def tuned_start_live():
if systemctl_exists: call(["systemctl", "start", "tuned"])
if systemctl_exists and tuned_stat_exists:
call(["systemctl", "start", "tuned"])

# enable gnome >= 40 power profiles (uninstall)
def gnome_power_svc_enable():
Expand All @@ -127,13 +128,13 @@ def gnome_power_svc_enable():
print(GITHUB+"/issues")

def tuned_svc_enable():
if systemctl_exists:
if systemctl_exists and tuned_stat_exists:
try:
print("* Enabling TuneD\n")
call(["systemctl", "unmask", "tuned"])
call(["systemctl", "enable", "--now", "tuned"])
except:
print("\nUnable to enable GNOME power profiles")
print("\nUnable to enable TuneD daemon")
print("If this causes any problems, please submit an issue:")
print(GITHUB+"/issues")

Expand Down

0 comments on commit d45a318

Please sign in to comment.