Skip to content

Commit

Permalink
auto_cpufreq: fix hanging on --daemon, --live, and --monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeyg56 committed Apr 24, 2024
1 parent e540121 commit 00463b3
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions auto_cpufreq/bin/auto_cpufreq.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ def config_info_dialog():
battery_setup()
conf.notifier.start()
while True:
footer()
gov_check()
cpufreqctl()
distro_info()
sysinfo()
set_autofreq()
countdown(2)
try:
footer()
gov_check()
cpufreqctl()
distro_info()
sysinfo()
set_autofreq()
countdown(2)
except KeyboardInterrupt:
break;
conf.notifier.stop()
elif monitor:
config_info_dialog()
root_check()
Expand All @@ -97,15 +101,19 @@ def config_info_dialog():
gnome_power_detect()
tlp_service_detect()
while True:
time.sleep(1)
running_daemon_check()
footer()
gov_check()
cpufreqctl()
distro_info()
sysinfo()
mon_autofreq()
countdown(2)
try:
time.sleep(1)
running_daemon_check()
footer()
gov_check()
cpufreqctl()
distro_info()
sysinfo()
mon_autofreq()
countdown(2)
except KeyboardInterrupt:
break
conf.notifier.stop()
elif live:
root_check()
config_info_dialog()
Expand Down Expand Up @@ -134,7 +142,8 @@ def config_info_dialog():
except KeyboardInterrupt:
gnome_power_start_live()
print("")
sys.exit()
break
conf.notifier.stop()
elif stats:
not_running_daemon_check()
config_info_dialog()
Expand Down

0 comments on commit 00463b3

Please sign in to comment.