[ltp] Reliable Suspend/Resume (Was:Filesystem choice?)

Richard Griffith linux-thinkpad@linux-thinkpad.org
Wed, 06 Nov 2002 19:18:14 -0500


Tod Harter wrote:
> 
> Well, If anyone has ideas, I'm glad to hear about them. I'm running 9.0 MDK
> stock kernel on A20p with 386 mb of RAM. All my hardware seems to work pretty
> reliably, so I don't THINK I have interrupt issues or anything along those
> lines. It just seems that resume from suspend hangs hard 1/3 of the time.
> Anyone else with an A20p out there that has reliable suspend/resume?

Hmmm, this sounds familiar in symptoms. This is a duplicate of a post to
another linux thinkpad list. I don't know if it is applicaple to ab
A20p, but who knows:

I use a 760XD with Red Hat 7.2. I have had occasional problems with
suspend and resume. Sometimes it would refuse to suspend. It would go
through the motions, but instead of the final power down, it would emit
a low beep and power back up. I played for some time looking for
reasons, like open network connections or other activity that might have
had any impact. I changed some PCMCIA options in /etc/sysconfig/apmd and
it seemed to make things better, but not perfect. The specific options
were:

PCMCIARESTART="yes"
PCMCIABIOSBUG="yes"
PCMCIAWAIT="no"

It seemed that if I did an eject on the wireless PCMCIA card before
suspending, it improved my odds, but it still wasn't perfect. The other
end of things, the resume, is where thing got ugly. Once in a great
while, the resume would lock up, the lcd back light came on, but the
machine seemed dead, not even a control-alt-delete would register. Hard
power off was the only answer I ever could find. This seemed to be more
likely after plugging/un-plugging the power adapter while suspended, or
while it was going down or coming up. The very frustrating part was that
these problems didn't happen all the time, just once in a while, making
finding the cause difficult.

Recently I was reading some recommendations about adding a kernel option
(CONFIG_APM_ALLOW_INTS) which sounded similar, and worth looking into. A
quick check in the kernel source showed that yes there was such an
option, but better still, you can pass an option at boot time that will
do the same thing! Much quicker that recompiling the kernel (I love my
760xd, but speed is not its primary virtue.) By adding the option
'apm=allow_ints' to the boot, my problems seem to have disappeared. I've
used this option with Red Hat supplied kernels 2.4.9-13 and 2.4.9-34
with good results. (It appears that a similar option exists with Red Hat
7.3's stock 2.4.18-3, but I have not tested with it.) Here is an example
from my /boot/grub/grub.conf

title Red Hat Linux (2.4.9-34)
        root (hd0,4)
        kernel /boot/vmlinuz-2.4.9-34 ro root=/dev/hda5 apm=allow_ints
        initrd /boot/initrd-2.4.9-34.img

You could add the same thing to lilo with an append= line. It is easy to
try and just might save you some frustration if these problems sound
familiar.

I hope this is helpful to someone, and not common knowledge that I was
the last one find out ;)
-Richard