# Laptop wont go to sleep

## snakeo2

I have a toshiba laptop and I'm trying to figure out how to make the cpu and hdd to power down....so far the only thing that works is the screensaver. After ten minutes the screensaver kicks in and then the screen goes black....but i can hear the cpu fan spinning away. below is the configuration of power management for my kernel:

```

 [*] Suspend/resume event tracing                                                     │ │   

  │ │              [*] Suspend to RAM and standby                                                       │ │   

  │ │              [ ]   Test suspend/resume and wakealarm during bootup                                │ │   

  │ │              [*] Hibernation (aka 'suspend to disk')                                              │ │   

  │ │              ()    Default resume partition                                                       │ │   

  │ │              [ ] Run-time PM core functionality                                                   │ │   

  │ │              [*] ACPI (Advanced Configuration and Power Interface) Support  --->                  │ │   

  │ │              [ ] SFI (Simple Firmware Interface) Support  --->                                    │ │   

  │ │                  CPU Frequency scaling  --->                                                      │ │   

  │ │              -*- CPU idle PM support                                   

 
```

uname -a

Linux localhost 2.6.37-gentoo-r4 #7 SMP Sun May 22 12:58:08 GMT 2011 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-60 AuthenticAMD GNU/Linux

```

emerge --info 

Portage 2.1.9.42 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.5, libc-0-r0, 2.6.37-gentoo-r4 x86_64)

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

System uname: Linux-2.6.37-gentoo-r4-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-60-with-gentoo-2.0.2

Timestamp of tree: Tue, 24 May 2011 22:00:01 +0000

app-shells/bash:     4.1_p9

dev-java/java-config: 2.1.11-r3

dev-lang/python:     2.7.1-r1, 3.1.3-r1

dev-util/cmake:      2.8.4-r1

sys-apps/baselayout: 2.0.2

sys-apps/openrc:     0.8.2-r1

sys-apps/sandbox:    2.4

sys-devel/autoconf:  2.13, 2.65-r1

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

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.5

sys-devel/gcc-config: 1.4.1-r1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

sys-kernel/linux-headers: 2.6.36.1

sys-libs/glibc:      2.12.2

virtual/os-headers:  0

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -msse3 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"

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/terminfo"

CXXFLAGS="-march=k8 -msse3 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

EMERGE_DEFAULT_OPTS="--keep-going"

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

FFLAGS=""

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

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

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 a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode eselect exif fam ffmpeg firefox flac fortran gdbm gdu gif gpm grcypt iconv icu ipv6 java jce jpeg kde lcms ldap libnotify lignotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pango pcre pdf perl plasma png policykit ppds pppd python qt3support qt4 readline sdl session source spell sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb vlc vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cgi cgid 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" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

----------

## bobspencer123

how are you trying to suspend????

hiberate-script?

pm-utils?

some gui -- like powerdevil?

We need more info to help you. 

You can try reading the  gentoo power management guide  to get started.

----------

## snakeo2

bobs,

Thanks im going over the power management section now and I have a question. I'm at the part where you have to create the script to switch runlevels....I create the file:

/etc/acpid/action/pmg_switch_runlevels.sh

and copy the script and then try to exit nano so the file can be created by "crtl x" and get error "no such file or directory"...do i need to create the file first and then add the script? 

thanks.

----------

## rainbowgoblin

You might want to check out the Pm-utils guide for ArchLinux:https://wiki.archlinux.org/index.php/Pm-utils . The Gentoo power management guide is painfully old. You don't want to be using ACPI scripts on a newer system.

----------

## snakeo2

rainbow,

thanks for the suggestion....but I would like to first try to see if i can finish the gentoo power management guide. I have already compiled the kernel and emerged all required programs......

----------

## toralf

Depending on the output of 

```
tfoerste@n22 ~/devel/wireshark $ cat /sys/power/state

mem disk

```

- does a 

```
echo mem > /sys/power/state
```

repectively 

```
echo disk > /sys/power/state
```

work ?

----------

## snakeo2

tora,

```

cat /sys/power/state

mem disk

```

however

```

echo disk > /sys/power/state

```

shut the laptop off. [/code]

----------

## snakeo2

Strangely enough, if i go

K start menu===>Leave==>Sleep....laptop goes into sleep mode. I could resume from sleep mode, but the only drawback is that wpa_supplicant drops the wireless connection and fails to start scanning networks and does not connect.

----------

