Bug 1824

Summary: fix support for wskbd protocol in kbd driver
Product: xorg Reporter: Matthieu Herrb <matthieu.herrb>
Component: Input/KeyboardAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: 6.8.1   
Hardware: Other   
OS: NetBSD   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
patch
none
[FIXED_X11R68x] correct patch roland.mainz: 6.8-branch+

Description Matthieu Herrb 2004-11-11 07:07:15 UTC
The kbd driver was never tested with systems that use the wskbd protocol instead
of the standard protocol. 
Also pure wscons systems (without pcvt compatibility) are not working either with
the kbd driver. 
The attached patch fixes both problems.
Comment 1 Matthieu Herrb 2004-11-11 07:08:04 UTC
Created attachment 1281 [details] [review]
patch
Comment 2 Matthieu Herrb 2004-11-11 08:18:01 UTC
Created attachment 1288 [details] [review]
[FIXED_X11R68x] correct patch

Ooops I submitted a diff against the wrong tree, with a bug in the patch
Comment 3 Roland Mainz 2004-11-12 09:10:01 UTC
Comment on attachment 1288 [details] [review]
[FIXED_X11R68x] correct patch

Approved for checkin into X11R6.8.x in the 2004-11-12 release-wranglers call.
Comment 4 Roland Mainz 2004-12-13 06:04:59 UTC
Comment on attachment 1288 [details] [review]
[FIXED_X11R68x] correct patch

Patch checked-in into X11R6.8.x stable branch:

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.365.2.57; previous revision: 1.365.2.56
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c,v	<-- 
bsd_KbdMap.c
new revision: 1.2.4.1; previous revision: 1.2
/cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v  <-- 
bsd_kbd.c
new revision: 1.2.4.1; previous revision: 1.2
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...
Comment 5 Adam Jackson 2005-04-03 14:35:48 UTC
mass update: the fix for this bug was applied to both HEAD and the stable 6.8 branch, but the bug was 
never closed.  closing now.
Comment 6 Sergey Svishchev 2008-04-13 02:29:24 UTC
I tried to use wskbd protocol (NetBSD/i386 4.0, server 1.3.0.0, xf86-input-keyboard 1.2.2) and found some minor problems.  Some may be NetBSD-specific:

- keyboard is dead after switching from X to text console.  To regain control of the machine I had to kill X remotely.
- by default, pckbd(4) is not attached to wsmux(4), so I had to use 'Device = /dev/wskbd0' instead of /dev/wskbd (which is equivalent to /dev/wsmux1).

- WSCONS scan codes for some keys are different from PCVT's; I don't quite understand why.  This can be worked around with xkbcomp:

xkb_keycodes  {
        include "xfree86+aliases(qwerty)"
        <UP>   = 208; <LEFT> = 211; <DOWN> = 216; <RGHT> = 213;
        <INS>  = 218; <HOME> = 207; <PGUP> = 209; <DELE> = 219; <END>  = 215; <PGDN> = 217;
        <RALT> = 192; <RCTL> = 165; <PRSC> = 178; <PAUS> = 135;
        <KPDV> = 189; <KPEN> = 164;
};

- KbdOn() always sets isConsole to FALSE in WSCONS mode; thus, raw mode will never be set.
- printWsType() prints its arguments in wrong order.
- "case WSKBD_TYPE_SUN5:" uses xf86Msg(), it should use printWsType().

Other relevant links:

http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=29591
  xfree86 fixes for "pure wskbd devices (without console emulation) do not work with X"
http://mail-index.netbsd.org/tech-x11/2008/01/26/msg000000.html
  "a patch that should make the kbd driver work properly with PS/2 keyboards"
http://osdir.com/ml/netbsd.devel.x11/2005-05/msg00005.html
  some useful info
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=35919
  "some minor cleanups of WSCONS/PCVT setup messages"
Comment 7 Alan Coopersmith 2010-04-13 00:30:23 UTC
If you have new problems, please open new bugs instead of confusing issues
by reopening fixed bugs with issues different than those originally reported.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.