# Hibernate/Suspend on HP dv5

## Drkg4b

Hi,

i have an HP dv5 1170el and i can't manage to let hibernate and suspend to ram work, i followed the power managment guide but at the end prefered to use KDE's power devil. I've red the guide on s2ram and tried all the option on the site for not recognized machine but none worked for me. I attach my kernel config, let me know if some other information are required.

http://pastebin.com/M0fmNAEF

----------

## rod

When you say hibernate and suspend to ram doesn't work, what are the symptoms? Are there any error messages? Does it work from the command line?

You might want to check that you've got pm-utils installed because it's the set of scripts that KDE/Gnome uses to interact with the hibernate/suspend parts of HAL. See http://www.gentoo-wiki.info/Pm-utils

Without being rude, a forum or google search of the precise error message or symptoms often gives me good clues on how to fix my problems, which is good seeing as I'm certainly no expert   :Smile: 

----------

## Drkg4b

I alway look on google or some forum to try to solve my problems by myself, infact i have few posts here mainly for the things i can't solve alone but yuo are right, maybe i've not searched enough for this problem, by the way when i launch pm-suspend as root, the laptop seems to suspend for a little then immediatly come back to life, here is the pm-suspend-log

```
Initial commandline parameters: 

Blacklisting 01grub.

Blacklisting 55NetworkManager.

Blacklisting 90clock.

Sun May 30 09:47:28 CEST 2010: Running hooks for suspend.

/usr/lib64/pm-utils/sleep.d/00logging suspend suspend:Linux spin 2.6.32-gentoo-r6 #6 SMP Sat May 22 20:23:43 CEST 2010 x86_64 Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz GenuineIntel GNU/Linux

Module                  Size  Used by

pppoe                   7973  2 

pppox                   2116  1 pppoe

ppp_generic            17205  6 pppoe,pppox

slhc                    4507  1 ppp_generic

xt_mark                  919  0 

xt_conntrack            2414  0 

nf_conntrack           53620  1 xt_conntrack

xt_MARK                  919  0 

ip_tables              13859  0 

snd_seq_dummy           1550  0 

snd_seq_oss            25105  0 

snd_seq_midi_event      5676  1 snd_seq_oss

snd_seq                46196  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device          5439  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_pcm_oss            32367  0 

snd_mixer_oss          12901  1 snd_pcm_oss

acpi_cpufreq            5693  0 

snd_hda_codec_nvhdmi     3696  1 

snd_hda_codec_idt      49939  1 

snd_hda_intel          20137  3 

snd_hda_codec          57266  3 snd_hda_codec_nvhdmi,snd_hda_codec_idt,snd_hda_intel

nvidia              10820257  41 

snd_pcm                68489  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec

snd_timer              17798  2 snd_seq,snd_pcm

btusb                  10712  0 

bluetooth              47006  1 btusb

iwlagn                 60223  0 

iwlcore                93705  1 iwlagn

rtc_cmos                7901  0 

button                  5421  0 

video                  19134  0 

output                  1965  1 video

snd                    51946  16 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer

soundcore               5880  1 snd

snd_page_alloc          6955  2 snd_hda_intel,snd_pcm

thermal                12972  0 

processor              31696  3 acpi_cpufreq

             total       used       free     shared    buffers     cached

Mem:       4059644    1599544    2460100          0      53968     772500

-/+ buffers/cache:     773076    3286568

Swap:       498004          0     498004

success.

/usr/lib64/pm-utils/sleep.d/00powersave suspend suspend:success.

/usr/lib64/pm-utils/sleep.d/01grub suspend suspend:disabled.

/usr/lib64/pm-utils/sleep.d/49bluetooth suspend suspend:not applicable.

/usr/lib64/pm-utils/sleep.d/55NetworkManager suspend suspend:disabled.

/usr/lib64/pm-utils/sleep.d/75modules suspend suspend:success.

/usr/lib64/pm-utils/sleep.d/90clock suspend suspend:disabled.

/usr/lib64/pm-utils/sleep.d/94cpufreq suspend suspend:success.

/usr/lib64/pm-utils/sleep.d/95led suspend suspend:not applicable.

/usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:success.

/usr/lib64/pm-utils/sleep.d/99video suspend suspend:kernel.acpi_video_flags = 0

success.

Sun May 30 09:47:32 CEST 2010: performing suspend

/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: Input/output error

Sun May 30 09:47:37 CEST 2010: Awake.

Sun May 30 09:47:37 CEST 2010: Running hooks for resume

/usr/lib64/pm-utils/sleep.d/99video resume suspend:success.

/usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:success.

/usr/lib64/pm-utils/sleep.d/95led resume suspend:not applicable.

/usr/lib64/pm-utils/sleep.d/94cpufreq resume suspend:success.

/usr/lib64/pm-utils/sleep.d/90clock resume suspend:disabled.

/usr/lib64/pm-utils/sleep.d/75modules resume suspend:success.

/usr/lib64/pm-utils/sleep.d/55NetworkManager resume suspend:disabled.

/usr/lib64/pm-utils/sleep.d/49bluetooth resume suspend:not applicable.

/usr/lib64/pm-utils/sleep.d/01grub resume suspend:disabled.

/usr/lib64/pm-utils/sleep.d/00powersave resume suspend:success.

/usr/lib64/pm-utils/sleep.d/00logging resume suspend:success.

Sun May 30 09:47:37 CEST 2010: Finished.
```

