*BSD News Article 10499


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA210 ; Fri, 29 Jan 93 14:00:41 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!swrinde!cs.utexas.edu!uunet!email!mbirgmei
From: mbirgmei@email.tuwien.ac.at (Martin BIRGMEIER)
Subject: Re: [386bsd] X broken with new patchkit ?
Message-ID: <1993Jan28.081304.27615@email.tuwien.ac.at>
Organization: Technical University of Vienna
References: <4374@wzv.win.tue.nl>
Date: Thu, 28 Jan 1993 08:13:04 GMT
Lines: 128

In article <4374@wzv.win.tue.nl> guido@gvr.win.tue.nl (Guido van Rooij) writes:
>I installed the new patchkit a few days ago. I also had keycap-0.1.1 (codrv)
>installed. This used to work fine, but now that I've installed the new
>patchkit, the keyboard isn't functioning quite well anymore when using X.
>Symptoms are that after pressing a key you have to wiat several seconds
>for the key to become visible on your xterm UNLESS you move your mouse..
>then the char immediately shows up. Anyone having the same behaviour?
>
>
>-Guido

Ok I had the same problems (plus a discussion with Nate Williams about it)
until I finally fixed it (at least it seems so :-)). Here is the patch:

------------------------------ cut here ------------------------------
*** /usr/src/sys.386bsd/i386/isa/co_kbd.c.CODRVP_ORIG	Thu Nov  5 09:39:50 1992
--- /usr/src/sys.386bsd/i386/isa/co_kbd.c	Wed Jan 27 09:37:59 1993
***************
*** 138,144 ****
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
--- 138,144 ----
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_selp = (pid_t) 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
***************
*** 156,162 ****
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
--- 156,162 ----
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_selp = (pid_t) 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
***************
*** 279,285 ****
  		return;
  	if (consoftc.cs_selp) {
  		selwakeup(consoftc.cs_selp,0);
! 		consoftc.cs_selp = 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
--- 279,285 ----
  		return;
  	if (consoftc.cs_selp) {
  		selwakeup(consoftc.cs_selp,0);
! 		consoftc.cs_selp = (pid_t) 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
***************
*** 306,312 ****
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_selp = p;
  	}
  	splx(s);
  	return 0;
--- 306,312 ----
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_selp = p->p_pid;
  	}
  	splx(s);
  	return 0;
***************
*** 1182,1188 ****
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_selp = 0;
  		break;
  	case KBDRESET8042:
  		doreset();
--- 1182,1188 ----
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_selp = (pid_t) 0;
  		break;
  	case KBDRESET8042:
  		doreset();
*** /usr/src/sys.386bsd/i386/isa/co_hdr.h.CODRVP_ORIG	Wed Nov  4 04:15:59 1992
--- /usr/src/sys.386bsd/i386/isa/co_hdr.h	Wed Jan 27 09:35:27 1993
***************
*** 122,128 ****
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	struct proc *cs_selp;	/* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
--- 122,128 ----
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	pid_t	cs_selp;	/* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
------------------------------ cut here ------------------------------

Cheers,

Martin

Technical University of Vienna/Dept of Comm. Engr.