lkml.org 
[lkml]   [2001]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: kernel apm code
From
Date
 David Balazic <david.balazic@uni-mb.si> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.078 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site