Thread (13 messages) 13 messages, 4 authors, 2005-06-02

Re: [RFC] Add some hooks to generic suspend code

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-06-01 08:34:44
Also in: lkml

On Wed, 2005-06-01 at 10:13 +0200, Pavel Machek wrote:
Hi!
quoted
quoted
Why do you need it? Do you initiate suspend without userland asking
you to?
Because there is an existing API, via /dev/apm_bios, and that's all X
understands ! And because I've always done that ;)
Try stopping doing that ;-).
Certainly not short-term. Again, it would be nice to have something
better, but heh, you need to go step by step. I have this big rework
where I re-implement most of the pmac suspend code on top of the generic
code (cleans up a lot of stuff) but I don't want to touch the userland
ABI for now, that would be too much of a chance. And /dev/apm_bios X
notofication stuff seems to actually fix problems for some users.
[On i386, we do not emulate apm, and it still works. Reason is that we
switch to other console before suspend, so X has to give up
framebuffer control, anyway.]
Well, I sort-of work :) I have reported cases of X locking the machine
up under some circumstances. Note that historically, I was not switching
consoles in the pmac PM code, though I'm doing it nowadays.

There are other uses of those "events" in /dev/apm_bios. Some people run
scripts on resume triggered by these for example, etc...

I'd rather not break an existing and relied upon userland interface now,
at least not until we have a well accepted replacement that has been
around for some time.

I do agree however that it may be nice to make the APM emulation code
more generic & shared between architectures. That's something I intend
to look into next. But I would like my current stuff to get in after
2.6.12 is released.

Ben.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help