David Balazic <[EMAIL PROTECTED]> writes:

> John Fremlin wrote:

[...]

> > > To implement off-button you only need the APM_IOC_REJECT ioctl and
> > 
> > The problem on my computer with my (re)implementation of
> > APM_IOC_REJECT is that the screen goes into powersaving when the user
> > suspend is received, then turns it back on when APM_IOC_REJECT is sent
> > by apmd.
> 
> What is wrong with that ?

> Suspend is requested -> suspend is executed

> Suspend is canceled (rejected) -> suspend is canceled
> 
> Seems perfectly OK to me.

The sequence is in fact: suspend requested by BIOS -> suspend accepted
by kernel -> SUSPEND -> suspend rejected by apmd which is passed on by
kernel to BIOS -> REJECT=RESUME (if I understand correctly, this is
what seems to happen).

Sequence should be as in pmpolicy patch: suspend requested by BIOS ->
/sbin/powermanger decides to reject -> REJECT

[...]

> > Anyway it is fixed in my pmpolicy patch, and I don't need no
> > daemon so the code is a lot cleaner and simpler (no binary magic
> > number interfaces).
> 
> But there should be no policy in the kernel ! ;-)

Read the patch. Read the webpage:

        http://john.snoop.dk/programs/linux/offbutton

There is no policy in kernel.

-- 

        http://www.penguinpowered.com/~vii
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to