Hibernate does not appear to completely shut down

Discussion in 'Linux Compatibility and Software' started by rlk, Jan 5, 2018.

  1. rlk

    rlk Notebook Consultant

    Reputations:
    29
    Messages:
    230
    Likes Received:
    87
    Trophy Points:
    41
    When I hibernate my Lenovo ThinkPad P70 (openSUSE 42.3), the machine does seem to shut down (in terms of everything, including the LEDs, turning off). However, closing and opening the lid results in the system powering on and booting, but without ever giving me the UEFI BIOS screen, so not allowing me to boot something else (or look at/play with the BIOS settings). I'm aware of the risks of booting something else that writes on my hibernation partition and filesystems (and that changing BIOS settings could mess with things too), which would completely mess everything up, but I want to have the option to take that risk if I know what I'm doing.

    Also, I don't want merely opening the lid to boot the laptop; I want to have to press the power button.

    I don't remember offhand what Windows does in this situation.

    The same OS load on my previous Dell Precision M6500 (which has a conventional BIOS) behaves more as expected. Grub simply boots the kernel without giving me an option what to do (which makes sense in that context).

    It appears that hibernating Linux leaves the system in a state other than fully shut down, so that the BIOS behaves differently than if the system were fully shut down. I'm posting it to the Linux forum rather than the Lenovo forum because it appears that Linux is doing something a bit different in the hibernate case vs. the shutdown case.

    Thoughts?
     
  2. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    3,937
    Messages:
    7,046
    Likes Received:
    4,696
    Trophy Points:
    431
    Try this command in cmd prompt or powershell:
    Code:
    powercfg -h off
     
    hmscott likes this.
  3. hmscott

    hmscott Notebook Nobel Laureate

    Reputations:
    4,915
    Messages:
    17,290
    Likes Received:
    21,215
    Trophy Points:
    931
    @rlk
    And, then reboot, or shutdown. Then when you power up it will be a clean start, without any hybrid leavings from the last uptime.

    Disabling Hibernation disables Hybrid boot/shutdown, and gives a real shutdown and boot from scratch.

    Disabling Hibernation also deletes the hidden C:\hiberfil.sys file, which is/was as large as your RAM size, saving quite a bit of valuable space on your boot SSD :)
     
    Vasudev likes this.
  4. rlk

    rlk Notebook Consultant

    Reputations:
    29
    Messages:
    230
    Likes Received:
    87
    Trophy Points:
    41
    This is running Linux, not Windows.

    The issue here is with explicit hibernation under Linux. Hibernation saves memory state to my swap partition, to which I've allocated 64 GB (which is more than I really need -- I rarely page at all, but if I ever do go to 64 GB RAM I want to be certain to be able to hibernate). It should then power off the system, after which boot should then go through the normal sequence. What I've observed elsewhere is that hibernation sets something in the grub configuration that auto-reboots into the kernel in use at the time of hibernate; the kernel sees the hibernation image on the swap partition, restores it, and off we go.

    Hybrid sleep writes out the hibernation partition as usual, but keeps the system in suspend state, so that if you turn it back on it uses the memory contents rather than having to read everything back (i. e. it doesn't boot at all). That isn't what's happening here; when I open the lid it goes through the full disk-based restore (my boot drive is a SATA SSD, not PCIe, so the restore time is not insignificant). So, I could almost be convinced that the problem is that my system is trying to do a hybrid suspend, except that the power LED doesn't do its usual fadein/fadeout.

    But it is possible that this is what's happening underneath, except that something's going wrong in the hybrid restore so it goes back to disk.
     
    hmscott likes this.
  5. hmscott

    hmscott Notebook Nobel Laureate

    Reputations:
    4,915
    Messages:
    17,290
    Likes Received:
    21,215
    Trophy Points:
    931
    Last edited: Jan 6, 2018
  6. rlk

    rlk Notebook Consultant

    Reputations:
    29
    Messages:
    230
    Likes Received:
    87
    Trophy Points:
    41
    Yeah, I should do a command line hibernate too, just in case the KDE power management stuff is doing something weird (I have seen that happen before). The problem isn't that hibernation is failing -- it isn't -- it's just that the restart isn't what I want. Should also test it under Windows my next opportunity.

    The other worthwhile test would be hibernate, pull out AC and battery, leave it fully powered off for a few minutes, and see what happens on restart.

    I'm a UNIX guy. Have been for over 30 years. All of my real work is done on Linux. I want the full memory capacity, disk space (5 TB), graphics capability, etc. available under Linux. Other than the nVidia driver (which I now have fully working) I don't have problems with device drivers under Linux; these days things just work much more often than not.

    I use suspend (which isn't the problem) regularly when commuting. I use hibernate when I'm going to go a longer time without being plugged in, just to be on the safe side.
     
    hmscott likes this.
  7. hmscott

    hmscott Notebook Nobel Laureate

    Reputations:
    4,915
    Messages:
    17,290
    Likes Received:
    21,215
    Trophy Points:
    931
    Good luck, I'm sure it will provide many hours of enjoyment for you. ;)
     
    Last edited: Jan 6, 2018
    alexhawker likes this.
  8. rlk

    rlk Notebook Consultant

    Reputations:
    29
    Messages:
    230
    Likes Received:
    87
    Trophy Points:
    41
    On a 1-10 scale, this is about 2. It's rarely even an annoyance and even more rarely any more than that. Getting the nVidia driver fully working was a much more important issue.

    This may even be functioning as designed (it does make a certain amount of sense), in which case I just don't like the design.
     
    Vasudev and hmscott like this.
  9. hmscott

    hmscott Notebook Nobel Laureate

    Reputations:
    4,915
    Messages:
    17,290
    Likes Received:
    21,215
    Trophy Points:
    931
    That's a thought I had as well, it's working as intended - but may be tuneable given options in set up. I'd dig into it, but I don't have one setup to interrogate, and I think I pointed you in the right direction - it may take some command line work and a few attempts to find the right options to get the behavior you desire.

    If you get a handle on it, please post here and in that SUSE forum as I am sure others would benefit from sharing your insights from your successful work. :)
     
  10. rlk

    rlk Notebook Consultant

    Reputations:
    29
    Messages:
    230
    Likes Received:
    87
    Trophy Points:
    41
    Yeah, when I finish my nVidia writeup, which is a much bigger issue for a whole lot more people.
     
Loading...

Share This Page