Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Power management not working properly after upgrading from 13.2

  1. #1

    Question 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):

    Code:
    # 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:

    Code:
    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:

    Code:
    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?

  2. #2

    Default Re: Power management not working properly after upgrading from 13.2

    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.

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,746

    Default Re: Power management not working properly after upgrading from 13.2

    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

  4. #4

    Default Re: Power management not working properly after upgrading from 13.2

    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.

  5. #5
    Join Date
    Sep 2012
    Posts
    5,140

    Default Re: Power management not working properly after upgrading from 13.2

    Quote Originally Posted by heyjoe View Post
    Code:
            /usr/sbin/pm-hibernate
    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.

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,746

    Default Re: Power management not working properly after upgrading from 13.2

    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.

  7. #7

    Default Re: Power management not working properly after upgrading from 13.2

    Quote Originally Posted by arvidjaar View Post
    pm-utils had been dropped from TW ages ago. If you still has this command, it is likely leftover from 13.2.
    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


    Quote Originally Posted by gogalthorp View Post
    Maybe I misunderstood. So after the power on and before you get to a running system it reboots???
    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.

    Code:
    # 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

  8. #8

    Default Re: Power management not working properly after upgrading from 13.2

    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

  9. #9
    Join Date
    Sep 2012
    Posts
    5,140

    Default Re: Power management not working properly after upgrading from 13.2

    Quote Originally Posted by heyjoe View Post
    I don't have a separate swap partition.
    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.

  10. #10
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,387
    Blog Entries
    1

    Default Re: Power management not working properly after upgrading from 13.2

    Quote Originally Posted by heyjoe View Post
    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
    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

    Code:
    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)
    Code:
    cat /proc/cmdline

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •