# suspend-to-ram (S3) w/ diskless node [SOLVED]

## BonesToo

So this is my first experience with using any power state management in Linux.  I'm a little confused to say the least.  I've followed the howto at http://www.gentoo.org/doc/en/power-management-guide.xml but i'm still lost.  And to add to it I'm running a diskless PXE booted client with nfs root.

So I'm assuming going to S3 should be possible as long as the NIC stays up, anyone?  The board I'm running is the Intel DG45FC, with builtin e1000e driver on gentoo-sources 2.6.27-r1. It supports WOL, and i've got it all enabled in the BIOS.  The BIOS even supports WOL from S5, so I'm assuming it should be ok to stay up from the S3 state too. (Side note: WOL is working from power off state ATM)

I've got all the relevant kernel modules selected, acpid running, but when I run "hibernate-ram" or "echo -n 'mem' > /sys/power/state" the screen just goes black, without any messages, and the box powers off immediately.  And when I press the power button on the case it just boots up as normal. I'm still using the default conf files since I'm not quite sure what to edit for a diskless node.  I tested this at the console w/o X running...just to test.  And I manually removed all loaded modules before trying to suspend.  Any ideas out there?

This is the only thing that appears in /var/log/messages after running hibernate-ram.

```
Nov  2 22:32:07 treehorn PM: Syncing filesystems ... done.
```

And this was in /var/log/hibernate.log

```
Starting suspend at Sun Nov 2 22:32:06 PST 2008

hibernate-ram: [01] Executing CheckLastResume ...

hibernate-ram: [01] Executing CheckRunlevel ...

hibernate-ram: [01] Executing LockFileGet ...

hibernate-ram: [01] Executing NewKernelFileCheck ...

hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...

hibernate-ram: [11] Executing XHacksSuspendHook1 ...

hibernate-ram: [59] Executing RemountXFSBootRO ...

hibernate-ram: [89] Executing SaveKernelModprobe ...

hibernate-ram: [91] Executing ModulesUnloadBlacklist ...

hibernate-ram: [91] Executing ModulesUnloadBlacklist ...

hibernate-ram: [95] Executing XHacksSuspendHook2 ...

hibernate-ram: [98] Executing CheckRunlevel ...

hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...

hibernate-ram: Activating sysfs power state mem ...

```

```
treehorn ~ # emerge --info

Portage 2.1.4.5 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r1 x86_64)

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

System uname: 2.6.27-gentoo-r1 x86_64 Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz

Timestamp of tree: Mon, 03 Nov 2008 13:31:01 +0000

app-shells/bash:     3.2_p33

dev-lang/python:     2.4.4-r13

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r2

sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1-r1

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

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

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

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

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/local/portage"

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="X aac acl acpi alsa amd64 bash-completion berkdb bzip2 cli cracklib crypt dri dts dvb encode gdbm gifi gpm iconv isdnlog jpeg lirc midi mmx mmxext mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python quicktime readline reflection rtc session spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd threads truetype unicode vim-syntax x264 xorg xvid 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="intel"

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

```

```
treehorn ~ # grep PM /boot/config64-2.6.27

CONFIG_PM=y

CONFIG_PM_DEBUG=y

# CONFIG_PM_VERBOSE is not set

CONFIG_CAN_PM_TRACE=y

CONFIG_PM_TRACE=y

CONFIG_PM_TRACE_RTC=y

CONFIG_PM_SLEEP_SMP=y

CONFIG_PM_SLEEP=y

# CONFIG_PM_TEST_SUSPEND is not set

CONFIG_X86_PM_TIMER=y

# CONFIG_PCIEASPM is not set

CONFIG_SATA_PMP=y

# CONFIG_IPMI_HANDLER is not set

# CONFIG_TCG_TPM is not set

# CONFIG_FB_PM2 is not set

# CONFIG_FB_PM3 is not set

treehorn ~ # grep ACPI /boot/config64-2.6.27

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_PROCFS=y

CONFIG_ACPI_PROCFS_POWER=y

CONFIG_ACPI_SYSFS_POWER=y

CONFIG_ACPI_PROC_EVENT=y

# CONFIG_ACPI_AC is not set

# CONFIG_ACPI_BATTERY is not set

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_FAN=y

CONFIG_ACPI_DOCK=y

# CONFIG_ACPI_BAY is not set

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_WMI is not set

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_TOSHIBA is not set

# CONFIG_ACPI_CUSTOM_DSDT is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_EC=y

# CONFIG_ACPI_PCI_SLOT is not set

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

CONFIG_ACPI_CONTAINER=y

# CONFIG_ACPI_SBS is not set

CONFIG_X86_ACPI_CPUFREQ=y

# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set

CONFIG_PNPACPI=y

CONFIG_ATA_ACPI=y

```

