X fails to correctly find my USB input devices

Bug #889226 reported by Steve Langasek on 2011-11-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt

Bug Description

For some reason, when I plug my USB kvm into my laptop today, X fails to register the attached input devices (keyboard and mouse). The devices are correctly registered in the kernel, but X somehow gets the wrong device name for them: it's looking for non-existent event13 and event14, when the correct devices are event9 and event10.

I'll attach the Xorg log separately, since this is all happening on :1 instead of :0 (due to an unrelated bug).

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+7ubuntu7
ProcVersionSignature: Ubuntu 3.1.0-3.3-generic 3.1.0
Uname: Linux 3.1.0-3-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 1.25-0ubuntu1
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,resize,mousepoll,compiztoolbox,grid,place,gnomecompat,imgpng,unitymtgrabhandles,wall,vpswitch,move,snap,regex,animation,session,workarounds,expo,ezoom,fade,scale,unityshell,switcher]
CompositorRunning: None
Date: Fri Nov 11 10:38:16 2011
DistUpgraded: Log time: 2011-11-08 10:26:05.366825
DistroCodename: precise
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GraphicsCard:
 Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:215a]
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
MachineType: LENOVO 3249CTO
PlymouthDebug: Error: [Errno 13] Permission denied: '/var/log/plymouth-debug.log'
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.1.0-3-generic root=/dev/mapper/hostname-root ro crashkernel=384M-2G:64M,2G-:128M quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: Upgraded to precise on 2011-11-08 (2 days ago)
dmi.bios.date: 08/23/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6QET52WW (1.22 )
dmi.board.name: 3249CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6QET52WW(1.22):bd08/23/2010:svnLENOVO:pn3249CTO:pvrThinkPadX201:rvnLENOVO:rn3249CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 3249CTO
dmi.product.version: ThinkPad X201
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.6+bzr20110929-0ubuntu7
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.27-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu4
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu4
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu3
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

Steve Langasek (vorlon) wrote :
Steve Langasek (vorlon) wrote :

Here's the correct X log for this session.

Bryce Harrington (bryce) wrote :

Hi Steve,

In the Xorg.1.log file I'm seeing:

[ 99307.560] (II) config/udev: Adding input device Logitech USB-PS/2 Optical Mouse (/dev/input/mouse1)
[ 99307.560] (II) No input driver/identifier specified (ignoring)
[ 99307.560] (II) config/udev: Adding input device USB KVM (/dev/input/event10)
[ 99307.560] (**) USB KVM: Applying InputClass "evdev keyboard catchall"
[ 99307.560] (II) Using input driver 'evdev' for 'USB KVM'
[ 99307.560] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 99307.560] (**) USB KVM: always reports core events
[ 99307.560] (**) USB KVM: Device: "/dev/input/event10"
[ 99307.561] (--) USB KVM: Found keys
[ 99307.561] (II) USB KVM: Configuring as keyboard
[ 99307.561] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/input/input18/event10"
[ 99307.561] (II) XINPUT: Adding extended input device "USB KVM" (type: KEYBOARD)

and

[ 99307.632] (II) config/udev: Adding input device USB KVM (/dev/input/event11)
[ 99307.632] (**) USB KVM: Applying InputClass "evdev pointer catchall"
[ 99307.632] (**) USB KVM: Applying InputClass "evdev keyboard catchall"
[ 99307.632] (II) Using input driver 'evdev' for 'USB KVM'
[ 99307.632] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 99307.633] (**) USB KVM: always reports core events
[ 99307.633] (**) USB KVM: Device: "/dev/input/event11"
[ 99307.633] (--) USB KVM: Found 9 mouse buttons
[ 99307.633] (--) USB KVM: Found scroll wheel(s)
[ 99307.633] (--) USB KVM: Found relative axes
[ 99307.633] (--) USB KVM: Found x and y relative axes
[ 99307.633] (--) USB KVM: Found absolute axes
[ 99307.714] (II) evdev-grail: failed to open grail, no gesture support
[ 99307.714] (--) USB KVM: Found keys
[ 99307.714] (II) USB KVM: Configuring as mouse
[ 99307.714] (II) USB KVM: Configuring as keyboard
[ 99307.714] (II) USB KVM: Adding scrollwheel support
[ 99307.714] (**) USB KVM: YAxisMapping: buttons 4 and 5
[ 99307.714] (**) USB KVM: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 99307.714] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.1/input/input19/event11"