----------

## rod

Hi again,

Thanks for the pm-utils log output, makes it easier when you've got an error message to work with. Does hibernate work btw? (And also confirm that you're calling suspend/hibernate from the command line?)

I think that the relevant error message looks like:

```
/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: Input/output error 
```

A bit of googling found this page http://forum.nginx.org/read.php?30,71296 which suggested going into the /usr/lib*/pm-utils/pm-functions script and seeing what line 295 says. On my machine, line 295 says:

```
do_suspend() { echo -n "mem" >/sys/power/state; }
```

so I'd suspect some sort of write permission problem with /sys/power/state. Check its permissions maybe, or check whether some other process is writing/locking /sys/power/state?

If you do:

```
echo -n "mem" >/sys/power/state
```

 as root it should suspend. Does it? If not, is it a similar write error message?

----------

## Drkg4b

I've tried to hibernate and it gives me a no space left on device error, i have to change the partition where i want to hibernate, can i put it everywere? I have a free partition of about 2GB.

Concerning the suspend, i've checked that the line of /usr/lib64/pm-utils/pm-functions correspond to yours and then checked the permission of

```
# ls -al /sys/power/state 

-rw-r--r-- 1 root root 4096 May 30 23:03 /sys/power/state

```

is seems ok, so i've runned

```
# echo -n "mem" > /sys/power/state 

bash: echo: write error: Input/output error

```

which give me the same error.

----------

## rod

Bit more googling brought up http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/echo-n-mem-sys-power-state-operation-not-permitted-error-474871/, which suggest it's a kernel issue (but sounds like you thought that from the get-go    :Wink:  ).

From the kernel config in post #1 you're using kernel version: 2.6.32-gentoo-r6. Gentoo packages have 2.6.32-gentoo-r7 as the latest stable kernel, so maybe try the latest stable? Else I'm kinda outta ideas, sorry not to be more help.

----------

## Drkg4b

Upgrading the Kernel doesn't help, could it be because i have no "hal" use flag enabled? I can't manage to let the keyboard and the mouse work with evdev so i have disabled it.

```
# emerge --info

Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.1-r0, 2.6.32-gentoo-r7 x86_64)

=================================================================

System uname: Linux-2.6.32-gentoo-r7-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9400_@_2.53GHz-with-gentoo-2.0.1

Timestamp of tree: Sun, 06 Jun 2010 10:30:21 +0000

app-shells/bash:     4.1_p7

dev-java/java-config: 2.1.11

dev-lang/python:     2.6.5-r2, 3.1.2-r3

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.13, 2.65

sys-devel/automake:  1.9.6-r2, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.7b

virtual/os-headers:  2.6.33

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -march=nocona -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -march=nocona -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1"

LINGUAS="en it"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="3dnow X accessibility acl acpi alsa amd64 apm bash-completion berkdb bzip2 caps cli consolekit cracklib crypt cups cxx dbus djvu dri dvd dvdr embedded embeded extensions fontconfig fortran gdbm glib gpm iconv ipod ipv6 java javascript jpeg jpeg2k kde kdehiddenvisibility kpathsea laptop lm_sensors mmx modules mp3 mudflap multilib ncurses nforce2 nls nptl nptlonly nsplugin nvidia opengl openmp pam pcre perl pmu png policykit pppd python qt3 qt3support qt4 readline reflection session spl sse sse2 ssl svg sysfs tcpd truetype unicode utemper vcd wifi xcomposite xinerama xorg xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics joystic" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en it" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

----------

