On a Debian system, there are packages called uswsusp and hibernate. The former contains a program named s2disk, the latter contains a program called hibernate. Superficially, these both do the same thing: the suspend the machine to disk. Usually, this works fine, but since I'm often using Debian testing and there are lots of changes in kernel and other packages (I assume), somethings this breaks. But then, when one of these programs doesn't work, sometimes the other works. Often, hibernate works when s2disk doesn't. Somewhat annoyingly, however, the "Suspend" or "Hibernate" buttons in the graphical user interfaces (e.g., LXDE, KDE) appear to be wired up to the s2disk program, so when that breaks I have to use hibernate manually.

So, what is the difference between these packages? Interestingly, the hibernate package "recommends" uswsusp, but the package description says that it "smartly puts your computer to sleep ... using one of the various methods available in the kernel". So apparently it can fall back to something else when the s2disk method fails?

And if hibernate is more powerful, why wouldn't the GUIs use it instead?


uswsusp - uses the facilities in the kernel to do a userspace software suspend. Hibernate is a set of scripts that will use a variety of methods (including uswsusp) to perform hibernation - depending on what is installed and available on the local machine (ACPI and in-kernel suspend are alternative methods to achieve the same thing). Hibernate will also take care of unloading and re-loading kernel modules.

So uswsusp is a lot more basic - and for most purposes you should be using the hibernate command to hibernate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.