Announcement

Collapse
No announcement yet.

Ubuntu Is Working On Much Faster Hibernation/Resume Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Hibernation is quite important if you use disk encryption. Sleeping an encrypted-disk machine makes it vulnerable to data retrieval since all your RAM contents are saved. Hibernation saves them on the encrypted disk making is safe[er].

    Comment


    • #12
      In terms of lingo, I thought hibernation stands for (winter) sleep (aestivation for summer sleep fwiw) where data is stored on a disk of some kind, whereas suspend is where data is more temporarily "suspended" in RAM.

      With the new hybrid devices like Optane things become more opaque, but for me the diffence is that when power is lost, suspended data gets lost as well, but hibernated data remains written on disk of some sort.

      Comment


      • #13
        Originally posted by stormcrow View Post
        My guess, as I don't remember seeing the option in power management on my laptops, is that it doesn't show up as an option if there's some ACPI blacklist or incompatibility going on.
        In addition to various ACPI bugs, which can make hibernation (randomly) fail in all sorts of interesting way, there are a bunch of things that will disable hibernation, include having secure boot enabled (which is more and more common default these days). And encrypting (or not encrypting) swap have some different issues for hibernation, and without signing the hibernation image, encryption alone is not sufficient. There is ongoing discussions in various groups as to how to make hibernation viable and to work in the various complex cases that can arise, but reliable hibernation support is still a work in progress.

        Comment


        • #14
          Originally posted by bug77 View Post
          seeing as SSDs have made hibernate pretty much redundant
          If my device is low on power and I am going on to be in transit for many hours but want to use the device after I arrive at my destination, do I rely on suspend?(Where some modern devices use S0i3 instead of S3 but fail to reach a low enough power state at least on linux that they drain battery much more than they should in suspend) Or do I hibernate and not waste battery life? (assuming hibernation is reliable, still seems a bit risky at times when I use it)

          Or in the articles case, hibernating to boot a different OS/instance, so that when you go back to the hibernated one, you still have the state to continue where you left off. Can't really do that with suspend, you're tied to the same OS until power off(or if you use VMs instead).

          Originally posted by bug77 View Post
          Also, wth are the hibernating that it takes 51s? Hibernate didn't take me 51s even when I was using a mechanical HDD (as I said, I found very little use for hibernate after I moved to SSD).
          As already mentioned, server workloads can differ from what you're used to. My workstation has 32GB of RAM and a SATA SSD, so sequential write is going to be at best around 500-550MB/sec and if most of that is in use(not uncommon for me), then that's going to take over a minute minimum to write to disk. My 4GB laptop though with NVMe SSD? Just a couple of seconds.

          Your HDD system probably didn't have much actively used memory to write to disk I guess.

          Comment


          • #15
            Hibernation and sleep has never worked on any laptop or desktop I have used ever since I started with desktop Linux 13 years ago. So anything related to it is considered 'non-news' to me.

            Comment


            • #16
              Originally posted by polarathene View Post

              If my device is low on power and I am going on to be in transit for many hours but want to use the device after I arrive at my destination, do I rely on suspend?(Where some modern devices use S0i3 instead of S3 but fail to reach a low enough power state at least on linux that they drain battery much more than they should in suspend) Or do I hibernate and not waste battery life? (assuming hibernation is reliable, still seems a bit risky at times when I use it)
              Neither. I shut it down. Linux has never successfully woken up from suspend, or resumed after hibernation in my entire 13 years of using Linux.

              It's so consistently and reliably useless that my first order of action on any new Linux installation is to disable the autosuspend on lid close action, and the option to hibernate.

              If I need to close up the laptop for a while (no more than 20min) to transit to another place, I don't mind losing that little bit of battery life in exchange for having my working session still alive when I reach my destination. Anything more than 20min gets a complete shutdown.

              Comment


              • #17
                Originally posted by Sonadow View Post
                Hibernation and sleep has never worked on any laptop or desktop I have used ever since I started with desktop Linux 13 years ago. So anything related to it is considered 'non-news' to me.
                Same. Half the time for me it doesn't work in Windows either. Admittedly until about three years ago the reason for that was I liked overclocking my desktops and hibernation usually - but not always - caused some sort of freakout as a result. On laptops I've had SSDs since they become reasonably affordable, and a little Acer ultraportable I had went from ~2mins boot time to <15 seconds by swapping the rubbish 4200RPM HDD it had with a cheap(-ish) SSD.

                Comment


                • #18
                  Originally posted by Sonadow View Post
                  Neither. I shut it down. Linux has never successfully woken up from suspend, or resumed after hibernation in my entire 13 years of using Linux.
                  That's awesome that it's a valid option for you. For me doing a reboot can be a major irritation to restore my prior session(each of the apps, their arrangement, the data and state they had, etc), anything that isn't immediately easy to save to disk is lost.

                  I can have 30-40 browser windows open, each with a bunch of tabs and organized acrossed virtual desktops for different things I'm working on that I hop between, that's lost if I reboot. Any browser tabs that I'm working on where I've got certain scroll positions with highlighted text or text input, can all be lost and if it's been a while I probably won't remember what that prior state was among a sea of tabs.

                  Development wise, my notes app will be fine and auto-saves frequently. My IDE seems to do the same, and even manages to keep tabs which haven't been saved to a file(not sure about unsaved files though where I have some changes that I may or may not want, Kate manages to retain that and notify me with option of viewing a diff due to it's temp files it makes, but it loses tabs for anything unsaved). Terminals, be it windows or tabs, history for each of those is lost(if unclean shutdown), or potentially undesirable merge order which can be frustrating.

                  Fairly sure there's more examples to that, but often it's in a state that performing a shutdown would take quite a bit of time to do in a manner that I can restore my state as it once was before. So it's not often a valid option for me, and I realize that running a rolling distro, where I actually only tend to update every 2 months on average (and reboot then) isn't entirely wise, but that's pretty much the only time I need to shutdown the system.

                  My laptop on the other hand is much weaker and only has 4GB of RAM, unlike the desktop which is just left running(I value the state more than the risk of suspend or hibernate on it), I can hibernate on it, and it rarely has any issue restoring, suspend would be good too if I'm using it regularly and don't have to worry about battery life while it's inactive, but this model fails to resume after the 2nd suspend since boot, so hibernation is my go to for it, or I can shutdown as it's less research focused, used for just programming one project at a time or travel. Sometimes though like late at night while in the middle of a project, I might want to keep the state and pick back up from there, not lose it(eg actively debugging something with browser dev tools, history, terminal(s), etc), so I hibernate or if it's really valuable, I'll just leave the thing plugged into AC and not have it sleep overnight).

                  On other devices I have had suspend work fine, then break when the 4.9 LTS kernel came out, wasn't fixed until closer to 4.11 I think(I did report to kernel bugzilla with others to help resolve). I can relate to it working horribly on many other machines in the past though, and with my recent laptop which is new-ish hardware from late last year.

                  Both still have their place though, a shutdown isn't always viable if you value the state enough but need to conserve battery life(eg a 13 hour flight).

                  Comment


                  • #19
                    Interesting.

                    I never had a problem with Linux suspend-to-RAM on any of my machines and I use it several times daily with my Laptop. No hiccup, nothing, Truly 100% reliable for me.

                    I however always disable Suspend-to-Disk (Hibernate) as I don't want to wait the seconds it takes for the machine to write to disk / SSD and don't want to spend too many write cycles of the SSD.

                    However I thought dropping caches before hibernating is the only sane thing to do and I was surprised to see caches getting written to disk.
                    I think writing them takes more time than recreating them through read operations after wakeup, it also should help pruning really old stuff and defragment memory.
                    But I have no clue

                    Comment


                    • #20
                      What hibernation?
                      Hibernation doesn't work at all on Ubuntu as they have disable it for all computers.
                      I don't even know how to easily turn it back on.

                      Comment

                      Working...
                      X