APMD-List:
Archives

  
Back

to

APMD

Home

      Index: [thread] [date] [subject] [author]
  From: Avery Pennarun <apenwarr@worldvisions.ca>
  To  : Jamie Zawinski <jwz@jwz.org>
<apmd-list@worldvisions.ca> Date: Sat, 5 Jun 1999 15:25:08 -0400

Re: apmd 3.0b6 and Thinkpad 770ED

On Thu, May 27, 1999 at 08:00:07PM -0700, Jamie Zawinski wrote:

> Guys, I hate to tell you this, but apmd just doesn't work at all on a
> Thinkpad 770ED.
> 
> It has quite a few horrible behaviors, including: making the kernel
> pause for 30 seconds when I close the lid and I'm attached to a dock;
> refusing to go into suspend mode when I close the lid or do the magic
> keyboard gesture; similarly refusing to go into hibernate mode; not
> waking up when I open the lid until I've closed the lid and opened it
> again; and at least a few other confusing acts of randomness.

Scary!

> I believe that all of these problems go away when I kill apmd, but
> at least some problems have persisted, and only go away when I kill
> apmd, reboot, and don't start it.
> 
> I've had this machine for about six months, and have never had any
> apm-related problems in that whole time, until I started using apmd 
> last week.

The problem is that the kernel APM support doesn't really "do" anything
until you run apmd.  That is, even if your kernel didn't have APM support,
the APM BIOS can still do things like suspend/resume, power saving, screen
blanking, etc.  When kernel apm is turned on, it does a few minor operations
(especially fixing the clock) but nothing that takes very long.

The apmd program makes things much more complicated -- it runs programs,
pauses, logs messages, might need to be swapped in (and run the drive), etc. 
If your APM BIOS is flaky, running apmd is a great way to find out.

> I would be happy to spend some time to help you debug this, but you're
> going to have to talk me through it, because I know nothing about this
> stuff (and there is, as far as I can tell, no documentation.)

I don't really know enough about APM BIOS implementations to be able to help
much.  I'm guessing that one or more of several possible bugs is biting:

  - CPU slows down too soon.  If the APM BIOS slows down your CPU to "save
    power" _before_ notifying the kernel, everything will run horribly
    slowly.

  - maximum delay before suspending.  apmd might take longer to suspend than
    your BIOS expects, and it might blow up.
    
  - hard drive access.  Maybe your BIOS doesn't like using the HD just
    before suspending.  apmd usually requires this.

> I don't know where to begin -- aside from "don't run apmd."

Is this a bad plan for you?  I know, it sucks, but if your APM support is
really truly messed up, I don't know what else to say.

> If the problem is really that the machine is not complying with the APM
> standard (which I doubt, but which is possible) then let's isolate the
> nature of the problem, rather than just guessing, and either come up
> with a workaround, or clearly understand and document *why* one can't
> run apmd on Thinkpads.

Some people _can_ run apmd on Thinkpads.  One person sent me a patch to make
it work on his _particular_ Thinkpad, and that's in the latest apmd.  (I
don't understand why it helps, but apparently it does.)

Anyone who can offer more insight -- please do!

Have fun,

Avery


Index: [thread] [date] [subject] [author]


Write to me! apenwarr@worldvisions.ca