Closed RobK88 closed 4 years ago
Autopoweroff calls an external command to perform an action which is, as root (assuming you are running a recent version of Autopoweroff): echo -n mem >/sys/power/state
. Try this command as root with kernel 4.9.240; if you have the same behaviour, then there is an incompatibility between your laptop and the new kernel. Let me know how it goes.
You could replace the command to suspend with one that works for you in the GUI. The command I provided, the default for "Sleep" works for kernel 5.4.0-52.
Thanks for the reply. As root, I tried echo -n mem >/sys/power/state Sometimes, it worked and sometimes it did not. It was unpredictable.
By the way, here are details on the problematic kernel:
$ uname -a Linux antix1-laptop 4.9.240-antix.1-486-smp #1 SMP Mon Oct 19 06:12:43 EDT 2020 i686 GNU/Linux
I replaced the suspend command with "sudo pm-suspend" in autopoweroff. It appears to work! I am using the latest version of autopoweroff - version 3.2.1
So it looks like the 4.9.240 kernel may be the problem. It does not like "echo -n mem >/sys/power/state" on this old 32-bit laptop.
P.S. I see you intend to move to systemd. I hope that means that you will not abandon init.d support.
Glade you found the source of the problem. As for init.d... for now, I notice that systemd takes care of old init.d configurations, so I will leave it as is (I have more important stuff to work on). I could always offer both system; no need to delete init.d stuff, now that I know someone wants to still make use of it. :)
I am running antiX Linux 19.3 (which is based on Debian Buster) on a 32-bit laptop.
After upgrading my kernel from 4.9.221 to 4.9.240, autopoweroff no longer works. Even if I manually click suspend in the autopoweroff GUI, my laptop never goes into suspend or sleep. Instead, the display goes blank and the PC remains fully powered. I cannot get out of this state by pressing a key on the keyboard. I must do a hard shut-down (i.e. I must force the laptop to power down by holding the power button for 5 seconds or so).
P.S. I can open a terminal and go into suspend mode using the "sudo pm-suspend" command. So suspend does work.
If I go back to the 4.9.221 kernal, autopoweroff works as expected.