Subject: power management and idle detection on non-x86
To: None <tech-kern@netbsd.org>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 05/07/2006 15:05:45
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I've been working to get some sort of power management into my 
sparcbook for a while now and apart from powerhooks in many device 
drivers there are a few other things missing.
First, we need a way to know when the machine is idle so we can dim 
backlight at some point, or fall asleep. What I'd like to have is a 
bunch of 'idle timers' - just write the current timestamp into a more 
or less global variable whenever the mouse is moved, some key is 
pressed etc., probably keep different counters for different devices. 
With this we could detect 'idleness' by just comparing these variables 
to current time, if enough of them differ by some predefined value we 
can take actions. On PCs this is probably handled by the APM BIOS but 
on macppc or sparc we don't have anything like that so we need our own.
So, before I'm wasting my time inventing the wheel the 5th time - do we 
have something like this somewhere in the kernel? Should it be 
integrated with powerd? What about powerd vs. apmd? Their scopes seem 
to overlap quite a bit.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRF5FCcpnzkX8Yg2nAQL8Fwf8DDsImWi7fwjjUkl7Z6ucJ7nZqNR83cJ2
F6fcx4BZO2GZfJfp7/hgatq/ej53cXA5EO+oRmtl+EzdkeXbzJbPLNxhRGV8tLxo
MEmO6vzZk2OJR+IyXR/7xDeWaCZw0wco4yHF9/Rk70qKHaCscWg2UIdd1IomvyDN
WWMjq2S1kw+naXiwbfBCBemETstvcr1pREs5rP8icqFt7f3rSzZ8mT/Qvmo/vjNX
csgYHYb67xavvsH7x68aXgzGYuxAbiYjwpfOtPAQ55xLp/kGSyS6w4c2zcFEIB3F
tO5U9XbY2+bIrzd3bLbx8eqKuDN/SRRkcke1OiRC1F/FE0minJ32Rw==
=xtsR
-----END PGP SIGNATURE-----