Sample Header Ad - 728x90

acpitool -S: solution to problem of a laptop that won't hibernate properly?

0 votes
0 answers
75 views
I have been struggling for over a month with a new Lenovo Thinkpad P16 Gen2 laptop running Ubuntu 22.04 LTS, that **would not successfully suspend**. Maybe 90% of the time it worked okay, the other 10% reboot was necessary. This was unacceptable to me. Eventually, I decided it would be worthwhile to hibernate the machine instead of suspending it. I had to disable Secure Boot to do so. As this is a home computer I thought the risk was small. *I have started four or five posts here looking for a solution with nothing found. Sorry if the admins of this page have a problem with this, but each post interrogated a different aspect of the problem.* However, the sudo systemctl hibernate command did not work. The computer would save its state and immediately wake up. Not what I wanted. It was suggested that I disable wakeup on the devices listed as enabled in the output of acpitool -w |grep enabled. But one of these devices would not disable wakeup with the acpitool -W command. So still no acceptable hibernation. Then, by chance, I looked at the man page of acpitool where I came upon > **-S, --suspend to disk** ? > Put the machine into sleep state S4, if possible. Requires write access to /proc/acpi/sleep (kernel 2.4.x) or /sys/power/state (kernel > 2.6.x) **This proved to be a solution to my problem.** Unlike sudo systemctl hibernate, sudo acpitool -S achieves hibernation and successfully returns from it when the power is turned on. The only problem here is I'm not sure how to enable it in the Ubuntu Gnome GUI. But I can't find anything about this on the internet other than the man page. I still have these questions: **I am not sure what the difference between the two commands is internally and would like to know.** **I'd also like to know if there are any bad side effects I might encounter in using this command.** **UPDATE:** In response to the request of @waltinator I have the following data: 1. journal after sudo acpitool -S: $ sudo journalctl --since="-5 minutes" | pastebinit https://paste.ubuntu.com/p/CJq9YFKmbB/ 2. journal after sudo systemctl hibernate: $ sudo journalctl --since="-5 minutes" | pastebinit https://paste.ubuntu.com/p/432vmz2xqJ/ 3. here is a pastebin from a week ago when I still was trying to use suspend: $ journalctl --boot=-1 | tail -n 2000 | pastebinit https://paste.ubuntu.com/p/QdDYcKGNGw/ **UPDATE 2:** Having now looked at the first and second pastebins, I can see that acpitool takes a much simpler and more direct (close to the metal) approach than does systemctl hibernate. It gets right down to business and by Line 21 is attempting to put the system into sleep state S4, which succeeds. systemctl hibernate on the other hand, does a lot of messing about with the network interface, eventually deciding to wake back up at line 101. I am not sure why it would do this since the point of hibernate is described as turning the machine off once the state is saved. It seems to me that systemctl is sharing code between suspend and hibernate. I am not sure what the intention of the developers was but this seems like a bug to me. The use case of a single user wanting to just save state and then turn the machine off is not properly supported.
Asked by Steve Cohen (519 rep)
Mar 9, 2025, 02:04 PM
Last activity: Mar 13, 2025, 11:29 PM