Subject: issues with screenblank and wscons
To: None <>
From: Kailash Sethuraman <>
List: tech-userlevel
Date: 11/25/2004 15:28:52
I have been poking at screenblank in an attempt to get it to work with wscons. 
In its current state, stat's on the devices dont  correctly detect activity.
Calling open on  wskbd or any ws* related device detaches it from the
parent mux, hence any approach involving this is also not feasible.
So from what I can gather, the only approach seemed to be opening the
ttyE* devices and periodically checking them for activity.  Using
kqueues and applying the EVFILT_READ on these devices seem to
correctly detect input , while ignoring output.  I have attempted on a
patch that implements this, its at  
Its against screenblank.c distributed with NetBSD 2.0RC1.
This mostly works for all normal console activity. 
However this approach is also flawed as it can only detect chars going
 to the tty, and not incoming through the keyboard. For example, this
method fails when I ssh into another box from the console.
This has led me to believe that kernel modification would be necessary
to fix screenblank. Perhaps adding an ioctl to wsdisplay or something
higher to return the time of the last wsevent? Is the need for this