A HID and keyboard appear to be getting mapped to event13 and event14. A PS/2 USB mouse is on event9.

Later there's this error:

[267355.695] (EE) Unable to open evdev device "/dev/input/event13".
[267355.716] [dix] couldn't enable device 16
[267355.716] (EE) Unable to open evdev device "/dev/input/event14".
[267355.716] [dix] couldn't enable device 18

What are the brand/model of mouse being plugged into the KVM? Is the keyboard plugged into the KVM a Microsoft Natural Ergonomic Keyboard 4000? Also, what's the brand/model of the USB KVM itself?

I'm interpreting from your wording that this is a regression and the laptop with the KVM worked properly in Ubuntu at some point in the past? What has changed on your system since that time? kernel 3.0 vs. 3.1 maybe? I'd be curious to know what is diff between the dmesg and Xorg.*.log's here compared with a live iso boot of oneiric (assuming that was working properly).

Changed in xserver-xorg-input-evdev (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Download full text (5.0 KiB)

On Mon, Nov 14, 2011 at 10:43:17PM -0000, Bryce Harrington wrote:
> Hi Steve,
>
> In the Xorg.1.log file I'm seeing:
>
> [ 99307.560] (II) config/udev: Adding input device Logitech USB-PS/2 Optical Mouse (/dev/input/mouse1)
> [ 99307.560] (II) No input driver/identifier specified (ignoring)
> [ 99307.560] (II) config/udev: Adding input device USB KVM (/dev/input/event10)
> [ 99307.560] (**) USB KVM: Applying InputClass "evdev keyboard catchall"
> [ 99307.560] (II) Using input driver 'evdev' for 'USB KVM'
> [ 99307.560] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
> [ 99307.560] (**) USB KVM: always reports core events
> [ 99307.560] (**) USB KVM: Device: "/dev/input/event10"
> [ 99307.561] (--) USB KVM: Found keys
> [ 99307.561] (II) USB KVM: Configuring as keyboard
> [ 99307.561] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/input/input18/event10"
> [ 99307.561] (II) XINPUT: Adding extended input device "USB KVM" (type: KEYBOARD)
>
> and
>
> [ 99307.632] (II) config/udev: Adding input device USB KVM (/dev/input/event11)
> [ 99307.632] (**) USB KVM: Applying InputClass "evdev pointer catchall"
> [ 99307.632] (**) USB KVM: Applying InputClass "evdev keyboard catchall"
> [ 99307.632] (II) Using input driver 'evdev' for 'USB KVM'
> [ 99307.632] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
> [ 99307.633] (**) USB KVM: always reports core events
> [ 99307.633] (**) USB KVM: Device: "/dev/input/event11"
> [ 99307.633] (--) USB KVM: Found 9 mouse buttons
> [ 99307.633] (--) USB KVM: Found scroll wheel(s)
> [ 99307.633] (--) USB KVM: Found relative axes
> [ 99307.633] (--) USB KVM: Found x and y relative axes
> [ 99307.633] (--) USB KVM: Found absolute axes
> [ 99307.714] (II) evdev-grail: failed to open grail, no gesture support
> [ 99307.714] (--) USB KVM: Found keys
> [ 99307.714] (II) USB KVM: Configuring as mouse
> [ 99307.714] (II) USB KVM: Configuring as keyboard
> [ 99307.714] (II) USB KVM: Adding scrollwheel support
> [ 99307.714] (**) USB KVM: YAxisMapping: buttons 4 and 5
> [ 99307.714] (**) USB KVM: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
> [ 99307.714] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.1/input/input19/event11"
>
> A HID and keyboard appear to be getting mapped to event13 and event14.
> A PS/2 USB mouse is on event9.

Yes. event13 and event14 are incorrect mappings; as mentioned in the
report, the actual devices are event9 and event10. The current lsinput
results are:

/dev/input/event9
   bustype : BUS_USB
   vendor : 0x45e
   product : 0xdb
   version : 273
   name : "Microsoft Natural® Ergonomic Ke"
   phys : "usb-0000:00:1a.0-1.2.2/input1"
   uniq : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC EV_REP

/dev/input/event10
   bustype : BUS_USB
   vendor : 0x46d
   product : 0xc03e
   version : 272
   name : "Logitech USB-PS/2 Optical Mouse"
   phys : "usb-0000:00:1a.0-1.2.3/input0"
   uniq : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_MSC

(this may not correspond to what was shown in the log at the time since the
USB hub has been unpl...

Read more...

Changed in xserver-xorg-input-evdev (Ubuntu):
status: Incomplete → New
Bryce Harrington (bryce) wrote :

<bryceh> slangasek, ls -l /dev/input ?
<slangasek> bryceh: http://paste.ubuntu.com/738776/
<Sarvatt> so was udev updated recently? keyboard/mouse not working bugs have almost always been following a udev update (4-5 times in oneiric..)
<bryceh> slangasek, interesting! and ls -l /dev/input/by-id/ ?
<slangasek> http://paste.ubuntu.com/738777/
<bryceh> aha
<bryceh> slangasek, yeah so that's showing events 12 and 13 mapped to your input devices
<slangasek> hmm
<bryceh> udev sounds a likely culprit
<slangasek> aha
<slangasek> udev ISN'T RUNNING
<bryceh> slangasek, ahhhh
<slangasek> score
<bryceh> :-)
<slangasek> bryceh: thanks for looking at this :)
<slangasek> now let me see if I can figure out why it's died, since apport said nothing
<bryceh> slangasek, sure thing, glad it got sorted
<slangasek> Setting up udev (175-0ubuntu1) ...
<slangasek> Installing new version of config file /etc/init/udev.conf ...
<slangasek> restart: Job failed to restart

