# USB peripherals dying with multiseat

## pingufunkybeat

Hi all,

I've been having problems ever since I switched my computer to a multiseat setup. I don't know if it's a hardware problem (too many USB devices) or a software problem (X server dropping some of them), but it has to do with usb and peripherals, so  I'm posting it here.

Basically, from time to time, one or more of my peripherals simply stops responding. Logging out to kdm fixes the problem. I think that the problem is that the device loses connection for a split second, and X does not register it properly once it's rediscovered. Here is the relevant output from dmesg:

```
[  538.701116] hub 1-0:1.0: state 7 ports 10 chg 0000 evt 0020

[  538.701127] ehci_hcd 0000:00:02.1: GetStatus port:5 status 001002 0  ACK POWER sig=se0 CSC

[  538.701134] hub 1-0:1.0: port 5, status 0100, change 0001, 12 Mb/s

[  538.701138] usb 1-5: USB disconnect, address 2

[  538.701139] usb 1-5.1: USB disconnect, address 4

[  538.701141] usb 1-5.1: unregistering device

[  538.701143] usb 1-5.1: usb_disable_device nuking all URBs

[  538.701151] usb 1-5.1: unlink qh8-0601/ffff88014d5c7980 start 5 [1/2 us]

[  538.701158] ehci_hcd 0000:00:02.1: shutdown urb ffff88014d563cc0 ep1in-intr

[  538.701161] usb 1-5.1: unregistering interface 1-5.1:1.0

[  538.707136] usb 1-5.2: USB disconnect, address 5

[  538.707138] usb 1-5.2: unregistering device

[  538.707140] usb 1-5.2: usb_disable_device nuking all URBs

[  538.707146] usb 1-5.2: unlink qh16-0601/ffff88014d55ff00 start 2 [1/2 us]

[  538.707152] ehci_hcd 0000:00:02.1: shutdown urb ffff88014d74a6c0 ep1in-intr

[  538.707156] usb 1-5.2: unlink qh8-0601/ffff88014d751000 start 3 [1/2 us]

[  538.707161] ehci_hcd 0000:00:02.1: shutdown urb ffff88014d74ad80 ep2in-intr

[  538.707164] usb 1-5.2: unregistering interface 1-5.2:1.0

[  538.708719] ehci_hcd 0000:00:02.1: detected XactErr len 0/5 retry 1

[  538.716478] usb 1-5.3: unlink qh8-0601/ffff88014d5c7e80 start 4 [1/2 us]

[  538.728118] usb 1-5.2: unregistering interface 1-5.2:1.1

[  538.744176] usb 1-5.3: USB disconnect, address 6

[  538.744180] usb 1-5.3: unregistering device

[  538.744182] usb 1-5.3: usb_disable_device nuking all URBs

[  538.744188] usb 1-5.3: unregistering interface 1-5.3:1.0

[  538.756137] usb 1-5: unregistering device

[  538.756140] usb 1-5: usb_disable_device nuking all URBs

[  538.756146] usb 1-5: unlink qh256-0001/ffff88014d55fb80 start 1 [1/0 us]

[  538.756209] ehci_hcd 0000:00:02.1: shutdown urb ffff88014d560c00 ep1in-intr

[  538.756212] usb 1-5: unregistering interface 1-5:1.0

[  538.756267] ehci_hcd 0000:00:02.1: GetStatus port:5 status 001803 0  ACK POWER sig=j CSC CONNECT

[  538.862020] hub 1-0:1.0: debounce: port 5: total 100ms stable 100ms status 0x501

[  538.913235] ehci_hcd 0000:00:02.1: port 5 high speed

[  538.913242] ehci_hcd 0000:00:02.1: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT

[  538.964021] usb 1-5: new high speed USB device using ehci_hcd and address 7

[  539.015248] ehci_hcd 0000:00:02.1: port 5 high speed

[  539.015254] ehci_hcd 0000:00:02.1: GetStatus port:5 status 001005 0  ACK POWER sig=se0 PE CONNECT

[  539.079814] usb 1-5: default language 0x0409

[  539.080062] usb 1-5: udev 7, busnum 1, minor = 6

[  539.080065] usb 1-5: New USB device found, idVendor=05e3, idProduct=0608

[  539.080067] usb 1-5: New USB device strings: Mfr=0, Product=1, SerialNumber=0

[  539.080069] usb 1-5: Product: USB2.0 Hub

[  539.080144] usb 1-5: usb_probe_device

[  539.080147] usb 1-5: configuration #1 chosen from 1 choice

[  539.080439] usb 1-5: adding 1-5:1.0 (config #1, interface 0)

[  539.080461] hub 1-5:1.0: usb_probe_interface

[  539.080463] hub 1-5:1.0: usb_probe_interface - got id

[  539.080464] hub 1-5:1.0: USB hub found

[  539.080818] hub 1-5:1.0: 4 ports detected

[  539.080822] hub 1-5:1.0: standalone hub

[  539.080823] hub 1-5:1.0: ganged power switching

[  539.080826] hub 1-5:1.0: global over-current protection

[  539.080828] hub 1-5:1.0: Single TT

[  539.080830] hub 1-5:1.0: TT requires at most 32 FS bit times (2664 ns)

[  539.080831] hub 1-5:1.0: Port indicators are supported

[  539.080833] hub 1-5:1.0: power on to power good time: 100ms

[  539.081187] hub 1-5:1.0: local power source is good

[  539.081189] hub 1-5:1.0: no over-current condition exists

[  539.081191] hub 1-5:1.0: enabling power on all ports

[  539.082199] drivers/usb/core/inode.c: creating file '007'

[  539.082219] hub 1-0:1.0: state 7 ports 10 chg 0000 evt 0020

[  539.182315] hub 1-5:1.0: port 1: status 0301 change 0001

[  539.182802] hub 1-5:1.0: port 2: status 0301 change 0001

[  539.183302] hub 1-5:1.0: port 3: status 0301 change 0001

[  539.283026] usb 1-5: link qh256-0001/ffff880132201400 start 6 [1/0 us]

[  539.283044] hub 1-5:1.0: state 7 ports 4 chg 000e evt 0000

[  539.283306] hub 1-5:1.0: port 1, status 0301, change 0000, 1.5 Mb/s

[  539.294294] hub 1-5:1.0: port 1 not reset yet, waiting 10ms

[  539.356299] usb 1-5.1: new low speed USB device using ehci_hcd and address 8

[  539.433162] usb 1-5.1: skipped 1 descriptor after interface

[  539.433532] usb 1-5.1: default language 0x0409

[  539.434533] usb 1-5.1: udev 8, busnum 1, minor = 7

[  539.434535] usb 1-5.1: New USB device found, idVendor=15d9, idProduct=0a4d

[  539.434537] usb 1-5.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0

[  539.434539] usb 1-5.1: Product:  USB OPTICAL MOUSE

[  539.434615] usb 1-5.1: usb_probe_device

[  539.434618] usb 1-5.1: configuration #1 chosen from 1 choice

[  539.434909] usb 1-5.1: adding 1-5.1:1.0 (config #1, interface 0)

[  539.434941] usbhid 1-5.1:1.0: usb_probe_interface

[  539.434943] usbhid 1-5.1:1.0: usb_probe_interface - got id

[  539.436989] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5.1/1-5.1:1.0/input/input7

[  539.437056] generic-usb 0003:15D9:0A4D.0006: input,hidraw1: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:02.1-5.1/input0

[  539.437068] drivers/usb/core/inode.c: creating file '008'

[  539.437409] hub 1-5:1.0: port 2, status 0301, change 0000, 1.5 Mb/s

[  539.500289] usb 1-5.2: new low speed USB device using ehci_hcd and address 9

[  539.512283] hub 1-5:1.0: port 2 not reset yet, waiting 10ms

[  539.589277] usb 1-5.2: skipped 1 descriptor after interface

[  539.589281] usb 1-5.2: skipped 1 descriptor after interface

[  539.589769] usb 1-5.2: default language 0x0409

[  539.592270] usb 1-5.2: udev 9, busnum 1, minor = 8

[  539.592272] usb 1-5.2: New USB device found, idVendor=046d, idProduct=c313

[  539.592274] usb 1-5.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[  539.592276] usb 1-5.2: Product: USB Multimedia Keyboard

[  539.592278] usb 1-5.2: Manufacturer: LITEON Technology

[  539.592357] usb 1-5.2: usb_probe_device

[  539.592361] usb 1-5.2: configuration #1 chosen from 1 choice

[  539.592649] usb 1-5.2: adding 1-5.2:1.0 (config #1, interface 0)

[  539.592679] usbhid 1-5.2:1.0: usb_probe_interface

[  539.592681] usbhid 1-5.2:1.0: usb_probe_interface - got id

[  539.595242] input: LITEON Technology USB Multimedia Keyboard as /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5.2/1-5.2:1.0/input/input8

[  539.595257] usb 1-5.2: link qh16-0601/ffff880132201880 start 7 [1/2 us]

[  539.595303] generic-usb 0003:046D:C313.0007: input,hidraw2: USB HID v1.10 Keyboard [LITEON Technology USB Multimedia Keyboard] on usb-0000:00:02.1-5.2/input0

[  539.595315] usb 1-5.2: adding 1-5.2:1.1 (config #1, interface 1)

[  539.595341] usbhid 1-5.2:1.1: usb_probe_interface

[  539.595343] usbhid 1-5.2:1.1: usb_probe_interface - got id

[  539.597817] input: LITEON Technology USB Multimedia Keyboard as /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5.2/1-5.2:1.1/input/input9

[  539.597825] usb 1-5.2: link qh8-0601/ffff880132201a80 start 0 [1/2 us]

[  539.597860] generic-usb 0003:046D:C313.0008: input,hidraw3: USB HID v1.10 Device [LITEON Technology USB Multimedia Keyboard] on usb-0000:00:02.1-5.2/input1

[  539.597870] drivers/usb/core/inode.c: creating file '009'

[  539.598145] hub 1-5:1.0: port 3, status 0301, change 0000, 1.5 Mb/s

[  539.661281] usb 1-5.3: new low speed USB device using ehci_hcd and address 10

[  539.673267] hub 1-5:1.0: port 3 not reset yet, waiting 10ms

[  539.749890] usb 1-5.3: skipped 1 descriptor after interface

[  539.750384] usb 1-5.3: default language 0x0409

[  539.752885] usb 1-5.3: udev 10, busnum 1, minor = 9

[  539.752887] usb 1-5.3: New USB device found, idVendor=046d, idProduct=c046

[  539.752889] usb 1-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[  539.752891] usb 1-5.3: Product: USB Optical Mouse

[  539.752893] usb 1-5.3: Manufacturer: Logitech

[  539.752974] usb 1-5.3: usb_probe_device

[  539.752978] usb 1-5.3: configuration #1 chosen from 1 choice

[  539.753387] usb 1-5.3: adding 1-5.3:1.0 (config #1, interface 0)

[  539.753425] usbhid 1-5.3:1.0: usb_probe_interface

[  539.753427] usbhid 1-5.3:1.0: usb_probe_interface - got id

[  539.757100] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5.3/1-5.3:1.0/input/input10

[  539.757165] generic-usb 0003:046D:C046.0009: input,hidraw4: USB HID v1.10 Mouse [Logitech USB Optical Mouse] on usb-0000:00:02.1-5.3/input0

[  539.757179] drivers/usb/core/inode.c: creating file '010'

[  539.757200] hub 1-5:1.0: state 7 ports 4 chg 0000 evt 0008

```

