# Suspend to disk

## rmzelnick

Hello,

So I've installed suspend-utils-1.0 on my newly gentoo installation, and I obviously ran s2disk as well as s2ram. At first, nothing seemed to work while running on xorg-server-1.14.2.901 with my fluxbox-1.3.5 the screen would just flash and a message would display on the terminal:

```

KMS graphics driver is in use, skipping quirks.

```

And so I read supend-utils-1.0 documentation from /usr/share/doc/suspend-1.0/ and found out that I needed to run `s2ram -n' to see if my system was listed in the `whitelist', you can see the results for yourself.

```

Machine unknown

This machine can be identified by:

    sys_vendor   = "Hewlett-Packard"

    sys_product  = "HP Mini 311-1000"

    sys_version  = "0390100000201B01100320000"

    bios_version = "F.16"

```

So I checked my BIOS version and it is F.16 (I'm guessing it's not a problem). And I read the entire suspend-utils-1.0 documentation

 *Quote:*   

> 
> 
> The best way to start investigating an unknown machine is probably to
> 
> boot with init=/bin/bash at the boot prompt into a minimal environment,
> ...

 

So I restarted my computer and boot my kernel with the `init=/bin/bash' parameter and tried every option on the list above (nothing). Then I read something that caught my interest in the documentation:

 *Quote:*   

> 
> 
> There are machines that will not resume when using a framebuffer console.
> 
> Recent Dell and HP models for example very often fall into this category.
> ...

 

Then I tried all of the options on that list with this new kernel parameter `vga=0', still absolutely nothing happened the backlight would turn off, but the caps lock would still work as described in the documentation:

 *Quote:*   

> 
> 
> A good way to check this is to start with a minimal
> 
> system (init=/bin/bash), run "s2ram -f", and after resume, when the display
> ...

 

So now you can see how frustrated I was and started to use google, when I came across a thread in ubuntu forums using the same laptop model as mine,

http://ubuntuforums.org/showthread.php?t=2163499

 *Quote:*   

> 
> 
> If I manually turn off the wifi/bluetooth it'll work but everything else rewakes that system...
> 
> 

 

So I turned the wifi/bluetooth button off and running `s2ram' seems to fully work, when I run `s2disk' the computer suspends, but when I power on my laptop, OpenRC shows:

```

/dev/sda3 was not cleanly unmounted

```

It then performs a disk check and the computer reboots, and I get my machines original state back. Before anybody asks I did create an initrd image from suspend-utils-1.0 and I did configure grub.

So far I have two questions,

How can I get s2disk work in order to restore my computer to the original state?

Is it possible to turn off wifi/bluetooth from my computer?  I don't have any of the modules loaded described in the ubuntu forums.

Computer specs:

http://www.cnet.com/laptops/hp-mini-311-1037nr/4507-3121_7-33788408.html

PS:

I read https://forums.gentoo.org/viewtopic-t-919046-start-0.html and the `resume' parameter doesn't make `s2disk' work still the message from OpenRC shows.

Here's my /etc/suspend.conf

```

cat /etc/suspend.conf

resume device = /dev/sda2

shutdown method = platform

splash = n

suspend loglevel = 2

```

----------

## BradN

Are you sure your grub config is properly specifying the resume partition?

----------

## rmzelnick

```

mark@hpmini311 ~ $ cat /boot/grub/grub.conf

# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook

# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2

# If you are not using Genkernel and you need help creating this file, you

# should consult the handbook. Alternatively, consult the grub.conf.sample that

# is included with the Grub documentation.

default 0

timeout 30

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.10.7

root (hd0,0)

kernel /boot/linux-3.10.7-gentoo root=/dev/sda3 net.ifnames=0 vga=0 resume=/dev/sda2

initrd /boot/resume-initrd

title Gentoo Linux 3.10.7 (rescue)

root (hd0,0)

kernel /boot/linux-3.10.7-gentoo root=/dev/sda3 init=/bin/bb net.ifnames=0

title Gentoo Linux 3.8.13

root (hd0,0)

kernel /boot/linux-3.8.13-gentoo root=/dev/sda3 net.ifnames=0

title Gentoo Linux 3.8.13 (rescue)

root (hd0,0)

kernel /boot/linux-3.8.13-gentoo root=/dev/sda3 init=/bin/bb net.ifnames=0

# vim:ft=conf:

```

```

mark@hpmini311 ~ $ sudo fdisk -l /dev/sda

Disk /dev/sda: 160.0 GB, 160041885696 bytes, 312581808 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x0003bf01

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048       65535       31744   83  Linux

/dev/sda2           65536     5924863     2929664   82  Linux swap / Solaris

/dev/sda3         5924864   312581807   153328472   83  Linux

```

----------

## BradN

Hmm, yeah that seems the right way to specify it, assuming you're just trying to boot the newer kernel.

It would be good to see some startup messages, some may be in dmesg after one of those resume attempts but early init script output maybe scrolls away.

----------

## rmzelnick

 *BradN wrote:*   

> Hmm, yeah that seems the right way to specify it, assuming you're just trying to boot the newer kernel.
> 
> It would be good to see some startup messages, some may be in dmesg after one of those resume attempts but early init script output maybe scrolls away.

 

dmesg output:

http://pastebin.com/CMYzsy4v

/var/log/rc.log:

```

rc boot logging stopped at Wed Aug 21 18:40:07 2013

rc default logging started at Wed Aug 21 18:40:07 2013

dbus             | * Starting D-BUS system messagebus ...

syslog-ng        | * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...

dbus             |Unknown username "pulse" in message bus configuration file

 [ ok ]

wicd             | * Starting wicd daemon ...

 [ ok ]

syslog-ng        | * Starting syslog-ng ...

 [ ok ]

acpid            | * Starting acpid ...

vixie-cron       | * Starting vixie-cron ...

cpufreqd         | * Starting CPU Frequency Daemon ...

 [ ok ]

 [ ok ]

laptop_mode      | * Starting laptop_mode ...

 [ ok ]

 [ ok ]

 [ ok ]

netmount         | * Mounting network filesystems ...

 [ ok ]

xdm              | * Setting up slim ...

 [ ok ]

local            | * Starting local

 [ ok ]

rc default logging stopped at Wed Aug 21 18:40:14 2013

```

----------

## BradN

Here is your problem:

[    0.530712] Initramfs unpacking failed: junk in compressed archive

I'm not sure what would cause this - perhaps missing compression support in the kernel?

----------

