Subject: Re: strange keyboard behavior with X 4.3.0
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: David Hopper <dhop@nwlink.com>
List: port-alpha
Date: 03/12/2003 12:12:31
Manuel Bouyer wrote:
> Hi,
> so I installed XFree 4.3.0 on my AS255 (running 1.6.1_RC2), with a S3 virge
> graphic.

Is this the in-tree code, or Mel's code?

> I have strange behavior of the keyboard: for the arrow keys, events are
> doubled. That is, in a xterm if I press KP_Left the cursor moves left 2 times
> (this is confirmed by xevent). Also, when using a keypad combination with
> the arrow key (say, shift-left arrow), the X server sees an extra KeyRelease
> event before the leftarrow events, and an extra KeyPress event after
> for the shift.
> Here is a Xev snapshot of a shift-leftarrow:
> 
> [...]
> Does anyone have the same problem with XF4 on VGA adapters ?
> I had to add
>     Option "Protocol" "wskbd"
>     Option "Device" "/dev/wskbd0"
> in the XF86Config, otherwise the X server wouldn't start, saying it can't
> find the keyboard. I am using the wrong protocol, or is it a bug in
> the wskbd driver ?

Interesting.  I have the same system/card as you and I use this (in-tree code):

Section "Module"

     Load        "dbe"   # Double buffer extension
     SubSection  "extmod"
       Option    "omit xfree86-dga"   # don't initialise the DGA extension
     EndSubSection
     Load        "type1"
     Load        "freetype"
     Load        "glx"

EndSection

Section "Files"

     RgbPath    "/usr/X11R6/lib/X11/rgb"
     FontPath   "/usr/X11R6/lib/X11/fonts/local/"
     FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
     FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
     FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
     FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
     FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
     FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
     FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
     FontPath   "/usr/X11R6/lib/X11/fonts/TTF/"
     FontPath   "/usr/X11R6/lib/X11/fonts/TrueType/"
     FontPath   "/usr/X11R6/lib/X11/fonts/util/"
     FontPath   "/usr/X11R6/lib/X11/fonts/jmk/"
     FontPath   "/usr/X11R6/lib/X11/fonts/freefont/"
     FontPath   "/usr/X11R6/lib/X11/fonts/bitstream/"

EndSection

Section "ServerFlags"

EndSection

Section "InputDevice"

     Identifier          "Keyboard1"
     Driver              "Keyboard"
     Option "AutoRepeat" "500 30"
     Option "XkbRules"   "xfree86"
     Option "XkbModel"   "compaq"
     Option "XkbLayout"  "us"

EndSection

Section "InputDevice"

     Identifier            "Mouse1"
     Driver                "mouse"
     Option "Protocol"     "wsmouse"
     Option "Device"       "/dev/wsmouse"
     Option "Buttons"      "5"
     Option "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

     Identifier  "ViewSonic VG150"
     HorizSync   30-62
     VertRefresh 50-75

EndSection

Section "Device"
     Identifier  "Diamond Stealth 3D 3000"
     Driver      "s3virge"
     BusID       "PCI:1:09:0"
EndSection

Section "Screen"
     Identifier  "Screen 1"
     Device      "Diamond Stealth 3D 3000"
     Monitor     "ViewSonic VG150"
     DefaultDepth 24
     Subsection "Display"
         Depth       8
         Modes       "1024x768" "800x600" "640x480"
         ViewPort    0 0
     EndSubsection
     Subsection "Display"
         Depth       16
         Modes       "1024x768" "800x600" "640x480"
         ViewPort    0 0
     EndSubsection
     Subsection "Display"
         Depth       24
         Modes       "1024x768" "800x600" "640x480"
         ViewPort    0 0
     EndSubsection
EndSection

Section "ServerLayout"

     Identifier  "Simple Layout"
     Screen      "Screen 1"
     InputDevice "Mouse1"    "CorePointer"
     InputDevice "Keyboard1" "CoreKeyboard"

EndSection

> 
> Also, minor annoyance, the X server can't restore text mode properly ...

Yeah, I live with this, too.  I just run xdm and live on the edge...  ;^)

> Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
>      NetBSD: 24 ans d'experience feront toujours la difference

Send me your /var/log/XFree86.0.log and I can compare it to mine.

--Dave