deragon / autopoweroff

Manage automatic poweroff and other actions (suspend / custom) when specific conditions are reunited.
GNU General Public License v2.0
52 stars 7 forks source link

No action period & timouts no function #27

Closed Tennissocke closed 2 years ago

Tennissocke commented 2 years ago

Ubuntu 20.04

No action period & timouts Start hour:2 End hour:10 Idle time:0 Boot delay:10 Action: Sleep

after the start of autopoweroff, it goes into sleep mode in 10 minutes, it stays in standby mode forever.

022-01-24 20:05:16,406 - Autopoweroff - INFO - Autopoweroff started with PID '6652'. 2022-01-24 20:05:16,406 - Autopoweroff - INFO - Logging configuration file used: /etc/autopoweroff/autopoweroff-logging.conf 2022-01-24 20:05:16,407 - Autopoweroff - INFO - Reading configuration file: /etc/autopoweroff/autopoweroff.conf 2022-01-24 20:05:16,408 - Autopoweroff - INFO - Command to execute when all conditions are met: echo -n mem >/sys/power/state 2022-01-24 20:05:16,409 - apo.observer.hosts.alive - INFO - Initializing. 2022-01-24 20:05:16,410 - apo.observer.hosts.alive - INFO - ApoObserverHostsAlive.run(): Check on [] started. 2022-01-24 20:05:16,411 - apo.observer.noaction.timerange - INFO - ApoObserverNoActionTimeRange.run(): started. 2022-01-24 20:05:17,434 - apo.observer.resources - INFO - ApoObserverResources.run(): started. 2022-01-24 20:05:17,434 - Autopoweroff - INFO - Startup sleep of 10 minutes.

deragon commented 2 years ago

Mmm... the most recent version of Autopoweroff (built from the source; package not yet released) shows:

2022-01-30 17:25:03,485 - Autopoweroff - INFO - Startup sleep of 5 minutes.
2022-01-30 17:30:03,586 - Autopoweroff - INFO - Conditions have changed.  New conditions:
2022-01-30 17:30:03,586 - Autopoweroff - INFO -   ✓ Currently out of 'No ActionTimeRange'.
2022-01-30 17:30:03,587 - Autopoweroff - INFO -   ✘ Last event time happened over 0.0 mins, lower than configuration IdleTime parameter set to 15 mins.
2022-01-30 17:30:03,587 - Autopoweroff - INFO -   ✓ Resources are meeting conditions (CPU check disabled).

In my case, the fact I am typing on the keyboard and using my mouse all the time prevents Autopoweroff to kick in. Could that be your problem? What have you changed in your configuration?

Tennissocke commented 2 years ago

I misunderstood it and only focused on the time but not on the standby in x minutes. thanks now it works