Re: Trying to use sleepd for inactivity
On 4 Jun, this message from Stephen van Egmond echoed through cyberspace:
> sleepd works by watching the IRQ bus for interrupts. Specifically,
> looking through the code it looks through /proc/interrupts for anything
> that looks like an interrupt for a mouse or keyboard.
>
> Here's what my /proc/interrupts looks like. I'm using an iBook DV 466.
>
> CPU0
> 19: 21205 OpenPIC Level ide0
> 20: 244 OpenPIC Level ide1
> 25: 783175 OpenPIC Level VIA-PMU
> 27: 8 OpenPIC Level usb-ohci
> 41: 23559 OpenPIC Level eth0
> 47: 230550 OpenPIC Level GPIO1/ADB
> 55: 0 OpenPIC Edge NMI - XMON
> BAD: 166
>
> (one second later, i don't touch the keyboard)
>
> CPU0
> 19: 21208 OpenPIC Level ide0
> 20: 244 OpenPIC Level ide1
> 25: 783182 OpenPIC Level VIA-PMU
> 27: 8 OpenPIC Level usb-ohci
> 41: 23565 OpenPIC Level eth0
> 47: 230561 OpenPIC Level GPIO1/ADB
> 55: 0 OpenPIC Edge NMI - XMON
> BAD: 166
166 BAD interrupts? that's a lot...
> Now of course, iBooks being the freaky brainchild of Apple,
Watch your tongue :)
> they don't
> do anything quite so mundane as use, you know, interrupts for the
> keyboard.
Oh, they do, just not in the way that a freaky i386 developer expects.
When you only have 15 IRQs, reserving one for only the keyboard may not
be the most efficient use of system resources...
> Everything gets delivered through ADB, which appears to be
> delivering heartbeat interrtupts, since it goes up by about 10 every
> second.
ADB, or rather the PMU, is delivering lots of things. Among others the
power management events.
> I wonder if anyone knew of a better way to watch for system activity in
> any meaningful way?
Maybe try and watch /dev/input/* ? That's where keyboard and mouse
events get delivered. Then again, it all depends on your definition of a
'meaningful way'...
Cheers
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email mlan@cpu.lu |
http://www.cpu.lu/~mlan | Learn Always. "
--
To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: