Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!agate!root From: izumi@pinoko.berkeley.edu (Izumi Ohzawa) Newsgroups: comp.sys.next Subject: Yet another way to dim your screen... Keywords: screen saver, auto-dim Message-ID: <1991May31.003447.9457@agate.berkeley.edu> Date: 31 May 91 00:34:47 GMT Sender: root@agate.berkeley.edu (Charlie Root) Reply-To: izumi@pinoko.berkeley.edu Organization: University of California, Berkeley Lines: 60 On my cube, the default auto-dimming doesn't lower the brightness of the screen enough. Although there are numerous screen dimmers, most of them require you to run a process while dimming is in effect. I don't want to run a process just to do screen dimming, especially when there is an auto-dimmer built into loginwindow. I looked for ways to lower the auto-dim brightness, and sure enough found this in . ---- /* Device control ioctls. Note that these set the current value but do not affect parameter RAM. */ #define EVSIOSADB _IOW('e', 104, int) /* Set AutoDim Brightness */ #define EVSIOCADB _IOR('e', 105, int) /* Current AutoDim Brightness */ ---- Running the program below once when you are logged in shows that the default auto-dim brightness is 15, and this program will set it to 0, making the screen A LOT dimmer than the standard setting. The white regions are faintly visible on some monitors, but it is dark enough for me. Other monitors are completely blanked by this. This is more-or-less what I wanted. THE PROBLEM is that the auto-dim brightness is reset to 15 on next workspace login. It seems to persist after logout, though. So, my questions today are: [1] Does anybody know how one can make the auto-dim brightness value permanent? [2] Where is the "parameter RAM" the comment in evsio.h is referring to? --- cut -- setautodim.c --------------- #include #include int main( int argc, char **argv) { int o_dim,n_dim; int evs=open( "/dev/evs0",O_RDWR); if ( evs < 0) { perror ("/dev/evs0"); exit(10); } ioctl(evs, EVSIOCADB, &o_dim); printf("Current auto-dim brightness: %d, setting it to 0.\n", o_dim); n_dim = 0; ioctl(evs, EVSIOSADB, &n_dim); exit(0); } --- cut --- --- Izumi Ohzawa [ $@Bg_78^=;(J ] USMail: University of California, 360 Minor Hall, Berkeley, CA 94720 Telephone: (415) 642-6440 Fax: (415) 642-3323 Standard mail: izumi@violet.berkeley.edu NeXTmail: izumi@pinoko.berkeley.edu