You can see the disconnects and reconnects in here. 

I used to have all the peripherals (two usb keyboards + two usb mice) connected to a single (passive) usb hub, but this does not seem to be the problem, as I have the same issue when I connect the mouse to a separate USB socket. I have two external USB hard disks connected, but turned off most of the time.

Could the USB bus be saturated? I can't imagine that.

It happens very often with my no-name mouse, and very rarely with the logitech mouse. I had no problems whatsoever with the no-name mouse before I switched to multiseat, though. So it's either the multiseat configuration (failing to register that the same mouse has reconnected) or the additional peripherals which is causing it. Here's my xorg.conf:

```
Section "ServerFlags"

    Option      "DefaultServerLayout" "seat0"

    Option      "AllowMouseOpenFail"  "true"

    Option      "DontVTSwitch" "true"

    Option      "DontZap" "false"

    Option      "AutoAddDevices" "false"

    Option      "ColorTiling" "true"

EndSection

Section "Device"

        Identifier  "ATI RadeonHD 4550"

        Driver      "ati"

        BusID       "PCI:3:0:0"

        Option      "Int10" "off"

        Option      "NoInt10" "true"

        Option      "ColorTiling" "true"

        Option      "HDMI" "all"

        Option      "Audio" "on"

EndSection

Section "Device"

        Identifier   "ATI RadeonHD 4350"

        driver       "ati"

        BusID        "PCI:2:0:0"

        Option       "Int10" "off"

        Option       "NoInt10" "true"

EndSection

Section "Monitor"

        Identifier   "Samsung"

EndSection

Section "Monitor"

        Identifier    "Dell"

EndSection

Section "Screen"

        Identifier        "Screen0"

        Device           "ATI RadeonHD 4550"

EndSection

Section "Screen"

        Identifier        "Screen1"

        Device           "ATI RadeonHD 4350"

EndSection

Section "ServerLayout"

        Identifier     "seat0"

        Screen      0  "Screen0" 0 0

        InputDevice    "Mouse0" "CorePointer"

        InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

        Identifier     "seat1"

        Screen      1  "Screen1" 0 0

        InputDevice    "Mouse1" "CorePointer"

        InputDevice    "Keyboard1" "CoreKeyboard"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "evdev"

    Option         "Device" "/dev/input/by-id/usb-LITEON_Technology_USB_Multimedia_Keyboard-event-kbd"

    Option         "XkbModel" "pc105"

    Option         "XkbLayout" "us"

    Option         "XkbRules"   "xorg"

EndSection

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "evdev"

        Option         "Protocol" "ExplorerPS/2"

    Option         "Device" "/dev/input/by-id/usb-15d9_USB_OPTICAL_MOUSE-event-mouse"

EndSection

Section "InputDevice"

    Identifier     "Keyboard1"

    Driver         "evdev"

    Option         "Device" "/dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd"

    Option         "XkbModel" "pc105"

    Option         "XkbLayout" "us"

    Option         "XkbRules"   "xorg"

EndSection   

Section "InputDevice"

    Identifier     "Mouse1"

    Driver         "evdev"

    Option         "Protocol" "ExplorerPS/2"

    Option         "Device" "/dev/input/by-id/usb-Logitech_USB_Optical_Mouse-event-mouse"

EndSection

```