I wonder if X ought to print some sort of more useful error message if udev is not running, but the real issue here is udev not running.

affects: xserver-xorg-input-evdev (Ubuntu) → udev (Ubuntu)
Steve Langasek (vorlon) wrote :

Setting up udev (175-0ubuntu1) ...
Installing new version of config file /etc/init/udev.conf ...
restart: Job failed to restart

The problem is that udev is calling 'restart udev || true'.

- restart is the wrong interface. This needs to be using invoke-rc.d instead.
- ignoring the return value is wrong.
- the restart is failing because restart is the wrong interface, with the wrong semantics - 'restart' causes the process to be kill -HUP'ed and respawned via the existing job configuration, *not* using the one from the just-upgraded package. And there are crucial differences in the job file here, because udevd has moved on disk. So of course trying to restart 'udevd' will fail, it needs to start up /lib/udev/udevd instead.

This will consistently cause udev to fail to restart for all users when upgrading to precise, leading to difficult-to-diagnose bugs. Should get fixed for alpha-1.

Changed in udev (Ubuntu):
importance: Medium → High
milestone: none → precise-alpha-1
status: New → Triaged
Martin Pitt (pitti) on 2011-11-15
Changed in udev (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udev - 175-0ubuntu2

---------------
udev (175-0ubuntu2) precise; urgency=low

  * debian/udev.postinst: Ignore failures of "udevadm --convert-db". This
    option does not exist any more in Ubuntu 11.10 and later, so for upgrades
    from 10.04 LTS to 12.04 LTS you need to reboot. This doesn't really hurt,
    as there are already two dozen other reasons to reboot after upgrade.
    (LP: #887892)
  * Partially revert r2735 and move the daemon back to /sbin/, to better
    comply with FHS.
  * debian/udev.postinst: Use invoke-rc.d to restart udev instead of
    "restart", to pick up new daemon path. (LP: #889226)
 -- Martin Pitt <email address hidden> Tue, 15 Nov 2011 08:14:03 +0100

Changed in udev (Ubuntu Precise):
status: In Progress → Fix Released
To post a comment you must log in.