# udev & Xorg -> keyb. not responding?

## pazz

hi!

i just switched to udev. everything's fine here but for Xorg,

i had he usual /dev/mouse probs but now this is done and mice work but the keyboard doesnt. there are no errors on the Xorg.0.log..

whats up here? keyb.'s running on the console more than fine,

and xorg, like xfree has no place to change the keyb device has it?

thx,

pazz

----------

## nutznboltz

peeking around with ps and lsof shows

```

# ps ax | grep X

 7472 ?        S     84:03 /usr/X11R6/bin/X -nolisten tcp -auth /var/run/xauth/A:0-rN4rcO vt7

# lsof -p 7472 | grep CHR

X       7472 root  mem    CHR        1,1               1335 /dev/mem

X       7472 root  mem    CHR      226,0               1279 /dev/dri/card0

X       7472 root    3u   CHR        4,7               1488 /dev/vc/7

X       7472 root    5u   CHR     10,175               1337 /dev/misc/agpgart

X       7472 root    6u   CHR      226,0               1279 /dev/dri/card0

X       7472 root    7u   CHR      13,63               1315 /dev/input/mice

```

so the /dev/vc/7 is where keyboard input is coming from.

In my /etc/X11/xorg.conf I have

```

# **********************************************************************

# Core keyboard's InputDevice section

# **********************************************************************

Section "InputDevice"

    Identifier  "Keyboard1"

    Driver      "Keyboard"

# For most OSs the protocol can be omitted (it defaults to "Standard").

# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),

# uncomment the following line.

#    Option     "Protocol"      "Xqueue"

    Option "AutoRepeat" "500 30"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

#    Option     "Xleds"      "1 2 3"

#    Option "LeftAlt"     "Meta"

#    Option "RightAlt"    "ModeShift"

# To customise the XKB settings to suit your keyboard, modify the

# lines below (which are the defaults).  For example, for a non-U.S.

# keyboard, you will probably want to use:

#    Option "XkbModel"    "pc102"

# If you have a US Microsoft Natural keyboard, you can use:

#    Option "XkbModel"    "microsoft"

#

# Then to change the language, change the Layout setting.

# For example, a german layout can be obtained with:

#    Option "XkbLayout"   "de"

# or:

#    Option "XkbLayout"   "de"

#    Option "XkbVariant"  "nodeadkeys"

#

# If you'd like to switch the positions of your capslock and

# control keys, use:

#    Option "XkbOptions"  "ctrl:swapcaps"

# These are the default XKB settings for Xorg

#    Option "XkbModel"    "pc101"

#    Option "XkbLayout"   "us"

#    Option "XkbVariant"  ""

#    Option "XkbOptions"  ""

#    Option "XkbDisable"

    Option "XkbModel"   "pc104"

    Option "XkbLayout"  "us"

EndSection

```

What happens when you  run lsof the way I did and what is in your xorg.conf keyboard section?

----------

## pazz

hi!

lsof gives the following:

```
lsof -p 10778 | grep CHR

X       10778 root  mem    CHR        1,5               1148 /dev/zero

X       10778 root  mem    CHR      195,0              12764 /dev/nvidia0

X       10778 root  mem    CHR        1,1               1138 /dev/mem

X       10778 root    2u   CHR        4,1               2030 /dev/vc/1

X       10778 root    4u   CHR        4,7               2212 /dev/vc/7

X       10778 root    6u   CHR    195,255              12767 /dev/nvidiactl

X       10778 root    7u   CHR      195,0              12764 /dev/nvidia0

X       10778 root    8u   CHR      195,0              12764 /dev/nvidia0

X       10778 root    9u   CHR      195,0              12764 /dev/nvidia0

X       10778 root   10u   CHR    195,255              12767 /dev/nvidiactl

X       10778 root   11u   CHR      195,0              12764 /dev/nvidia0

X       10778 root   12r   CHR    195,255              12767 /dev/nvidiactl

X       10778 root   13u   CHR      13,63               1155 /dev/input/mice

X       10778 root   14u   CHR      13,64               1151 /dev/input/event0

```

and my keyboard section is

```
Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "keyboard"

        Option          "CoreKeyboard"

        Option          "XkbRules"      "xorg"

        Option          "XkbModel"      "pc105"

        Option          "XkbLayout"     "de"

```

so what is 

```

X       10778 root    2u   CHR        4,1               2030 /dev/vc/1

X       10778 root    4u   CHR        4,7               2212 /dev/vc/7
```

telling us?

is my keyb connected to /dev/vc/1 or to /dev/vc/7 ?

and even if i knew, what option shoult i change to make it work?

thanks a lot so far,

pazz

----------

## nutznboltz

You could try making a new xorg.conf file using xorgconfig.

----------

## pazz

i just did,

the only difference was that the new xorg.conf hat

        Driver      "kbd"

set in kyboard section... did not work for me  :Sad: 

pazz

----------

## StinkingMonkey

Section "InputDevice"

    Identifier  "Keyboard1"

    Driver      "kbd"

