Results 1 to 10 of 10

Thread: 18.04 fails to resume after hibernation

  1. #1
    Join Date
    Oct 2013
    Beans
    3

    18.04 fails to resume after hibernation

    For the beginning i say, that hibernation worked perfect on 17.10 on my hardware, and it doesn't look to me as a hardware problem now. Now when i'm putting my laptop to hibernation either by `systemctl hibernate` or `hibernate` it does write memory content somewhere on the disk, but while i'm starting it again, it looks like the kernel or initrd can't find the proper hibernation image. What i tried:


    Put RESUME=UUID=cac3c850-bc33-44ab-adb4-41dcb5403e6f into my /etc/initramfs-tools/conf.d/resume, and do update-initramfs -u, this actually made things worse, because it just made the boot slower and i had to wait until it will say "giving up on resume" or something like that. The UUID is correct, i checked with blkid, and i use this as a swap partition, checked with swapon --show.


    I tried to remove it from /etc/initramfs-tools/conf.d/resume and add resume=UUID=cac3c850-bc33-44ab-adb4-41dcb5403e6f to /etc/default/grub, and do update-grub, and also checked that it has been passed to kernel by checking /proc/cmdline, but also no luck. So how can I make ubuntu 18.04 resume after suspend? Or at least how can i debug issue more, to find out what's the problem exactly? Also tried a few different kernels - nothing changed. Thanks for your help.

  2. #2
    Join Date
    Feb 2016
    Beans
    5

    Re: 18.04 fails to resume after hibernation

    I saw your post while struggling was well with hibernate. I got it working, and wrote a small guide. Maybe you will find some pointers there:

    https://ubuntuforums.org/showthread.php?t=2392205

  3. #3
    Join Date
    Jul 2018
    Beans
    1

    Re: 18.04 fails to resume after hibernation

    No offense, but the guide makes this much more difficult than it should be.

    I too am trying to get my laptop to hibernate and resume properly.

    The hibernate options should never have been removed from the logout menu and the power menu.

    In my opinion, rather than throwing up our hands and giving up on hibernate, the menu options should be put back without users having to put them back by editing files. Hibernate should work out of the box as well as possible for all computers and when it doesn't, the user should be given a troubleshooting wizard that will help discover what the problem is in order to get the mainline code fixed for that particular computer.

    The closest I have gotten to getting hibernate working is to sudo apt-get install hibernate

    The main problem with installing hibernate package is that hibernating from the logout menu, (after hacking the option back there of course) it appears to be saving to swap before powering off but resume does not occur and it boots up like it would if I pulled the power and battery to power off. The same failure to resume is seen when suspending with systemctl hibernate so it appears that the hibernate button in the logout menu is doing a systemctl hibernate for me. With the same device with the same packages installed (including hibernate), I can hibernate and resume just fine by doing sudo s2disk or sudo hibernate-disk. This scenario is also with no grub options changed from a default install of 18.04 and by that I specifically mean that there is not an added option for resume=/dev/sda5 or whatever the swap device is, nor is there a resume=UUID-xxxxxxWhateverxxxx. I have also tried WITH the resume= option added to the grub command line and it does not help (in the systemctl hibernate nor logout hibernate) nor hinder (in the s2disk or hibernate-disk case). Now when I say that s2disk works, directly on my laptop, it works with the exception that the laptop screen does not come back on. If I suspend from a terminal with s2disk and then power back up, I can blindly type eject and the cdrom tray pops open. The screen is not just dark (no backlight), but there is no image on it, even when shining an extremely bright flashlight at the screen. I have tried closing and opening the lid (the power option I have set for lid closure is "Switch off display") but the display stays off. I have tried adjusting the brightness up and down with the fn key for brightness and still it does not come back on. What DOES work to bring the display back on is to suspend with s2ram but even then I have to s2ram and wake it up and then s2ram and wake it a second time. Alternatively, I can s2ram once and wake and then close/open lid. Attempting to do hibernate-ram gives the following error:

    "hibernate-ram:Warning: Tuxonice binary signature file not found.
    s2ram: unknown machine, see s2ram(8) and the USuspendRamForce option
    hibernate-ram: Aborting."

    Of course, I don't SEE the error until I do s2ram and wake and close/open lid For completeness, each run of s2ram outputs "KMS graphics driver is in use, skipping quirks."

    Additionally, on my laptop upon resuming after hibernating to disk, the wired network does not work even though it makes the appearance of reconnecting. modprobe -r r8169 followed by modprobe r8169 gets it back to working. This is something that the operating system should do automatically or automatically after a troubleshooting wizard noticing that a computer is using and r8169 and that after resuming the network is not reachable it should try the potential fix and apply it to future hibernation cycles. Eventually I hope to track down a better workaround than s2ram close/open lid to get the display back on and whatever it is needs to be built into the troubleshooting wizard that needs to ship with the operating system. By implementing such a troubleshooting system, we can avoid having each person who has the same problem have to search out a fix that they have to manually apply. Sure it may take some time to get all hardware working but it should be entirely doable.

    Once I can iron out the details of what is wrong with the built-in hibernate, I'd like to undo all the changes I've done following this advice and that advice because who knows what conflicts they may cause. This is why I installed virtualbox on my computer and did a fresh install of Lubuntu 18.04 to the virtual machine. Somewhere along the way, someone wrote up a how-to that included the need to have a swap partition (which may or may not be necessary as a swap file may work as well) so in my installation (on both laptop and vm), I created a swap partition of approximately twice my RAM amount. Other than that I did a standard install and after installation finishing I applied all available updates. On the VM, I created a snapshot so I can make changes and then revert if I want to try something else. On the virtualbox VM, s2disk and hibernate-disk both work fine including the display coming back on without having to s2ram like on my laptop. I'm unable to get the VM to wake up after s2ram by the normal method of pressing a key. Input, Keyboard, Insert Ctrl-Alt-Delete or any other key combo to insert did not wake the VM. I did manage to get it back awake by doing Machine, ACPI Shutdown. The VM did not shut down but just woke up. I do not have Guest Additions installed. Lubuntu 18.04 running in the VM also does not work with sudo systemctl hibernate. It appears to hibernate just fine but resuming never happens it just boots like I forcefully powered it off on the previous run. The ability of anyone with nearly any hardware to duplicate the failure in virtualbox should allow the bug with the built-in hibernate functionality to be squashed and once and for all for the hibernate button in the logout screen and the power settings to be enabled by default.
    Last edited by bteuro; July 4th, 2018 at 09:07 PM.

  4. #4
    Join Date
    Jul 2008
    Location
    Vancouver
    Beans
    343
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: 18.04 fails to resume after hibernation

    I hope this helps

    For me it has always worked until 18.04 and after 18.04 I enabled it as is in many articles, but it suddenly stopped working just yesterday (working fine for 4-5 months),

    and here is the ... ONE THING that got it working again ...

    Tell grub 2 where the swap partition is:

    First find out which partition it is on: using the below command:
    Code:
    cat /etc/fstab
    ... Mine is on sda7 as is the following output

    swap was on /dev/sda7 during installation
    Then, add in Grub 2 the following addition to the following line, using the following command:

    Code:
    sudo gedit /etc/default/grub
    GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable resume=/dev/sda7"

    The important part is "resume=/dev/sda7"

    /dev/sda7 in my case

    Then Update Grub with the following command, and after this it started working perfectly again

    Code:
    sudo update-grub
    After many attempts this was the one thing worked, perhaps it was just because of an update to the kernel that screwed it up, never the less this worked ... I hope it helps

    Cheers, Mark

  5. #5
    Join Date
    Mar 2007
    Beans
    29
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: 18.04 fails to resume after hibernation

    Thanks Mark for your helpful response.
    Indeed adding a resume partition to the grub configuration was the key also in my case.
    Yet for me using the normal device name, e.g.., /dev/sdb6, did not work, but using the UUID, e.g.,

    GRUB_CMDLINE_LINUX="resume=UUID=db3c9ac5-e2bc-43de-a48a-f1f8cf9b67a5"

  6. #6
    Join Date
    Mar 2014
    Beans
    2

    Re: 18.04 fails to resume after hibernation

    +1 I also had to specify the UUID of the swap partition to make it work
    Code:
     GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=3316d1a6-a36a-4f70-948e-4f97a76b5d3e"
    Last edited by hirt; August 27th, 2018 at 10:24 PM.

  7. #7
    Join Date
    Sep 2018
    Beans
    1

    Re: 18.04 fails to resume after hibernation

    Using UUID of the swap instead of the /dev/... in the grub file solved my problem!! thanks.

    X1 Carbon 6th Gen, Ubuntu 18.04

  8. #8
    Join Date
    Apr 2007
    Beans
    60
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: 18.04 fails to resume after hibernation

    Quote Originally Posted by hirt View Post
    +1 I also had to specify the UUID of the swap partition to make it work
    Code:
     GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=3316d1a6-a36a-4f70-948e-4f97a76b5d3e"
    great! finally works again
    Thanks a lot!

  9. #9
    Join Date
    Feb 2019
    Beans
    2

    Re: 18.04 fails to resume after hibernation

    I have a swapfile instead of swap partition. Adding
    Code:
    resume=/swapfile
    worked for me.
    I have to add, though, that instead of
    Code:
    pm-hibernate
    I am using
    Code:
    sudo s2disk
    command provided by uswsusp package.

  10. #10
    Join Date
    Feb 2019
    Beans
    2

    Re: 18.04 fails to resume after hibernation

    Works! But I believe that adding
    Code:
    intel_pstate=disable
    is not necessary for enabling hibernation.

Tags for this Thread

Bookmarks

Posting Permissions

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