Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!news.hawaii.edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!rice!news.Rice.edu!rich From: rich@Rice.edu (Richard Murphey) Newsgroups: comp.unix.bsd Subject: Re: X386 and keyboard locking! Message-ID: <RICH.92Aug7153414@kappa.Rice.edu> Date: 7 Aug 92 21:34:14 GMT References: <1992Aug7.171205.10281@gumby.dsd.trw.com> <1992Aug7.181344.497@zip.eecs.umich.edu> <1992Aug7.190805.21846@pasteur.Berkeley.EDU> Sender: news@rice.edu (News) Reply-To: Rich@rice.edu Organization: Department of Electrical and Computer Engineering, Rice University Lines: 60 In-Reply-To: sim@cory.Berkeley.EDU's message of 7 Aug 1992 19:08:05 GMT In article <1992Aug7.190805.21846@pasteur.Berkeley.EDU> sim@cory.Berkeley.EDU (Peng-Toh Sim) writes: In article <1992Aug7.181344.497@zip.eecs.umich.edu> dmuntz@dip.eecs.umich.edu (Daniel A Muntz) writes: >In article <1992Aug7.171205.10281@gumby.dsd.trw.com> hubbell@gumby.dsd.trw.com (Steve Hubbell) writes: >>Problem 1: >>Once the X server is started, my keyboard is 100% dead. Nothing works >>including ctrl+alt+backspace. This is the most severe of my problems. > >I've been corresponding with several people via email who have been having >similar problems, so I've decided to post this... > >I have the same problem. However, after I kill the first server, all subsequent >servers work correctly. [stuff deleted] > -Dan Hi I have encountered this problem before but with the earlier binaries from rich@lamprey.utmb.edu . I am still using those binaries but I have worked around this problem. This is somehow related to /dev/vga and /dev/console messing with each other. I thought Rich had merged this into the X386 server itself yep, it was aded to the server. (like he said he would do for "runx" to restore the text mode. No, I'm not flaming him. I just haven't tried the new binaries.) it turns out there is already code in the server to reset the vga registers. I haven't tracked it down completely. To solve this problem, compile the following program and run it in your .xinitrc. This is only a workaround, I don't know what the real bug is, or if it works with the new binaries, though I suspect it will. PT --- cut here --- #include <sys/file.h> void main(void) { close(open("/dev/vga", O_RDWR | O_NDELAY)); close(open("/dev/console", O_RDWR | O_NDELAY)); } The opening and then closing /dev/console has the side effect of taking the keyboard out of `pc_xmode'. When pc_xmode is non-zero (in pccons.c) raw scan codes are read from /dev/console. When pc_xmode is zero ascii characters are read. This isn't the most elegant solution. It's actually a problem if you open and then close /dev/console while the server is running --- that will cause ascii characters rather than scan codes to be read by the server, which won't work at all. That's what Pace Willison's pccons.c patches do. It's possible there are other side effects. So, since opening and closing /dev/console could actually helps in one case, i'm curious about what the interaction is. Rich --