X31 Hibernate in Ubuntu Gutsy

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
bobbarker
Sophomore Member
Posts: 158
Joined: Mon Feb 18, 2008 1:27 am
Location: Cincinnati, Ohio
Contact:

X31 Hibernate in Ubuntu Gutsy

#1 Post by bobbarker » Sun Mar 02, 2008 4:31 pm

I've tried a few different 'solutions' I've seen, some specific for the X31 and some not. From the general lack of recent information my guess is it works for most people. If you've got working hibernate on an X31 please post up your /etc/default/acpi-support and /etc/acpi/hibernate.sh files so I can try them out.
Lenovo X240: 2.1GHz i7 - 8GB - 120GB SSD - 1080p IPS - Win7
Lenovo T400: 2.53GHz - 4GB - 320GB & 100GB - Win7
IBM X60t: 1.83GHz - 2GB - 80GB - 1400x1050 - Win7

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#2 Post by aaa » Thu Mar 06, 2008 8:23 pm

Tried it and oddly enough it doesn't work with me in Ubuntu 7.10 either. It writes out the data to disk, but when it comes to loading it up again, it acts like the data isn't there, and also disables swap. Is that the same that happens with you?

On the bright side, it worked perfectly with 8.04 alpha.

bobbarker
Sophomore Member
Posts: 158
Joined: Mon Feb 18, 2008 1:27 am
Location: Cincinnati, Ohio
Contact:

#3 Post by bobbarker » Thu Mar 06, 2008 9:37 pm

Back in 7.04 it would do that for me, now it starts to write data (the screen goes away) and the terminal flashes up momentarily then returns straight to the desktop. Hopefully 8.04 will fix it. :)
Lenovo X240: 2.1GHz i7 - 8GB - 120GB SSD - 1080p IPS - Win7
Lenovo T400: 2.53GHz - 4GB - 320GB & 100GB - Win7
IBM X60t: 1.83GHz - 2GB - 80GB - 1400x1050 - Win7

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#4 Post by aaa » Thu Mar 06, 2008 11:00 pm

The screen-flash-without-turnoff usually means the swap is disabled. I had to reformat the swap every time I made a hibernation attempt, otherwise it wouldn't even get to the turning off part. But then you have update /etc/fstab since the uuid identifier of the swap changes when you format it.

bobbarker
Sophomore Member
Posts: 158
Joined: Mon Feb 18, 2008 1:27 am
Location: Cincinnati, Ohio
Contact:

#5 Post by bobbarker » Fri Mar 07, 2008 1:50 pm

The bad swap might be the problem since I deactivated (and recently removed) my swap partition. I never get above 500MB of ram use, anyway, why bother with swap...well I guess I should repartition my drives again and add swap back.
Lenovo X240: 2.1GHz i7 - 8GB - 120GB SSD - 1080p IPS - Win7
Lenovo T400: 2.53GHz - 4GB - 320GB & 100GB - Win7
IBM X60t: 1.83GHz - 2GB - 80GB - 1400x1050 - Win7

smugiri
Senior Member
Senior Member
Posts: 774
Joined: Tue Nov 23, 2004 4:29 pm
Location: Mississauga, ON
Contact:

/etc/default/acpi-support

#6 Post by smugiri » Fri Mar 07, 2008 4:46 pm

# Comment the next line to disable ACPI suspend to RAM
ACPI_SLEEP=true

# Comment the next line to disable suspend to disk
ACPI_HIBERNATE=true

# Change the following to "standby" to use ACPI S1 sleep, rather than S3.
# This will save less power, but may work on more machines
ACPI_SLEEP_MODE=mem

# Add modules to this list to have them removed before suspend and reloaded
# on resume. An example would be MODULES="em8300 yenta_socket"
#
# Note that network cards and USB controllers will automatically be unloaded
# unless they're listed in MODULES_WHITELIST
MODULES=""

# Add modules to this list to leave them in the kernel over suspend/resume
MODULES_WHITELIST=""

# Should we save and restore state using the VESA BIOS Extensions?
SAVE_VBE_STATE=true

# The file that we use to save the vbestate
VBESTATE=/var/lib/acpi-support/vbestate