Last edited by BonesToo on Wed Sep 23, 2009 8:24 pm; edited 3 times in total

----------

## BonesToo

So I went up to vanilla-2.6.28-rc3 and looks like I'm getting a little further, but I've never seen suspend to ram work so I don't know what it's suppose to do and look like.

When I run hibernate-ram -v3, in either X or at the console, I get this in the logs:

```
Starting suspend at Tue Nov 4 15:49:20 PST 2008

hibernate-ram: [01] Executing CheckLastResume ...

hibernate-ram: [01] Executing CheckRunlevel ...

hibernate-ram: [01] Executing LockFileGet ...

hibernate-ram: [01] Executing NewKernelFileCheck ...

hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...

hibernate-ram: [11] Executing XHacksSuspendHook1 ...

hibernate-ram: [59] Executing RemountXFSBootRO ...

hibernate-ram: [89] Executing SaveKernelModprobe ...

Saved /proc/sys/kernel/modprobe is /sbin/modprobe

hibernate-ram: [91] Executing ModulesUnloadBlacklist ...

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

Module version for ipw2100 is

Module version for ipw2200 is

Module version for snd_bt_sco is

Module version for ndiswrapper is

hibernate-ram: [91] Executing ModulesUnloadBlacklist ...

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

Module version for ipw2100 is

Module version for ipw2200 is

Module version for snd_bt_sco is

Module version for ndiswrapper is

hibernate-ram: [95] Executing XHacksSuspendHook2 ...

xhacks: changing console from 7 to 15

hibernate-ram: [98] Executing CheckRunlevel ...

hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...

hibernate-ram: Activating sysfs power state mem ...

```

After this point I'm left with a black screen and a single blinking cursor.  The display never turns off completely.  I wait and wait and pushing the power button doesn't do anything.  I have to hold it down to get the power to turn off, then press it again to get the pc to boot again.

Can anyone give any input I can try?  I tried unloading all modules before running hibernate-ram but that doesn't seem to help either.  What would cause the screen to stay on with a blinking cursor?  And is the display suppose to go completely off on S3?  I would think so...but I have pc hooked up to a TV, not a monitor.  Could this be a DPMS issue?

----------

## BonesToo

BOOM! Working!    :Very Happy: 

Even Wake on LAN w/ magic packet works!

I didn't do anything, I just happened to try it today because I haven't tried it in a long time.  Must just be the new kernel and/or new intel video drivers.

I'm running 

gentoo-sources-2.6.30-r5

xf86-video-intel-2.7.1

xorg-server-1.6.1.901-r3

I just run the command 'hibernate-ram'

