Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 1997 15:49:40 -0700 (PDT)
From:      Ian Kallen <spidaman@well.com>
To:        Brian Somers <brian@awfulhak.org>
Cc:        Joe Beiter <jwb@xioa.cosmic.org>, hackers@freebsd.org, bugs@freebsd.org
Subject:   Re: keyboard locking w/X11 
Message-ID:  <Pine.GSO.3.93.970411154237.6499A-100000@well.com>
In-Reply-To: <199704112030.VAA08949@awfulhak.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
I have a Dell Latitude XPi and was having problems that were fixed by the
patch below (ymmv, so be sure you can back out... if you want the
debugging patch mentioned that I'd tried first, I'll send that too but it 
should be in the "hackers" archive on freefall).  Be sure you have psm0
turned on...

good luck!


>From yokota@zodiac.mech.utsunomiya-u.ac.jp Fri Apr 11 15:42:22 1997
Date: Fri, 28 Mar 1997 15:57:30 +0900
From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To: Ian Kallen <spidaman@well.com>
Cc: freebsd-mobile@freebsd.org, freebsd-hackers@freebsd.org,
    yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject: Re: (Dell Latitude) psm0/sc0 conflicts killing X? 


>Yes, I got almost the exact same messages, including 
>     sc0: kbdc is LOCKED!! (scintr)

Now, may I assume you got the messages in the following order, the
return code was "fa" ("zz" in the fifth line) and the keyboard did NOT
freeze?

    sc0: enabling tty intr. (set_keyboard)
    sc0: about to send command and data (set_keyboard)
    sc0: kbdc is LOCKED!! (scintr)
    sc0: kbdc is LOCKED!! (scintr)
    sc0: command:xx data:yy ret:zz (set_keybard)
                                ~~
    sc0: kbdc is LOCKED!! (scintr)

>well, if you have a fix, I'd be happy to test it for you :)  Shall I
>revert to the original syscons.c or will patching it with the debugging
>stuff be OK?

Please revert to the original syscons.c and apply the following patch.
It is known to work, that is, kbdcontrol can change key repeat rate
and the X server doesn't lock up the keyboard. 

This patch doesn't generate debug messages, so it will be more
suitable for daily use than the previous one.

Kazu

--- syscons.c-dist	Mon Mar  3 10:09:00 1997
+++ syscons.c	Mon Mar 17 08:02:35 1997
@@ -3110,11 +3111,12 @@
 
     /* disable the keyboard and mouse interrupt */
     s = spltty();
+#if 0
     c = get_controller_command_byte(sc_kbdc);
     if ((c == -1) 
 	|| !set_controller_command_byte(sc_kbdc, 
             kbdc_get_device_mask(sc_kbdc),
-            KBD_ENABLE_KBD_PORT | KBD_DISABLE_KBD_INT
+            KBD_DISABLE_KBD_PORT | KBD_DISABLE_KBD_INT
                 | KBD_DISABLE_AUX_PORT | KBD_DISABLE_AUX_INT)) {
 	/* CONTROLLER ERROR */
         kbdc_lock(sc_kbdc, FALSE);
@@ -3129,15 +3131,21 @@
      * by the lock flag set via `kbdc_lock()'
      */
     splx(s);
+#endif
 
-    send_kbd_command_and_data(sc_kbdc, command, data);
+    if (send_kbd_command_and_data(sc_kbdc, command, data) != KBD_ACK)
+        send_kbd_command(sc_kbdc, KBDC_ENABLE_KBD);
 
+#if 0
     /* restore the interrupts */
     if (!set_controller_command_byte(sc_kbdc,
             kbdc_get_device_mask(sc_kbdc),
 	    c & (KBD_KBD_CONTROL_BITS | KBD_AUX_CONTROL_BITS))) { 
 	/* CONTROLLER ERROR */
     }
+#else
+    splx(s);
+#endif
     kbdc_lock(sc_kbdc, FALSE);
 }
 







On Fri, 11 Apr 1997, Brian Somers wrote:
> > 
> > I think this is a bug. Sorry if this isn't proper reporting procedure. Feel
> > free to query if there are questions:
> > 
> > Hardware: DELL Laptop XP90 32MB ram
> > 2.2.1-RELEASE
> > XFree86 3.2
> > 
> > After running X11, the keyboard locks up. Must telnet in and reboot
> > to clear it up. Seems to be related to the sco console. Compiled
> > kernel with the pcvt console and problem went away. This problem did
> > not appear until upgrading from 2.1.0 to 2.2.1
> 
> Can you try running "setcon" ?  The source is on www.freebsd.org/~brian.
> All it does is switch virtual terminals, but with pre-release versions
> of 2.2, it woke the keyboard up.
> 
> "setcon" is part of "vidcontrol" (-s option) in -current, but I never
> put it into 2.2 because if the opposition I received at the time.
> 
> > - JoeB
> > 
> > :---==@==---==@==---==@==---:
> > Joseph Beiter                  Hacking's just another word for nothing 
> > jwb@cosmic.org                 left to kludge.
> 
> -- 
> Brian <brian@awfulhak.org>, <brian@freebsd.org>
>       <http://www.awfulhak.demon.co.uk/>;
> Don't _EVER_ lose your sense of humour....
> 
> 
> 
> 

The next interface will not be another desktop metaphor.... Ian Kallen ....
http://www.well.com/user/spidaman/ ....the revolution will not be televised.
===== TO RECEIVE MY PGP KEY, SEND MAIL TO spidey-pgp-info@well.com =======




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.93.970411154237.6499A-100000>