You are not logged in.
Pages: 1
I got my computer to go to sleep ok when I shut the lid but it's having some issues waking up. When it wakes up I can get back to X and type some commands but something is not right and I can't pinpoint it. For instance the terminal window will freeze on issuing a ping command. The most obvious sign something is amiss is when I try to edit the suspend to ram script I have. I get this message:
E325: ATTENTION
Found a swap file by the name "/usr/sbin/.susp2ram.swp"
owned by: root dated: Wed Jun 1 19:08:08 2005
file name: /usr/sbin/susp2ram
modified: no
user name: root host name: spycamera
process ID: 4021
While opening file "/usr/sbin/susp2ram"
dated: Wed Jun 1 19:21:28 2005
NEWER than swap file!
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /usr/sbin/susp2ram"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/usr/sbin/.susp2ram.swp"
to avoid this message.
Swap file "/usr/sbin/.susp2ram.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it:
Something must be amiss somewhere but I don't know where... Here is the script:
#!/bin/bash
# Suspen-to-RAM script for IBM x41 and Arch Linux
# --------Suspend ----------
# Stop networking
/etc/rc.d/network stop
# Unload network drivers
modprobe -r ieee802111_crypt
modprobe -r ieee80211
modprobe -r ipw2200
modprobe -r tg3
# Suspend to RAM
echo mem > /sys/power/state
# --------Resume -----------
# Reset the hard disk, otherwise it is not accessible
hdparm -y /dev/sda
# Configure the drive (32-bit IO, UDMA,umaskirq)
#hdparm -c3 -d1 -u1 /dev/sda
#Switch virutal terminal to wake graphics up
chvt 1
chvt 7
# Start Networking
modprobe tg3
modprobe ipw2200
modprobe ieee80211
modprobe ieee80211_crypt
/etc/rc.d/network start
exit 0
Note that I know I'm using /dev/sda -- I don't have a /dev/hda on my laptop for some reason. (Thinkpad X41) Also, the second hdparm line is disabled on purpose since those commands aren't supported by the sda drive.
Offline
The following is from rc.sysinit, I think you need to do something similar in your script:
stat_busy "Configuring System Clock"
if [ "$HARDWARECLOCK" = "UTC" ]; then
/sbin/hwclock --utc --hctosys
else
/sbin/hwclock --localtime --hctosys
fi
if [ ! -f /var/lib/hwclock/adjtime ]; then
echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
fi
if [ "$TIMEZONE" != "" ]; then
/bin/ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
fi
stat_done
Offline
Why don't you use the hibernate scripts?
Offline
i3989: I'm not sure what the purpose of adding that to the script would be.. My feeling is that something is remaining suspended after I resume. I have to manually change terminals to VT7 even though I have that /usr/bin/chvt 7 line.
big_gie: I'm not familiar with those scripts -- can you point me to them?
Offline
suspend2.net
hit their download page and grab their scripts.
They are oriented towards software suspend2 but they include options to suspend with suspend to ram instead.
Offline
There is a PKGBUILD somewhere on the forum I think. Could be usefull.
Offline
Pages: 1