The only problem I have (which I haven't even looked into yet, so it might not be a problem for much longer) is that when it wakes from S3 the mouse cursor is visible over the mythfrontend.  Most likely because the desktop has focus instead of mythfrontend.  Once I click the mouse or hit alt+tab then the cursor disappears again.

here is my /etc/hibernate/common.conf, which I tweaked a little to get the network interface to stay up.

```

# Configuration options common for suspending to disk or RAM.

# Options are not case sensitive.

#

# See hibernate.conf(5) for help on the configuration items.

##############################################################################

### Some global settings

##############################################################################

Verbosity 4

LogFile /var/log/hibernate.log

LogVerbosity 4

# LogTimestamp yes

# AlwaysForce yes

# AlwaysKill yes

# HibernateVT 15

Distribution gentoo

# XDisplay :0

##############################################################################

### Scriptlets

###   Scriptlets provide support for doing all sorts of things before and after

###   suspending. The defaults settings here should work for most people, but

###   you may wish to edit these to taste. Consult "hibernate -h" for help on

###   the configuration settings.

##############################################################################

### bootsplash

## If you use bootsplash, also enabling SwitchToTextMode is recommended if

## you use X, otherwise you may end up with a garbled X display.

# Bootsplash on

# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock

SaveClock restore-only

#DirectIsa

### devices

# IncompatibleDevices /dev/dsp /dev/video*

### diskcache

# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)

# FBSplash on

# FBSplashTheme tuxonice

### filesystems

# Unmount /nfsshare /windows /mnt/sambaserver

# UnmountFSTypes smbfs nfs

# UnmountGraceTime 1

# Mount /windows

Unmount /mnt/mp3s

Unmount /mnt/movies

Unmount /usr/portage

Mount /

Mount /usr/portage

Mount /mnt/movies

Mount /mnt/mp3s

### grub

# ChangeGrubMenu yes

# GrubMenuFile /boot/grub/menu.lst

# AlternateGrubMenuFile /boot/grub/menu-suspended.lst

# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

# see http://bugs.debian.org/317479

# RemountXFSBoot yes

### hardware_tweaks

# IbmAcpi yes

# RadeonTool yes

# Runi915resolution yes

# FullSpeedCPU yes

### lilo

# EnsureLILOResumes yes

### lock (generally you only want one of the following options)

## For console you need vlock available.

## For x you need xscreensaver-command-command available.

## For gnome you need gnome-screensaver-command available.

## For kde you need dcop, kscreensaver available.

## For XAuto you need xautolock available.

## For Xtr you need xtrlock available.

## For Freedesktop (for example KDE4) you need dbus-send available

# LockConsoleAs root

# LockXScreenSaver yes

# LockGnomeScreenSaver yes

# LockFreedesktop

# LockKDE yes

# LockXLock yes

# LockXAutoLock yes

# LockXtrLock yes

### misclaunch

OnSuspend 20 echo "Good night!"

OnResume 20 echo "Good morning!"

### modules

# UnloadModules snd_via82cxxx usb-ohci

# UnloadAllModules yes

UnloadBlacklistedModules yes

LoadModules auto

# LoadModulesFromFile /etc/modules

### modules-gentoo

# GentooModulesAutoload yes

### network

# DownInterfaces eth0

# UpInterfaces auto

DownInterfaces none

### networkmanager

# EnableNMReconnect yes

### pause_audio

# MuteAudio yes

# PauseAudio yes

### pcmcia

# EjectCards yes

### programs

# IncompatiblePrograms xmms

### services

# RestartServices laptop_mode anacron

# StopServices alsasound

# StartServices aumix

### vbetool

# EnableVbetool yes

# RestoreVbeStateFrom /var/lib/vbetool/vbestate

# VbetoolPost yes

# RestoreVCSAData yes

EnableVbetool yes

### xhacks

SwitchToTextMode yes

# UseDummyXServer yes

# DummyXServerConfig xorg-dummy.conf

### xstatus

## This can be set to gnome, kde or x:

## For gnome you need zenity available.

## For kde you need dcop, kstart, kdialog available.

## For x you need to have xosd OR xmessage available.

# XStatus gnome

# XmessageDisable yes

# XSuspendText Preparing to suspend...

# XResumeText Resuming from suspend...

## When using XStatus x, and you have xosd installed:

# XosdSettings --font '-misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-*' --colour=Green --shadow 1 --pos bottom --align center --offset 50

### xbacklight

# BackLight yes

### gaim

## You need to have dbus, gaim_remote available.

# LogoutGaim yes

# GaimRestoreStatus yes

# GaimLogoutMessage Hibernating

# GaimLoginMessage Back from hibernation

### pidgin

# LogoutPidgin yes

# PidginRestoreStatus yes

# PidginLogoutMessage Hibernating - bye!

# PidginLoginMessage I'm back!

### SSH and PGP keys

# AgentsClearGPG yes

# AgentsClearSSH yes

### Virtualbox

# SuspendVirtualbox yes

```

----------

## BonesToo

Maybe I spoke to soon.  For some reason it only stays in S3 suspend mode for 10 minutes, then it automagically turns back on.  No clue why its doing that.  Bios isn't setup to turn on by timer.

Anyone?

EDIT: Is there a way to figure out what triggered the resume/wake from standby?  I turned on verbosity but it didn't say.  What about the debugging kernel support for PM?

----------

## DigitalDan

Do you have other computers on the network that are trying to talk to your PC or is it exposed to the internet?  I'd watch the ethernet socket where the lights blink to see if they blink before the computer turns on.

----------

## BonesToo

That's a good question. I have 2 other gentoo boxes and a winxp machine, but none of them should be accessing this box. It's a htpc/mythfroned so it uses my myth server as the nfs root, but nothing else should be access it directly. I'll have to pull it out and watch the nic led. But it is a diskless machine so the nic never goes down in standby.

I doubt its a rouge wake on lan event because it stays in the power off state (which wakes on lan too).

I've even unplugged the IR receiver to make sure, but haven't unplugged the wireless usb yet.

I'm guessing this is just a kernel driver issue and might get fixed in the future. Haven't found anyone else trying to suspend this mobo yet.

----------

## BonesToo

Found a post on the AVS Forums.  Turns out in was something with the Intel ME bios settings.  Hit <Ctrl + P> at boot to get into Intel ME menu, and disable the Wake on Lan feature, note this doesn't actually disable the REAL wake on lan feature...go figure.  Now the box stays in S3 as long as I want it to  :Smile: 

Still running 2.6.30 kernel.

----------

