# Hibernation with progress bar [SOLVED]

## Hypnos

What is the most expedient solution to have hibernation (suspend-to-disk) with a progress bar?  I was using TuxOnIce with the text-mode tuxonice-userui, but tuxonice-sources are not supported nor regularly updated.

I'm currently using the in-kernel swsusp, but it only shows a blinking cursor on hibernation, and a percentage readout on resume.  Moreover there is no support for image compression.

I looked into uswsusp, but it requires an initrd w/ splashutils to get a progress bar, and the combination uswsusp + splash is supported neither by dracut (AFAICT) nor genkernel.

Any ideas/thoughts?

----------

## khayyam

Hypnos ...

I have't done so since 3.2.12-gentoo but the tuxonice patch can be applied to gentoo-sources. I'm currently using geek-sources-3.4.4 (from the init6 overlay) and the patch is included/applied so I think in your case it should be fairly staightforward to have have tuxonice without needing tuxonice-sources.

best ... khay

----------

## Hypnos

Posted my "hypnos-sources" (up-to-date Genpatches + TuxOnIce) in my overlay.

Thanks khayyam, marking this solved.

----------

## lalebarde

I have just performed a fresh install of a new PC with gentoo-sources. I followed this : http://en.gentoo-wiki.com/wiki/Userspace_software_suspend#Uswsusp which explain how to add uswsusp to genkernel, to generate what is necessary in the initramfs.

```
# uname -a

Linux MyPC 3.3.8-gentoo #7 SMP PREEMPT Thu Jul 5 00:53:41 CEST 2012 x86_64 Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz GenuineIntel GNU/Linux
```

My genkernel command to generate the initramfs :

```
genkernel --linuxrc=/usr/share/genkernel/defaults/linuxrc.uswsusp --initramfs-overlay=/var/lib/genkernel/overlay --install --no-ramdisk-modules initramfs
```

hibernate-ram works like a charm for me, but not hibernate, thought it should be easier ! I have not yet investigated. I suppose it is just a matter of configuration tuning.

----------

## Hypnos

Yeah, I read that howto, and wasn't interested in dealing with all that mess for a bit of eye-candy -- a text mode progress bar is good enough for me.

I don't want to deal with creating/maintaining an initrd unless it can be done in one command, e.g. with dracut.

----------

## albright

somewhat off topic, but pf-sources includes tuxonice and is

(so far) kept up to date - currently 3.4.3 available

----------

## Hypnos

Thanks for the tip albright.

My interest is to use as stable and secure a kernel as possible, while still keeping up with security updates and not to falling too far behind in terms of compatibility. So, my plan is to track gentoo-sources, which is well-supported by the kernel team, and use the latest stable version that has a TuxOnIce patch available.  Right now that is 3.2.12.

pf-sources looks interesting, but has too many experimental features for my tastes -- I need my kernel to work, period.  geek-sources might be okay, since all the patches are keyed by USE flags, but I would need to know if they include security fixes, and where the TuxOnIce patches are coming from.

----------

## lalebarde

 *Hypnos wrote:*   

> I don't want to deal with creating/maintaining an initrd unless it can be done in one command, e.g. with dracut.

  I share it. I was very upset   :Evil or Very Mad:   to be obliged to set up a initramfs to tackle the "/usr on a separate partition" issue. Moreover, I think this is opposite to the linux philosophy. Linux shall keep the freedom of choice. Never constrain ! I know some people aware has setup alternatives, playing with rc-update, but I did not follow for the same reason you want to stay with gentoo-sources.

Anyway, I could have it in one command with a little script :

```
#!/bin/bash

#cd /usr/src/linux

#make menuconfig

make && make modules_install

module-rebuild populate

module-rebuild rebuild

depmod -a

mount /boot

cp .config .config-gentoo-sources-3.3.8 

cp .config /boot/.config-gentoo-sources-3.3.8 

cp arch/x86_64/boot/bzImage /boot/kernel-gentoo-sources-3.3.8

genkernel --linuxrc=/usr/share/genkernel/defaults/linuxrc.uswsusp --initramfs-overlay=/var/lib/genkernel/overlay --install --no-ramdisk-modules initramfs

umount /boot

cd
```

It can be improved by passing some arguments of course.

----------

## Hypnos

But you do have to maintain linuxrc.uswsusp and the ramdisk overlay yourself, no?  And do you get a hibernation/resume progress bar with this setup?

Tuxonice is the closest to a turn-key solution that also does compression and gives a decent user interface.

----------

## Hypnos

tuxonice-sources bug 409379

That ebuild I attached is in my overlay as "hypnos-sources" (link in sig)

----------

## Hypnos

Update: tuxonice-sources 3.2.12, 3.3.8 and 3.4.5 are in the tree.

It remains to be seen whether the devs are going to keep it up-to-date, or the users should track Nigel Cunningham's commits.  (See bug for details).

EDIT: tuxonice-sources-3.3.8 didn't build for me; still bugs to works out, it seems ...

----------

