[ltp] Patch to reenable APM suspend on 2.6.1-rc1

Thomas Hood linux-thinkpad@linux-thinkpad.org
Wed, 28 Jan 2004 21:54:04 +0100


On Tue, 2004-01-27 at 11:47, Michael Hagemann wrote:
> On Mon, 26 Jan 2004 15:33:15 -0800 Kevin Worth wrote:
> > I still
> > can't get my /etc/apm/event.d/pcmcia script to work right so that it calls
> > "cardctl eject" when I try to suspend. I can pull the card out and it works
> > fine, but otherwise it won't suspend. What do your event.d scripts look
> > like?

Try requesting the suspend using "apm --suspend" rather than
"tpctl --suspend" or a function key.  These work differently,
as I explain in the Power management section of my web page.

    http://panopticon.csustan.edu/thood/tp600lnx.htm

If you have "cardctl eject" in an apm proxy script, put a "sleep 2"
after it so that the ejection wins the race with apmd_proxy.
Here is my /etc/apm/event.d/pcmcia script:

#!/bin/sh
case "$1,$2" in
        suspend,*) cardctl eject ; sleep 2 ;;
esac

Note that nothing needs to be done on resume.  Cardmgr will detect
the card again on resume and "insert" it without any prompting.


> This doesn't work for me either, and it always puzzled me why.  I got
> accustomed to recall "sudo cardctl eject" from shell history before
> suspending.  It's interesting that the carrier light on my card stays on
> with a 2.6 kernel.  On a 2.4 kernel the card seems to be completely shut
> off after an "eject".

Interesting.  This is another thing that could inhibit suspends.

> I also have "cardctl eject" in my event.d scripts
> and the last time I checked it got definitely called -- but didn't do
> the trick...

Strange.

-- 
Thomas Hood <jdthood2@yahoo.co.uk>