Subject: xsrc/14650: XalphaNetBSD crashes with PC keyboard
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kpneal@pobox.com>
List: netbsd-bugs
Date: 11/19/2001 22:58:29
>Number:         14650
>Category:       xsrc
>Synopsis:       XalphaNetBSD crashes with a PC keyboard
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 19:59:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kevin P. Neal
>Release:        NetBSD 1.5.2
>Organization:
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/

"You know, I think I can hear the machine screaming from here...  \
'help me! hellpp meeee!'"  - Heather Flanagan, 14:52:23 Wed Jun 10 1998
>Environment:
System: NetBSD tesseract.neutralgood.org 1.5.2 NetBSD 1.5.2 (TESSERACT) #25: Fri Nov 2 22:36:26 EST 2001 kpneal@pobox.com:/local/kernel/compile/TESSERACT alpha


>Description:

I have an AlphaStation 200 with a vanilla IBM-branded PS/2-style keyboard.
When I start XalphaNetBSD (for use with a TGA board) the screen goes
to black characters on white background and then the X server crashes
and dumps core. The problem is a NULL pointer deref in the keyboard
initialization code.

>How-To-Repeat:

Use above described machine. Start XalphaNetBSD. Now attempt to
get your shell back before going blind from the colors left onscreen
by the crash of the X server.

>Fix:

Some better error detection would be a bonus. Anyway, in directory
xsrc/xc/programs/Xserver/hw/netbsd/alpha apply this patch:

--- alphaKeyMap.c.orig	Mon Nov 19 22:40:49 2001
+++ alphaKeyMap.c	Mon Nov 19 22:43:20 2001
@@ -40,7 +40,7 @@
     NULL,               0,      0,                      0,   /* None */
     lk201map,		0,	LK201_NUM_KEYCODES,	4,   /* lk201 */
     lk201map,		0,	LK201_NUM_KEYCODES,	4,   /* lk401 */
-    NULL,               0,      0,                      0,   /* XT */
+    map,		0,	MAX_STD_KEYCODE,	4,   /* XT */
     map,		0,	MAX_STD_KEYCODE,	4,   /* AT */
     NULL,               0,      0,                      0,   /* USB/XT */
 };
@@ -60,7 +60,7 @@
     NULL,
     lk201modmap,
     lk201modmap,
-    NULL,
+    xf86modmap,
     xf86modmap,
     NULL,
 };
>Release-Note:
>Audit-Trail:
>Unformatted: