Set Balanced mode on power-profiles-daemon (#349)

This commit is contained in:
bobslept 2022-01-07 21:26:39 +01:00 committed by GitHub
parent fc2d8e3645
commit 73d3c26882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -112,12 +112,18 @@ def gnome_power_detect_snap():
# disable gnome >= 40 power profiles (live)
def gnome_power_disable_live():
if gnome_power_status == 0:
call(["powerprofilesctl", "set", "balanced"])
call(["systemctl", "stop", "power-profiles-daemon"])
# disable gnome >= 40 power profiles (install)
def gnome_power_svc_disable():
if systemctl_exists:
# set balanced profile before disabling it
if gnome_power_status == 0:
call(["powerprofilesctl", "set", "balanced"])
# always disable power-profiles-daemon
try:
print("\n* Disabling GNOME power profiles")
call(["systemctl", "stop", "power-profiles-daemon"])