xorg-server no mouse or keyboard


Please note that this blog has been moved.

Now it has its own domain: mynixworld.infoūüôā

If you want to read the latest version of this article (recommended) please click here and I open the page for you.

I just started my Gentoo and then my X session. I have noticed that neither mouse or keyboard is working (even if it works ok before starting X).

The answer lies in /var/log/Xorg.1.log file. Just search for these lines which contains (EE) and that line should tell you the problem.

In my case it was something like this:

(EE) module ABI major version (10) doesn’t match the server’s version (11)

You have to re-emerge the x11-drivers. This can be done like this:


qlist  -I -C | grep ^x11-drivers/ | xargs emerge -1

Another thing you should check is how is configured your /etc/X11/xorg.conf

I  found a situation where I had the following configuration:

Section “InputDevice”
Identifier¬† “Keyboard0
Driver¬†¬†¬†¬†¬† “kbd
EndSection

and/or

Section “InputDevice”
Identifier¬† “Mouse0
Driver¬†¬†¬†¬†¬† “mouse”
Option¬†¬†¬†¬†¬† “Protocol” “auto”
Option¬†¬†¬†¬†¬† “Device” “/dev/input/mice
Option¬†¬†¬†¬†¬† “ZAxisMapping” “4 5 6 7”
EndSection

but at the same time I found the following warning in my /var/log/Xorg.1.log file:

[¬†¬† 576.194] (WW) Hotplugging is on, devices using drivers ‘kbd’, ‘mouse’ or ‘vmmouse’ will be disabled.
[   576.194] (WW) Disabling Mouse0
[   576.194] (WW) Disabling Keyboard0

So when I started X session I had neither mouse or keyboard. I fixed that by checking in /dev/input/event* which is the corresponding event for my keyboard and for my mouse then I have added the following line to the keyboard input device section:

Option¬†¬†¬†¬†¬† “Device” “/dev/input/event3

and I changed the following line from the mouse input device section:

Option¬†¬†¬†¬†¬† “Device” “/dev/input/mice

with this one:

Option¬†¬†¬†¬†¬† “Device” “/dev/input/event4

Note: event3 is my keyboard event and event4 is my USB mouse event.

You can check which of the /dev/input/event* files is your corresponding event for keyboard by running the following command at the shell:

cat /dev/input/event3

Now try to press some keys, if as response you will see some strange characters printed right after your prompter, that means that event3 responds to keyboard events.

Do the same for the mouse (say event4). It should show some strange characters when moving mouse. If not then maybe there are some other events binded to your devices, just try every /dev/input/event* file to see which corresponds to your devices.

@edit: 2012-12-17

I found out that it could be even another situation when you Linux could not see your USB mouse. For example, I plug-in an old “A4 tech” mouse that is not (by default) recognized by Linux kernel.

What I’ve done was to set CONFIG_HID_A4TECH=y then by rebuilding and installing the new kernel my USB mouse just starts being recognized.

Summary:

  • To make my laptop’s Synaptic touch-pad working I’ve set the following options on Linux kernel (then build+install the new kernel):
    • Input device support -> Mice -> PS/2 mouse:
      • Synaptics PS/2 mouse protocol extension
      • Logitech PS/2++ mouse protocol extension (in case I’ll use such mice)
  • To make the mouse device to appear as /dev/input/event* I’ve set also the CONFIG_INPUT_EVDEV=y
  • to make the Linux to recognize my old A4 tech mouse I’ve set CONFIG_HID_A4TECH=y

About Eugen Mihailescu

Always looking to learn more about *nix world, about the fundamental concepts of arithmetic, algebra and geometry. I am also passionate about programming, database and systems administration.
This entry was posted in linux, X11 and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s