Have to force s2ram to suspend. /etc/hibernate/ususpend-ram.conf is the place to define this. This file provide sample config entries: - USuspendRamForce - USuspendRamVbeSave - USuspendRamVbePost But enabling this values does not have any effect. I tracked this down to a coding error in /usr/share/hibernate/scriptlets.d/ususpend. The patch i provide here seem to solve the problem: --- ususpend.orig 2007-04-13 12:02:22.000000000 +0200 +++ ususpend 2007-05-25 13:29:51.000000000 +0200 @@ -80,7 +80,7 @@ if [ -z "$USUSPEND_NO_SUSPEND" ] ; then vecho 1 "$EXE: Running $USUSPEND_PROG_PATH ${FORCE:+$FORCE }..." ARGS= - if ["$USUSPEND_PROG" = s2ram ]; then + if [ $USUSPEND_PROG = s2ram ]; then [ $USUSPEND_RAM_FORCE -eq 1 ] && ARGS="$ARGS -f" [ $USUSPEND_RAM_VBESAVE -eq 1 ] && ARGS="$ARGS -s" [ $USUSPEND_RAM_VBEPOST -eq 1 ] && ARGS="$ARGS -p" Reproducible: Always Steps to Reproduce: 1.Get PC to suspend, but not known to s2ram 2.Enable USuspendRamForce in /etc/hibernate/ususpend-ram.conf 3.Execute hibernate-ram Actual Results: Does not hibernate. Expected Results: Suspend to RAM (S3) Portage 2.1.2.7 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r2, 2.6.20-gentoo-r8 i686) ================================================================= System uname: 2.6.20-gentoo-r8 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz Gentoo Base System release 1.12.9 Timestamp of tree: Mon, 21 May 2007 21:20:01 +0000 dev-java/java-config: 1.3.7, 2.0.31-r5 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=i686 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=i686 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="de_DE@euro" LINGUAS="de en" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/own" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X aac acl acpi alsa arts berkdb bitmap-fonts bluetooth cdr cli cracklib crypt cups dbus dga dri dv dvb dvd dvdr dvdread exif ffmpeg firefox foomaticdb fortran ftp gdbm gif gnome gphoto2 gpm gtk hal iconv ieee1394 imagemagick imap irda isdnlog java jpeg kde kdehiddenvisibility libg++ lirc lm_sensors midi mmx mng mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python qt3 readline reflection samba scanner session slp spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode usb v4l vcd vorbis wifi win32codecs wmf x86 xine xinetd xml xorg xpm xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" DVB_CARDS="usb-wt220u" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" LIRC_DEVICES="all" USERLAND="GNU" VIDEO_CARDS="ati fbdev fglrx v4l vesa vga" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 120276 [details, diff] ususpend scriptlet patch The same patch as shown above as seperate file.
Thank for this patch. But it makes no sense... The quotes must be there... Unless there is a space/tab whatever character there... Can you please check it out: echo -n "$USUSPEND_PROG" | od -tx1 Thanks!
I did several tests. With the quotes it never enters the if clause. Without them it enters the block if s2ram was the contents of the variable. The output of the exho statement is: 0000000 73 32 72 61 6d 0a 0000006 It seems the linefeed at the end is the culprit. Though i am not a script programmer you may have a better fix for that. N.b.: I called hibernate-ram to test this.
I think I found: -if ["$USUSPEND_PROG" = s2ram ]; then +if [ "$USUSPEND_PROG" = s2ram ]; then Mind the extra space.
Confirmed. Your change works for me. Could you add a patch to the mainstream ebuild ? I think also it would be good to contact the author of these scripts and let him know the problem.
OK. Thanks. I will commit this to upstream.