Discussion:
suspend/resume on T22 running 5.2.1
(too old to reply)
d***@langille.org
2004-04-26 12:47:59 UTC
Permalink
Hi,

I've recently starting using suspend/resume on my ThinkPad T22. I've
found that running "acpiconf -s S3" works well. After finding that
my mouse did not function after resume, I added
'hints.psm.0.flags="0x2000"' to /boot/device/hints. The mouse now
functions after resume.

I also added this to /etc/sysctl.conf

# do not sleep when the lid is closed
hw.acpi.lid_switch_state=S0

# do not power up again when powered off
hw.acpi.disable_on_poweroff=0

My next goal is to find a way to easily restore wi0 and the default
route after resume. Issuing the following commands after resume
fixes networking:

sh /etc/start_if.wi0 # restores SSID etc
kill -TERM `cat /var/run/dhclient.pid` # kill existing dhclient
dhclient wi0

Any suggestion?

cheers
--
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/
s***@teardrop.org
2004-04-26 13:26:36 UTC
Permalink
Post by d***@langille.org
I've recently starting using suspend/resume on my ThinkPad
T22. I've found that running "acpiconf -s S3" works
well. After finding that my mouse did not function
after resume, I added 'hints.psm.0.flags="0x2000"' to
/boot/device/hints. The mouse now functions after resume.
Are you using moused or an external mouse? I have X
accessing the pointer at the center of the keyboard directly
via /dev/psm0 on my T22 and it's always come back fine after
a suspend/resume.
Post by d***@langille.org
My next goal is to find a way to easily restore wi0 and
the default route after resume.
I'd be interested to see where you get with this. My ath0
goes away on suspend and won't come back until the card is
removed and reinserted.


-Snow
d***@langille.org
2004-04-26 14:21:40 UTC
Permalink
Post by s***@teardrop.org
Post by d***@langille.org
I've recently starting using suspend/resume on my ThinkPad
T22. I've found that running "acpiconf -s S3" works
well. After finding that my mouse did not function
after resume, I added 'hints.psm.0.flags="0x2000"' to
/boot/device/hints. The mouse now functions after resume.
Are you using moused or an external mouse? I have X
accessing the pointer at the center of the keyboard directly
via /dev/psm0 on my T22 and it's always come back fine after
a suspend/resume.
I am using moused: /usr/sbin/moused -3 -p /dev/psm0 -t auto
Post by s***@teardrop.org
Post by d***@langille.org
My next goal is to find a way to easily restore wi0 and
the default route after resume.
I'd be interested to see where you get with this. My ath0
goes away on suspend and won't come back until the card is
removed and reinserted.
I suspect that writing a little script will be what's needed.

I think what I really want to get working is hibernate. My
understanding is suspend just puts you to sleep: battery power is
still used. Hibernation actually saves stuff to disk and restores
from that later. The advantage to hibernation is that it does not
use battery power.
--
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/
t***@nas.nasa.gov
2004-04-27 00:12:44 UTC
Permalink
Post by d***@langille.org
I think what I really want to get working is hibernate.
Start by creating a hibernation partition on your ThinkPad. See

http://www.pc.ibm.com/qtechinfo/MIGR-4PESMK.html
--
M/S 258-5 |1024-bit PGP fingerprint:|***@nas.nasa.gov
NASA Ames Research Center | 41 B0 89 0A 8F 94 6C 59| (650) 604-4416
Moffett Field, CA 94035-1000| 7C 80 10 20 25 C7 2F E6|FAX: (650) 604-4377
Not an official NASA position. You can't even be certain who sent this!
s***@teardrop.org
2004-04-27 01:34:28 UTC
Permalink
Post by t***@nas.nasa.gov
Start by creating a hibernation partition on your ThinkPad. See
http://www.pc.ibm.com/qtechinfo/MIGR-4PESMK.html
Is this needed even if hw.acpi.s4bios=0?

I distinctly remember reading somewhere that laptop
hibernation required some kind of Windows partition in order
to work, but I was unclear what relationship that had to the
value of hw.acpi.s4bios.


