Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: mmm%informatics.rutherford.ac.uk@nsfnet-relay.ac.uk Newsgroups: comp.sys.sun Subject: Re: X crashing at irregular occasions on SUN 3's Keywords: Software Message-ID: <8905021051.AA06262@pyr-a> Date: 9 May 89 22:50:44 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 70 Approved: Sun-Spots@rice.edu Original-Date: Tue, 2 May 89 11:51:27-0000 X-Sun-Spots-Digest: Volume 7, Issue 279, message 4 of 23 paul@amos.ucsd.edu (Paul Smith) writes: > schultz@mmm.serc.mmm.com (John C Schultz): > > the display will go black and no keyboard or mouse entry is allowed. Even > > L1-A does nothing. > One thing I should make clear is that the sun isn't actually "crashed". > In our case it's only the monitor which has died It could be that the video is being turned off. Nothing will turn it on again, except something like screenblank - but even then only if it thinks >it< turned the video off, so you have to leave the keyboard and mouse idle for (by default) 10 minutes. Try explicitly turning the video back on again, or enquiring its status, with the following C program or the equivalent packaged into a shell script. __________ /* switch video on or off. Mark M Martin. March 1989 */ #include #ifndef _IO #include #endif _IO #include main(argc,argv)char **argv;{ int i,f; f = open("/dev/fb",0); if(f<0)exit(2); if(argc==2 && strcmp(argv[1],"off")==0){ i = FBVIDEO_OFF; exit(ioctl(f,FBIOSVIDEO,&i)<0); } if(argc==2 && strcmp(argv[1],"on")==0){ i = FBVIDEO_ON; exit(ioctl(f,FBIOSVIDEO,&i)<0); } if(argc!=1){ printf("usage: %s {on|off}\n",argv[0]); exit(2); } exit(ioctl(f,FBIOGVIDEO,&i)<0?2:(i==FBVIDEO_OFF?1:0)); } __________ #!/bin/sh # switch video on or off. Mark M Martin. RAL Jan 1989 tmp=/tmp/video$$ trap 'rm -f $tmp.*;exit 3' 1 2 3 15 case $1 in -off|off) code="i = FBVIDEO_OFF; exit(ioctl(0,FBIOSVIDEO,&i)<0);" ;; -on|on) code="i = FBVIDEO_ON; exit(ioctl(0,FBIOSVIDEO,&i)<0);" ;; '') code="exit(ioctl(0,FBIOGVIDEO,&i)<0?2:(i==FBVIDEO_OFF?1:0));" ;; *) echo "usage: $0 {on|off}" exit 1 ;; esac include=sys/ioccom.h if [ ! -f /usr/include/$include ] then include=sys/ioctl.h fi echo "#include <$include> #include main(){int i;$code }" >$tmp.c cc $tmp.c -o $tmp.a && $tmp.a