apmd_proxy and ac power WAS: suspend/Thinkpad A20p/Woody/apmd_proxy
Your message reminded me of a similar problem. My dell cpx500 has
options to suspend when closing the laptop on battery or on ac power.
Suspend when closing on battery was working fine, but suspend when
closing on ac power caused the machine to lock up so I had disabled it
in the BIOS. After seeing your email, I commented out the check which
blocks suspend on ac power, enabled the option in the BIOS and was able
to suspend and resume when closing the lid on ac power.
I'm inclined to think the current scripts are buggy. Locking the
machine is not good.
#if [ "$1,$2" = "standby,system" -o "$1,$2" = "suspend,system" ]; then
# if on_ac_power >/dev/null; then
# # Reject system suspends and standbys if we are on AC power
# exit 1 # Reject (NOTE kernel support must be enabled)
# # otherwise fall through and call the scripts!
The script does say kernel support must be enabled, but what does that
mean? Is there some way to ask the kernel if it has the required
support? I think it would be much better to query the running kernel
for this support than to lock the machine if it's not present.
I'm also not sure what "NOTE kernel support must be enabled" means. I've
got APM support in my kernel and everything seems to work fine now that
the "exit 1" statement is commented out. Is there some specific variable
that needs to be set? Here's my current APM config:
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set
# CONFIG_TOSHIBA is not set
I'm probably going to file a bug on this if there's not one already
there. But I was hoping someone on the list might be able to propose a
On Sun, Apr 29, 2001 at 11:24:24PM +0100, Vivek Dasmohapatra wrote:
> Hi - just a heads up:
> I upgraded to woody recently, and discovered a quirk in the apmd_proxy
> script: It short circuits and ignores system suspend events when
> on_ac_power returns true: This has the unfortunate effect of not
> shutting down the alsa-sound stuff and misc other things, which
> unfortunately means that when the laptop resumes [after a fn-F4], all the
> stuff which should have been brought back to life safely is borked, and
> needs to be restarted.
> I've fixed it [for myself] by removing the short-circuit for
> system-suspend when on ac, but perhaps the script should dispatch events
> to 2 directories - one for things you want to do when on battery, and one
> for things that should happen when on ac power....
> Apart from that, everything seems to have worked fine: [well, I haven't
> checked pcmcia - I'll have to borrow a card off someone and test it - and
> maybe irda works reliably now... have to test that too]
Lee Bradshaw lee@sectionIV.com
Texas Instruments firstname.lastname@example.org