# For most OSs the protocol can be omitted (it defaults to "Standard").

# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),

# uncomment the following line.

#    Option     "Protocol"      "Xqueue"

    Option "AutoRepeat" "500 30"

    Option "XkbModel"   "pc102"

    Option "XkbLayout"  "gb"

EndSection

----------

## pazz

i even tried out the "device" option:

```

Section "InputDevice"

        Identifier  "board0"

        Driver      "kbd"

#       Option          "CoreKeyboard"

#       Option          "XkbRules"      "xorg"

        Option "Device" "/dev/vc/7"

         Option "AutoRepeat" "500 30"

        Option          "XkbModel"      "pc105"

        Option          "XkbLayout"     "de"

```

't still gives :

```
grep board /var/log/Xorg.0.log

(**) |-->Input Device "board0"

(**) Option "CoreKeyboard"

(**) board0: Core Keyboard

(**) board0: Protocol: standard

(**) board0: XkbRules: "xorg"

(**) board0: XkbModel: "pc105"

(**) board0: XkbLayout: "de"

(**) board0: CustomKeycodes disabled

(II) XINPUT: Adding extended input device "board0" (type: KEYBOARD)

```

looks fine to me, but it's not responding.. it's not even possible to kill the Xserver using strg-alt-\b ..

as i said: the keyb is working fine in console mode..

pazz

----------

## nutznboltz

Is your keyboard USB or PS/2?

----------

## pazz

ps2.. i rechecked the kernel config... and got some ps2 stuff in..but that was only for adding a extern keyb to my laptop..and has the same probs than the other  :Neutral: 

----------

## nutznboltz

When your kernel boots does it write a message like this:

input: AT Translated Set 2 keyboard on isa0060/serio0

Make sure your kernel config has

CONFIG_INPUT_KEYBOARD=y

CONFIG_KEYBOARD_ATKBD=y

----------

## pazz

```
dmesg |grep input

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

input: AT Translated Set 2 keyboard on isa0060/serio0

input: SynPS/2 Synaptics TouchPad on isa0060/serio1

```

..

```
grep CONFIG_INPUT_KEYBOARD /usr/src/linux/.config

CONFIG_INPUT_KEYBOARD=y
```

```
grep CONFIG_KEYBOARD_ATKBD /usr/src/linux/.config

CONFIG_KEYBOARD_ATKBD=y

```

----------

## nutznboltz

Is this computer a laptop?

----------

## pazz

yes,

it's an acer travelmate 634LC,

it seems to me that it's mainly an udev prob since it occured after switching to udev.

i'll try to get back to devfs soon  :Sad: 

pazz

----------

## infirit

You could try the new event interface), evdev! Do

```
cat /proc/bus/input/devices
```

and copy 2 lines, the N and P sectons for your keyboard. Mine looks like this 

```
N: Name="AT Translated Set 2 keyboard"

P: Phys=isa0060/serio0/input0
```

Make sure you have evdev compiles as a module or built in.

Change the keyboarf section as below

```
   Identifier  "Keyboard1"

   Driver       "kbd"

   Option      "Protocol" "evdev"

   Option      "Device" "/dev/input/event0" // event 0 is mine yours could be different

   Option      "Dev Phys" "isa0060/serio0/input0"

   Option      "Dev Name" "AT Translated Set 2 keyboard"
```

 Also make sure the modules is loaded  :Wink: 

I got my MX700 mouse on the event interface and now all 7 butons work  :Smile: 

----------

## pazz

thanks for the suggestion, i'll give it a try if my current trace turns out to be a feint:

i compiled in the devfs support again, and still nothing worked.

i used the vanilla kernel before and tried the mm sources this time.

the old vanilla seems to work fine, and i'm now trying ck-sources, which after the emerge tell me to watch out for Unix98 PTY's which turned out not to be an option in mm's menuconfig dialog..

hang on, i'll report soon  :Smile: 

pazz

----------

## pazz

ehm.. like i said, portage gave advise how to configure the ck-sources: 

```
        ewarn "IMPORTANT:"

        ewarn "ptyfs support has now been dropped from devfs and as a"

        ewarn "result you are now required to compile this support into"

        ewarn "the kernel. You can do so by enabling the following options"

        ewarn "    Device Drivers -> Character devices  -> Unix98 PTY Support"

        ewarn "    File systems   -> Pseudo filesystems -> /dev/pts filesystem."
```

 (from /usr/portage/sys-kernel/ck-sources/ck-sources-2.6.8.1-r9.ebuild)

but there are no such options, /dev/pts like Unix98 PTY are not available through menuconfig.. is this critical?

pazz

----------

## pazz

hi!

it worked of the box with the ck-sources ... i'll never understand why, but thats that for me now, i'm happy that it finally works   :Razz: 

thank you all guys!! this forum is better than any support hotline in the world  :Smile: 

pazz

----------

## nutznboltz

This thread seems related FWIW.

https://forums.gentoo.org/viewtopic.php?t=240056

----------

