![]() |
APMD-List: |
to APMD Home
|
Index:
[thread]
[date]
[subject]
[author]
From: Chris Worley <cworley@symbionsys.com> To : <apmd-list@worldvisions.ca> Date: Wed, 19 Jul 2000 21:55:51 -0600 Re: Using power switch to go into standby modeCraig Markwardt wrote: > > Chris Worley writes: > > Jont Allen wrote: > > > Chris Worley wrote: > > > > > > > > > > > > I looked at apmd_proxy, but I don't see how to specify: "if power off > > > > then standby instead". > > > > > > The response you got from Craig Markwardt is the definative answer. > > > He said that "power off" is not supported by the apm kernel module. > > > > It must be supported in the APM kernel module. If I compile the kernel > > without APM support, then the power switch has no effect (I have to pull > > the plug). Likewise, if I panic a kernel with APM support, the power > > switch no longer works. >... > The BIOS may pass some power management messages to the kernel when > the button is pressed, like, "I'm about to power down!" or "Now > entering standby mode!" but those actions are determined by the BIOS, > not Linux. The hardware is there, everything probably works, but > there's just no way for the APM BIOS to communicate these kinds of > events. As David Brownell mentions, you may be able to configure it > from the BIOS menu. The bios has a setting: soft-off by PWRBTN: [delay 4 sec | Instant-Off] Setting it to "Instant-off", the default, behaves like you describe. The kernel gets the power-off message, but can't do anything to stop it. If I set it to "delay 4 sec", then I get a suspend message instead. This brings about other problems: The pegasus USB nic driver goes nuts (recursive panics), and a "resume" message is sent from the bios about five seconds after the suspend is sent. This is true with "apm -s" too. Standby, behaves similarly, but doesn't cause the pegasus driver to panic the kernel: the screen blanks for about 5 seconds, then a resume message is sent from the bios. I can effect the "suspend" message coming from the bios, and change it to a standby. in "check_events" in "apm.c" I changed the "case APM_SYS_SUSPEND" to: > apm_set_power_state(APM_STATE_REJECT); > standby(); > break; I'm guessing I'm rejecting the suspend request, and changing it to a standby. This could just be changing the kernel to think it's a standby, and not doing "whatever" to the USB drivers that drives them nuts. So, now I can make the power button cause a standby... but five seconds later, a resume is received, and I, again, can't do anything about that message (I've tried: I can force a standby whenever a resume message is given, which causes an endless loop of standby/resume and display off/on). The resume message needs to be inhibited before it reaches the kernel. Any idea where this resume is coming from, and/or how can I stop it? > The ACPI specification, however, provides lots of ways to program and > manage special hardware buttons and switches. Here, it's built right > into the specification, so there needn't be any monkeying around in > the BIOS. Of course, as I mentioned, the Linux ACPI support is still > rather embryonic. ACPI doesn't like the I-Opener at all. I've posted to that group without reply. I've given up trying. > > It is likely that the QNX operating system (which originally ran on > your machine, yes?), was specially modified for the hardware. Yes. That is the behavior I'm trying to duplicate. Thanks, Chris Index: [thread] [date] [subject] [author] |