-Snow
d***@langille.org
2004-04-27 01:45:08 UTC
Permalink
Post by t***@nas.nasa.gov
Post by d***@langille.org
I think what I really want to get working is hibernate.
Start by creating a hibernation partition on your ThinkPad. See
http://www.pc.ibm.com/qtechinfo/MIGR-4PESMK.html
I've been to that URL before. I was/am concerned that FreeBSD is not a
supported OS. The disk in question has both Windows 98 (rarely used) and
FreeBSD 5.2.1. Your recommendation is to proceed with the utility at that
URL?
--
Dan Langille - BSDCan: http://www.bsdcan.org/
p***@pir.net
2004-04-28 00:49:24 UTC
Permalink
Post by d***@langille.org
I've been to that URL before. I was/am concerned that FreeBSD is not a
supported OS. The disk in question has both Windows 98 (rarely used) and
FreeBSD 5.2.1. Your recommendation is to proceed with the utility at that
URL?
The OS tells the bios to suspend and the bios uses the dos-level slice
to suspend to. Yes, create the suspend to disk partition/slice as IBM
recommend (that's what I use with -stable and my X30 and have been for
some time now. I've also posted information about this to the list
before, if you read the archives).

P.
--
pir
t***@nas.nasa.gov
2004-04-27 01:49:04 UTC
Permalink
Post by s***@teardrop.org
Post by t***@nas.nasa.gov
Start by creating a hibernation partition on your ThinkPad. See
http://www.pc.ibm.com/qtechinfo/MIGR-4PESMK.html
Is this needed even if hw.acpi.s4bios=0?
I distinctly remember reading somewhere that laptop hibernation required
some kind of Windows partition in order to work, but I was unclear what
relationship that had to the value of hw.acpi.s4bios.
This partition (oops, slice) is known only to the BIOS. The way
hibernation works under STABLE is that the BIOS tells FreeBSD to go to
sleep, and then the BIOS copies a memory image to the slice it recognizes
as being good for hibernation data and turns the power off.

Later, when the BIOS is in control during power-up, it recognizes
hibernation status and copies the hibernation slice into memory before
transferring control to it.

I suppose FreeBSD 5 could duplicate the BIOS's hibernation support.
Windows 2000 did that. Seems wasteful, but then so does Win2k. I can't
tell you for sure, having set up hibernation for my T23 on STABLE and not
on version 5.
--
M/S 258-5 |1024-bit PGP fingerprint:|***@nas.nasa.gov
NASA Ames Research Center | 41 B0 89 0A 8F 94 6C 59| (650) 604-4416
Moffett Field, CA 94035-1000| 7C 80 10 20 25 C7 2F E6|FAX: (650) 604-4377
Not an official NASA position. You can't even be certain who sent this!
t***@nas.nasa.gov
2004-04-27 02:17:00 UTC
Permalink
I was/am concerned that FreeBSD is not a supported OS.
That doesn't matter, because hibernation to the slice created by the
floppy stand-alone program at

http://www.pc.ibm.com/qtechinfo/MIGR-4PESMK.html

is a BIOS function, not an OS function. The only OS aspect is that the
BIOS tells the OS to go to sleep before copying everything to disk and
turning the power off.
The disk in question has both Windows 98 (rarely used) and FreeBSD
5.2.1. Your recommendation is to proceed with the utility at that URL?
Yes, AFTER you have created enough unused space at the end of your disk
for the slice and after you have made sure that the fourth location in the
standard slice table is available for use. The space required will be a
"little more" than the amount of real memory in your machine. I
artificially expanded mine, to 2,116,800 disk blocks so if I ever throw
out my 256 MB memory boardlet and install a second 512 MB boardlet, I will
have enough space for a gigabyte of real memory.

I should emphasize again that I have done this successfully, using STABLE
and Win2k as the two systems on my T23. Version 5 mileage may vary, but
this looks to me like the right place to start.
--
M/S 258-5 |1024-bit PGP fingerprint:|***@nas.nasa.gov
NASA Ames Research Center | 41 B0 89 0A 8F 94 6C 59| (650) 604-4416
Moffett Field, CA 94035-1000| 7C 80 10 20 25 C7 2F E6|FAX: (650) 604-4377
Not an official NASA position. You can't even be certain who sent this!
r***@psg.com
2004-04-27 04:49:12 UTC
Permalink
Post by d***@langille.org
# do not power up again when powered off
hw.acpi.disable_on_poweroff=0
this has stopped working for me.

i get a good suspend the fist time. but if i resume and
try to suspend again, it wakes up instantly.

randy
Loading...