Power management not working properly after upgrading from 13.2

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.

Can someone help please?

Just noticed another strange behavior:

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.

pm-utils had been dropped from TW ages ago. If you still has this command, it is likely leftover from 13.2.

I would try pure kernel suspend to disk first: “echo disk > /sys/power/state” after booting into run level 3 or even 1.

Maybe I misunderstood. So after the power on and before you get to a running system it reboots???

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 didn’t know that. Thanks for the info.

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.


# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        237M     0  237M   0% /dev
tmpfs           244M     0  244M   0% /dev/shm
tmpfs           244M  1.3M  243M   1% /run
tmpfs           244M     0  244M   0% /sys/fs/cgroup
/dev/sda2       7.8G  5.5G  2.0G  74% /
/dev/sda3        28G   12G   16G  42% /home
tmpfs            49M     0   49M   0% /run/user/486
tmpfs            49M     0   49M   0% /run/user/0

BTW I just found one more issue.

  1. In XFCE I do: Logout -> Suspend (not hibernate) and the system suspends as expected

  2. 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.

That could be a backlight issue. I’ve seen suggestions to use a custom Xorg config file (eg /etc/X11/xorg.conf.d/20-intel.conf) with the following

Section "Device"
        Identifier  "Default Device"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection

It will take effect next time the X-server is started. See if that helps.

BTW, what do your current boot parameters look like? (Just in case tweaking is needed)

cat /proc/cmdline

Sorry, my bad! The partitioning is as follows:


# 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).

I really don’t understand why If Tumbleweed is more modern and improved it can’t even do what 13.2 could :frowning:

Any ideas what to do?

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 have already tried reinstalling from scratch and there was this problem:

https://forums.opensuse.org/showthread.php/511194-File-images-11-meta-i386-tar-xz-not-found-on-DVD-iso-and-installation-cannot-continue

which I also mentioned here:

https://forums.opensuse.org/showthread.php/522222-Upgrading-from-13-2-to-Tumbleweed-is-it-possible-recommended

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?

Do you have 32 or 64 bit system?

32 bit, as explained in the OP.

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.

It does not capture early boot messages and they are important in this case.

Looks like it.

How can I catch them?

Looks like it.

No problem but in which particular section of bugzilla to classify it?