USBPS keyboard not detected on boot, just after hotplug

Bug #435235 reported by auspex
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Since upgrading to Karmic alpha on September 19, I have had no ability to use an external USB keyboard.

udev appears to see a usb device being attached, but doesn't recognize a keyboard.

This doesn't appear to be explicitly a kernel bug (2.6.10-34 & -35) as booting from older kernels (but otherwise using the same updates from Sept.19) has the same problem.

$ lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10
$ uname -a
Linux morgen 2.6.31-10-generic-pae #35-Ubuntu SMP Tue Sep 22 18:45:34 UTC 2009 i686 GNU/Linux
$ apt-cache madison udev
      udev | 147~-4 | http://archive.ubuntu.com karmic/main Packages

Jim Rorie (jfrorie)
Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Jim Rorie (jfrorie) wrote :

Ditto in Alpha 6. For another datapoint, I've noticed this behavior since somewhere in the Jaunty beta series. It resolves itself on my machine after a hotplug. Machine is a MacBook Pro 5,1 with IBM Model M keyboard via USB adapter. Mouse works fine on same adapter.

Jaunty Data:

jfrorie@medusa:~$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
jfrorie@medusa:~$ uname -a
Linux medusa 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 22:12:12 UTC 2009 x86_64 GNU/Linux
jfrorie@medusa:~$ apt-cache madison udev
      udev | 141-1.2 | http://us.archive.ubuntu.com jaunty-updates/main Packages
      udev | 141-1 | http://us.archive.ubuntu.com jaunty/main Packages
      udev | 141-1 | http://us.archive.ubuntu.com jaunty/main Sources
      udev | 141-1.2 | http://us.archive.ubuntu.com jaunty-updates/main Sources

Luke Faraone (lfaraone)
affects: ubuntu → udev (Ubuntu)
Changed in udev (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Jim Rorie (jfrorie) wrote :

For yet another datapoint, the USB keyboard is functional under grub 2.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Sorry Martin, I read "keyboard" there ;-)

Changed in udev (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → Triaged
assignee: Martin Pitt (pitti) → nobody
status: Triaged → Incomplete
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Could you please run "apport-collect 435235"

Revision history for this message
auspex (auspex) wrote : apport-collect data

Architecture: i386
CustomUdevRuleFiles: 01-touchpad.rules 01-touchpad.rules~ 10-vboxdrv.rules 45-libnjb5.rules
DistroRelease: Ubuntu 9.10
MachineType: Acer Aspire 5730
Package: udev 147~-5
PackageArchitecture: i386
ProcCmdLine: root=UUID=0c971d40-2667-4fc5-a577-0b21a2922623 ro quiet splash
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_CA.UTF-8
 LANGUAGE=
ProcVersionSignature: Ubuntu 2.6.31-12.41-generic-pae
Uname: Linux 2.6.31-12-generic-pae i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
XsessionErrors:
 (<unknown>:8034): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
 (<unknown>:11180): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
 (<unknown>:8034): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
 (<unknown>:8034): Gdk-CRITICAL **: gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)' failed
dmi.bios.date: 08/27/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: V1.07
dmi.board.name: CathedralPeak
dmi.board.vendor: Acer
dmi.board.version: Rev
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrV1.07:bd08/27/2008:svnAcer:pnAspire5730:pvr0100:rvnAcer:rnCathedralPeak:rvrRev:cvnAcer:ct10:cvrN/A:
dmi.product.name: Aspire 5730
dmi.product.version: 0100
dmi.sys.vendor: Acer

Revision history for this message
auspex (auspex) wrote : BootDmesg.txt
Revision history for this message
auspex (auspex) wrote : CurrentDmesg.txt
Revision history for this message
auspex (auspex) wrote : Dependencies.txt
Revision history for this message
auspex (auspex) wrote : Lspci.txt
Revision history for this message
auspex (auspex) wrote : Lsusb.txt
Revision history for this message
auspex (auspex) wrote : ProcCpuinfo.txt
Revision history for this message
auspex (auspex) wrote : ProcInterrupts.txt
Revision history for this message
auspex (auspex) wrote : ProcModules.txt
Revision history for this message
auspex (auspex) wrote : UdevDb.txt
Revision history for this message
auspex (auspex) wrote : UdevLog.txt
Changed in udev (Ubuntu):
status: Incomplete → New
tags: added: apport-collected
Revision history for this message
Martin Pitt (pitti) wrote : Re: no external (USB) keyboard in Karmic alpha

I can't see from your udev dump which device is the keyboard unfortunately.

 1) Does this only happen when the keyboard is already plugged in at boot, or also when it is plugged in when a session is already running?

 2) Please boot with the keyboard detached, then do

  sudo dmesg -c
  udevadm monitor --udev -e > /tmp/udev.log

then plug in the keyboard, then press Control-C to cancel the udevadm monitor command. Then do

  dmesg > /tmp/dmesg-keyboard.txt

