Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TuneD detection mechanism #788

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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