After upgrading from 13.2 on my old 32 bit Acer TravelMate 2410 power management doesn’t work as expected.
I have always used acpid for the purpose of having the system hibernate automatically when the power is disconnected if the lid is closed and I have these settings and scripts for the purpose. These have always worked on 13.2 (in ‘init 5’ and in ‘init 3’ mode):
**# cat /etc/acpi/actions/hibernate.sh**
#!/bin/bash
lockfile='/tmp/hibernation_started.lock'
/usr/bin/logger 'AC power is off.'
# Is hibernation already started?
if -f "$lockfile" ]
then
/usr/bin/logger 'Hibernation already started.'
exit 0
fi
/usr/bin/touch $lockfile
# Wait a bit (it may be just a short power off)
sleep 30
# Is AC power still off?
grep -q "off-line" /proc/acpi/ac_adapter/ADP1/state
if $? = 0 ]
then
# Power is still off. Now check if laptop lid is closed
grep -q closed /proc/acpi/button/lid/LID0/state
if $? = 0 ]
then
/usr/bin/logger 'Initiating closed lid hibernation...'
/usr/bin/rm $lockfile
/usr/sbin/pm-hibernate
fi
fi
**# cat /etc/acpi/actions/online.sh **
#!/bin/bash
lockfile='/tmp/hibernation_started.lock'
/usr/bin/logger 'AC power is on.'
# Is hibernation already started?
if -f "$lockfile" ]
then
/usr/bin/logger 'Cancelling closed lid hibernation.'
/usr/bin/rm $lockfile
fi
**# cat /etc/acpi/events/ac_power_off **
event=ac_adapter ACPI0003:00 00000080 00000000
action=/etc/acpi/actions/hibernate.sh
**# cat /etc/acpi/events/ac_power_on**
event=ac_adapter ACPI0003:00 00000080 00000001
action=/etc/acpi/actions/online.sh
But now ‘journalctl -f’ is showing me a weird message when testing:
Jan 17 01:01:27 acer.group systemd-logind[909]: Lid closed.
Jan 17 01:01:35 acer.group root[3562]: AC power is off.
**Jan 17 01:01:35 acer.group systemd-udevd[3576]: Process '/usr/sbin/tlp auto' failed with exit code 4.**
**Jan 17 01:02:46 acer.group systemd-udevd[3644]: Process '/usr/sbin/tlp auto' failed with exit code 4.**
*(.... and the system doesn't hibernate... so I turn the power on again)*
Jan 17 01:02:46 acer.group root[3658]: AC power is on.
Jan 17 01:02:46 acer.group root[3659]: Cancelling closed lid hibernation.
Jan 17 01:02:52 acer.group root[3703]: AC power is off.
**Jan 17 01:02:52 acer.group systemd-udevd[3730]: Process '/usr/sbin/tlp auto' failed with exit code 4.**
And again - hibernation doesn’t work. The bolded lines are something new (after upgrading to Tumbleweed). In 13.2 there were no such errors.
Another attempt with acpid after rebooting (again) gives:
Jan 17 01:38:17 acer.group root[2070]: AC power is off.
*(... no error like before but still not hibernating)*
Jan 17 01:39:22 acer.group root[2145]: AC power is on.
Jan 17 01:39:22 acer.group root[2147]: Cancelling closed lid hiberna
I am watching the ‘journalctl -f’ from an ssh session.
I also tried manually evoking hibernation from xfce: Logout->Hibernate and it works. However when I power on the system again it is unusable - the power is on but the screen stays blank (although it is on too) and the system doesn’t react to anything I try. The only way to get out of this is through hardware reset which is terrible.
If I am not logged in XFCE and I go to the top right menu and choose Hibernate - the system hibernates. When I try to restore it, I push the power button, it wakes up, shows me shortly the Acer Bios logo (as on cold boot), then the ‘GRUB loading’ (the 2 text lines) followed by ‘Tumbleweed loading…’ (etc) then it reboots. One wouldn’t expect a self-evoked reboot after restore from hibernation.
Hibernate is a save of the memory image to swap and then a shutdown. It is then an obvious cold boot to restart. Grub then loads the image. So not at all sure what you expect
I don’t expect a double reboot after waking up the system. The way it always worked was to restore exactly the state in which the system was but as you can see it neither hibernates properly nor it restores properly.
I would try pure kernel suspend to disk first: “echo disk > /sys/power/state” after booting into run level 3 or even 1.
Hm. What is that supposed to do?
I tried it after reading your post and the result is power down. After I turned on the power again there was a quick and long text on screen (for less than 1 second, so I couldn’t read it) and then the PC rebooted itself. The final result is: as if I have done a regular reboot
Yes, it reboots instead of restoring the system state.
Did you allow enough space in swap to hold all the memory?? Upgrading from 13.2 to TW is a bit iffy. TW is way way ahead of 13.2 now.
I don’t have a separate swap partition. I never had one and it has never been a problem although the computer has only 512mb ram.
In XFCE I do: Logout -> Suspend (not hibernate) and the system suspends as expected
Upon waking up the screen stays not only blank but completely powered off and no matter what I press or click it stays like that. I also tried Alt+Ctrl+F1, 2, 3… - nothing, still off. However the system seems to respond to keyboard input because after pressing Alt+ctrl+F1 again I was able to reboot it using Ctrl+Alt+Del
Then you probably need to explain how did you hibernate in the first place. Hibernation requires some disk space to save memory. Normally it is either swap or unused disk partition.
# fdisk -l
Disk /dev/sda: 37.3 GiB, 40007761920 bytes, 78140160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x20a0209f
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 2105343 2103296 1G 82 Linux swap / Solaris
/dev/sda2 * 2105344 18876415 16771072 8G 83 Linux
/dev/sda3 18876416 78139391 59262976 28.3G 83 Linux
I added this file and rebooted. X won’t start at all.
BTW, what do your current boot parameters look like? (Just in case tweaking is needed)
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.9.0-1-default root=UUID=.....(not sure if this should be public, so I remove it) resume=/dev/sda1 splash=verbose quiet showopts plymouth.enable=0
I added this file and rebooted. X won’t start at all.
Ok, just remove it then.
BOOT_IMAGE=/boot/vmlinuz-4.9.0-1-default root=UUID=.....(not sure if this should be public, so I remove it) resume=/dev/sda1 splash=verbose quiet showopts plymouth.enable=0
I wouldn’t get too paranoid about that. At least it shows that the swap partition is defined (for hiberantion).
You leave a bunch of junk in by upgrading. A fresh install will be both easier and probably won’t see as many problems. It was recommended you do a fresh install.
If you think it is user settings try a different user.
Sometimes old hardware has quirks that need various workarounds. With the move to systemd, some of the old methods won’t work, or may conflict with it. I’d be inclined to remove apcid entirely, or try Gogalthorp’s suggestion of a clean install (backing up any important data first). There are boot parameters that may help with the backlight/ACPI issue, but we’re in the realms of experimentation with this. Some online research will be involved.
This is what your pm-hibernate did after executing a lot of other scripts. Unless it was configured to use user-level suspend. So it just shortcuts it to make sure none of pm-utils scripts interfere.
I tried it after reading your post and the result is power down. After I turned on the power again there was a quick and long text on screen (for less than 1 second, so I couldn’t read it) and then the PC rebooted itself. The final result is: as if I have done a regular reboot
This is consistent with your other experience and points to kernel problem. Unfortunately debugging of suspend/resume problems is very hard, especially if you do not have some way of capturing early console output. The first thing to do is to try some older kernel (as it did work in the past it may be kernel regression). Do you have 32 or 64 bit system?
I don’t quite understand what you are talking about. Could you please explain?
This is consistent with your other experience and points to kernel problem. Unfortunately debugging of suspend/resume problems is very hard, especially if you do not have some way of capturing early console output.
I am watching what is happening by using ‘journalctl -f’ in a ssh console connected to the laptop from my desktop machine.
The first thing to do is to try some older kernel (as it did work in the past it may be kernel regression).
I can choose an older boot image but since it has remained from 13.2 won’t it interfere inappropriately with the Tumbleweed system?
Today I tried manually running systemctl hibernate from console and it hibernates the system (tried from runlevel 3 and 5, it works). However the problem with the reboot upon wake-up remains. The system is not restored but simply boots as if starting from after shutdown.
I also tried replacing the pm-hibernate command with ‘systemctl hibernate’ in the script and tested:
Jan 19 14:40:32 acer.group systemd-logind[941]: Lid closed.
Jan 19 14:40:37 acer.group root[1964]: AC power is off.
**... waited 30 seconds and more... it was supposed to hibernate but it did not**
Jan 19 14:41:43 acer.group systemd-logind[941]: Lid opened.
Jan 19 14:41:46 acer.group root[2039]: AC power is on.
Jan 19 14:41:46 acer.group root[2040]: Cancelling closed lid hibernation.
Jan 19 14:41:46 acer.group systemd-udevd[2073]: Process '/usr/sbin/tlp auto' failed with exit code 4.
Can anyone please explain why Tumbleweed can’t do such a simple basic thing which 13.2 could?
Is there any bug which I have to report or what?
I really hope to get some help. Thank you so much.