and attach /tmp/udev.log and /tmp/dmesg-keyboard.txt here. Thanks!

Changed in udev (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, and after that, (with the keyboard still plugged in), do

  lshal > /tmp/hal.txt

and attach /tmp/hal.txt here as well.

Revision history for this message
Jim Rorie (jfrorie) wrote :
Revision history for this message
Jim Rorie (jfrorie) wrote :
Revision history for this message
Jim Rorie (jfrorie) wrote :
Revision history for this message
Jim Rorie (jfrorie) wrote :

Martin,

The above dumps are in Karmic Beta. WRT your question, if I boot with the keyboard, grub recognizes it. But once the X login screen appears, it is not responsive. (Mouse on the same USB replicator works at this time) If I unplug and replug, after a second or so, the keyboard responds.

Thanks!

Revision history for this message
auspex (auspex) wrote :

Martin, you might have told me what you _really_ wanted. I just provided the information you asked for.

You'll have to wait for tomorrow, when I have a USB keyboard available, but in my case no external keyboard is ever recognized, whether it's connected at boot time or not. And I rather doubt you'll see from the "udev dump which device is the keyboard", because the point of my bug report was that udev doesn't seem to notice a keyboard _ever_.

Revision history for this message
Martin Pitt (pitti) wrote :

@auspex:

> Martin, you might have told me what you _really_ wanted.

Well, I did? I wanted to find out whether the problem is that the keyboard gets detected in initramfs already, and properties get lost. Apparently something like this seems to happen for Jim Rorie ("If I unplug and replug, after a second or so, the keyboard responds"). So Jim should open a separate bug now.

It would be good if you could also provide an udev monitor output, to see what happens when you plug in the keyboard at runtime (not before/during boot). dmesg should have something to say as well.

Revision history for this message
Martin Pitt (pitti) wrote :

@Jim Rorie:

you have a different problem apparently. Can you please boot with the keyboard attached (so that it's not recognized), and use "ubuntu-bug udev" to open a new bug? This will collect /var/log/udev from boot time, to see what got coldplugged. Thanks!

Revision history for this message
Jim Rorie (jfrorie) wrote :

Done....

https://bugs.launchpad.net/bugs/435235

Sorry for the confusion, auspex....

Revision history for this message
auspex (auspex) wrote :

udev log

Revision history for this message
auspex (auspex) wrote :
Revision history for this message
auspex (auspex) wrote :
Martin Pitt (pitti)
summary: - no external (USB) keyboard in Karmic alpha
+ USBPS keyboard not detected
Revision history for this message
Martin Pitt (pitti) wrote : Re: USBPS keyboard not detected

Thank you. So the kernel clearly sees a new mouse and keyboard, and assigns input devices for both of them. hal even picks it up and creates a keyboard device for you:

udi = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_1d_1_if1_logicaldev_input_0'
[...]
  info.capabilities = {'input', 'input.keys', 'input.mouse', 'button'} (string list)
  input.device = '/dev/input/event11' (string)
  input.product = 'USBPS2' (string)
  input.x11_driver = 'evdev' (string)
  input.xkb.layout = 'us' (string)
  input.xkb.model = 'pc104' (string)
  input.xkb.options = 'lv3:ralt_switch,compose:menu' (string)
  input.xkb.rules = 'base' (string)
[...]

so I wonder why it does not work under X (which still uses hal). After plugging in the keyboard, can you please attach /var/log/Xorg.0.log ? For my USB keyboard, it looks like

(II) config/hal: Adding input device HID 05f3:0007
(**) HID 05f3:0007: always reports core events
(**) HID 05f3:0007: Device: "/dev/input/event8"
(II) HID 05f3:0007: Found keys
(II) HID 05f3:0007: Configuring as keyboard
(II) XINPUT: Adding extended input device "HID 05f3:0007" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc105"
(**) Option "xkb_layout" "us"

so I wonder how it looks for your's. It should at least see _something_, since it's in hal.

For the udev side, this is indeed a bit poor:

UDEV [1255524718.339876] add /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input12/event10 (input)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input12/event10
SUBSYSTEM=input
DEVNAME=input/event10
SEQNUM=4318
MAJOR=13
MINOR=74
DEVLINKS=/dev/char/13:74

It should have ID_USB_*, and ID_CLASS=kbd, etc. It seems that it didn't even run usb_id on that one.

Can you please run

  udevadm monitor

then plug in the keyboard, annd watch out for an "add" event which looks like
"/devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input12/event10", i. e. ends in "inputXX/eventYY". Then please copy&paste the output of

  udevadm test /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input12/event10

(with the path that you just determined).

Thanks!

Revision history for this message
auspex (auspex) wrote :
Download full text (21.0 KiB)

The first two here are after unplugging, the remainder after I plug back in. This certainly seems to see the keyboard (and an unused PS/2 mouse connector on the ps2-USB connector), and the particular keyboard is really old and possibly flaky, so I'll repeat with a USB keyboard, when I can get to one).

(EE) USBPS2: Failed to reopen device after 10 attempts.
(EE) USBPS2: Failed to reopen device after 10 attempts.
(II) config/hal: Adding input device USBPS2
(**) USBPS2: always reports core events
(**) USBPS2: Device: "/dev/input/event10"
(II) USBPS2: Found keys
(II) USBPS2: Configuring as keyboard
(II) XINPUT: Adding extended input device "USBPS2" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch,compose:menu"
(II) config/hal: Adding input device USBPS2
(**) USBPS2: always reports core events
(**) USBPS2: Device: "/dev/input/event11"
(II) USBPS2: Found 9 mouse buttons
(II) USBPS2: Found x and y relative axes
(II) USBPS2: Found scroll wheel(s)
(II) USBPS2: Found keys
(II) USBPS2: Configuring as mouse
(II) USBPS2: Configuring as keyboard
(**) USBPS2: YAxisMapping: buttons 4 and 5
(**) USBPS2: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "USBPS2" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc104"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "lv3:ralt_switch,compose:menu"
(**) USBPS2: (accel) keeping acceleration scheme 1
(**) USBPS2: (accel) filter chain progression: 2.00
(**) USBPS2: (accel) filter stage 0: 20.00 ms
(**) USBPS2: (accel) set acceleration profile 0
(II) USBPS2: initialized for relative axes.

Here's the udevadm test output::
$ sudo udevadm test /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input19/event10
[sudo] password for derek:
run_command: calling: test ...

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 435235] Re: USBPS keyboard not detected

auspex [2009-10-15 12:51 -0000]:
> The first two here are after unplugging, the remainder after I plug back
> in. This certainly seems to see the keyboard (and an unused PS/2 mouse
> connector on the ps2-USB connector)

Right, X.org seems to see it just fine. And yet it doesn't actually
work? Does it work on a virtual terminal? (Ctrl+Alt+F1)

> (**) USBPS2: Device: "/dev/input/event10"

Once you found out the device number with that, can you please do

  sudo /lib/udev/keymap input/event10

and see whether you get any response from the keys there?

> Here's the udevadm test output::
> [...]
> udevadm_test: ID_VENDOR=0d3d
> udevadm_test: ID_VENDOR_ENC=0d3d
> udevadm_test: ID_VENDOR_ID=0d3d
> udevadm_test: ID_MODEL=USBPS2
> udevadm_test: ID_MODEL_ENC=USBPS2
> udevadm_test: ID_MODEL_ID=0001
> udevadm_test: ID_REVISION=0001
> udevadm_test: ID_SERIAL=0d3d_USBPS2
> udevadm_test: ID_TYPE=hid
> udevadm_test: ID_BUS=usb
> udevadm_test: ID_USB_INTERFACES=:030101:030102:
> udevadm_test: ID_USB_INTERFACE_NUM=00
> udevadm_test: ID_USB_DRIVER=usbhid
> udevadm_test: ID_CLASS=kbd
> udevadm_test: ID_PATH=pci-0000:00:1d.1-usb-0:1:1.0
> udevadm_test: DMI_VENDOR=Acer

Hm, this looks just fine. So udevadm test works, but these ID_USB* and
ID_CLASS=kbd keys are still not in "udevadm info --export-db"?
*puzzled*

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
vascot (vascotenner) wrote : Re: USBPS keyboard not detected

I think I have the same problem. My keyboard works until laptop-mode starts (or stops). Sometimes my keyboard still works and only my mouse stops working.

Martin Pitt (pitti)
Changed in udev (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
MatthijsNL (matthijs-wolthers) wrote :

Same problem here

USB keyboard works at startup (I can choose my OS in Grub) and then does nothing when KDE is running. Unplugging it and plugging it back into another port makes it work again.

First thought of a hardware problem, so tried another keyboard. Same problem. Thought maybe the problem was with udev trying to configure a printer on each available USB-port but I don't know how to check that.

Revision history for this message
Trevor Clarke (tclarke-actu) wrote :

I also have an Acer machine. I installed 9.10 via wubi. No problems on the Grub sceen. But thereafter:
- No lights on USB keyboard;
- No light under USB optical mouse (even when moved);
- Neither of them work.

I haven't tried unplugging or replugging, I just uninstalled it. I'll reinstall it if you want me to try something though.

Revision history for this message
Lammert (l-hilarides) wrote :

Same here on a Compal IFL 90 laptop, but with the onboard keyboard, which is hard to plug / unplug. The keyboard does work during POST, and in a dual-boot windows. Now using an external keyboard :(

Revision history for this message
sancelot (sancelot) wrote :

looks like usb interrupt is shared with vga interrupt in some cases, can you provide output of cat /proc/interrupts ?

Martin Pitt (pitti)
summary: - USBPS keyboard not detected
+ USBPS keyboard not detected on boot, just after hotplug
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for udev (Ubuntu) because there has been no activity for 60 days.]

Changed in udev (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.