x11-base/xorg-server-1.9.2.902

x11-drivers/xf86-input-evdev-2.5.0

vanilla kernel 2.6.36

It's not a tragedy, as it only happens once every few days, and logging out fixes it, but it is somewhat annoying, and I'd like to figure out what's going wrong.

Anyone have any ideas?Last edited by pingufunkybeat on Fri Dec 31, 2010 3:36 pm; edited 2 times in total

----------

## VoidMage

Modernize your xorg.conf first.

First you explicitly disable hotplug, then you're surprised it doesn't work ? 

Drop AllowMouseOpenFail and AutoAddDevices, make use of InputClass.

Check also xorg log for the reaction of the server on those disconnects.

----------

## pingufunkybeat

Thank you for your reply. At least I have something to work with now.

All of the device gymnastics is required by the multi-seat setup, as are (were?) AllowMouseOpenFail and AutoAddDevices. Dropping either of those resulted in a borked system.

After a quick look, it looks like InputClass might be able to accomplish the same thing. I'll look into it tomorrow.

----------

## pingufunkybeat

EDIT: False alarmLast edited by pingufunkybeat on Fri Dec 31, 2010 3:37 pm; edited 1 time in total

----------

## DaggyStyle

can you please share your new confs?

----------

## pingufunkybeat

Sorry, this was a false alarm. Apparently, I forgot the save the changes, so everything worked as before. In other words, I still have the same problem as in the original post.

"AutoAddDevices" breaks multi-seat.

"AllowMouseOpenFail false" breaks multi-seat.

So I guess that the conundrum is that you need AutoAddDevices to get through occasional interruptions, but you have to disable them in order to get proper mapping of peripherals to screens. Which means that multi-seat is essentially broken at the moment.

Still, the question is why the peripherals keep reconnecting. Could it be a hardware problem, or is it a regular thing?

----------