# Should we attempt to warm-boot the video hardware on resume?
POST_VIDEO=true

# Save and restore video state?
# SAVE_VIDEO_PCI_STATE=true

# Should we switch the screen off with DPMS on suspend?
USE_DPMS=true

# Use Radeontool to switch the screen off? Seems to be needed on some machines
# RADEON_LIGHT=true

# Uncomment the next line to switch away from X and back again after resume.
# This is needed for some hardware, but should be unnecessary on most.
# DOUBLE_CONSOLE_SWITCH=true

# Set the following to "platform" if you want to use ACPI to shut down
# your machine on hibernation
HIBERNATE_MODE=shutdown

# Comment this out to disable screen locking on resume
LOCK_SCREEN=true

# Uncomment this line to have DMA disabled before suspend and reenabled
# afterwards
# DISABLE_DMA=true

# Uncomment this line to attempt to reset the drive on resume. This seems
# to be needed for some Sonys
# RESET_DRIVE=true

# Add services to this list to stop them before suspend and restart them in
# the resume process.
STOP_SERVICES=""

# Restart Infra Red services on resume - off by default as it crashes some
# machines
RESTART_IRDA=false

# Switch to laptop-mode on battery power - off by default as it causes odd
# hangs on some machines
ENABLE_LAPTOP_MODE=false

# Spindown time on battery
SPINDOWN_TIME=12
Steve

smugiri
Senior Member
Senior Member
Posts: 774
Joined: Tue Nov 23, 2004 4:29 pm
Location: Mississauga, ON
Contact:

/etc/acpi/hibernate.sh

#7 Post by smugiri » Fri Mar 07, 2008 4:47 pm

#!/bin/bash

. /etc/default/acpi-support
. /usr/share/acpi-support/power-funcs
. /usr/share/acpi-support/policy-funcs

if [ x$ACPI_HIBERNATE != xtrue ] && [ x$1 != xforce ]; then
exit;
fi

# Unset video posting - it's not needed for suspend to disk
unset POST_VIDEO
unset USE_DPMS

. /etc/acpi/prepare.sh

#if [ x$LOCK_SCREEN = xtrue ]; then
# for x in /tmp/.X11-unix/*; do
# displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
# getXuser;
# if [ x"$XAUTHORITY" != x"" ]; then
# export DISPLAY=":$displaynum"
# . /usr/share/acpi-support/screenblank
# fi
# done
#fi

echo -n $HIBERNATE_MODE >/sys/power/disk

if [ -x /sbin/s2disk ]; then
DEVICE="/dev/disk/by-uuid/`awk -F= '{print $3}' </etc/initramfs-tools/conf.d/resume`"
if [ -f /etc/usplash.conf ]; then
. /etc/usplash.conf
/sbin/s2disk -x "$xres" -y "$yres" $DEVICE
else
/sbin/s2disk $DEVICE
fi
else
echo -n "disk" >/sys/power/state
fi

$LAPTOP_MODE stop

. /etc/acpi/resume.sh
Steve

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#8 Post by aaa » Fri Mar 07, 2008 5:56 pm

Anyways, on my end it just turned out to be because of my having both Hardy and Gutsy on there, which mixed up the swap UUID, which lead to poking around in two different grub.conf files... It works now.

As far as I can tell bobbarker's problem was simply not having a swap partition.

bobbarker
Sophomore Member
Posts: 158
Joined: Mon Feb 18, 2008 1:27 am
Location: Cincinnati, Ohio
Contact:

#9 Post by bobbarker » Fri Mar 07, 2008 8:19 pm

I made a swapfile (gotta love dd) and threw it in to fstab-- I'll try those conf files once I finish rebuilding my battery (cells just arrived today).
Lenovo X240: 2.1GHz i7 - 8GB - 120GB SSD - 1080p IPS - Win7
Lenovo T400: 2.53GHz - 4GB - 320GB & 100GB - Win7
IBM X60t: 1.83GHz - 2GB - 80GB - 1400x1050 - Win7

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#10 Post by aaa » Fri Mar 07, 2008 8:26 pm

I believe it must be a partition, not a file.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 0 guests