From nobody@FreeBSD.org  Wed Apr  2 06:11:54 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 7E1309AB
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  2 Apr 2014 06:11:54 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 520A0D63
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  2 Apr 2014 06:11:54 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s326Bs9Z031438
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 2 Apr 2014 06:11:54 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s326BsIB031428;
	Wed, 2 Apr 2014 06:11:54 GMT
	(envelope-from nobody)
Message-Id: <201404020611.s326BsIB031428@cgiserv.freebsd.org>
Date: Wed, 2 Apr 2014 06:11:54 GMT
From: J Smith <freebsd.ia64@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Intel DRM fails & USB KVM Mouse fails to function 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188186
>Category:       kern
>Synopsis:       [drm] [ums] Intel DRM fails & USB KVM Mouse fails to function
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 02 06:20:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun May 04 04:49:16 UTC 2014
>Originator:     J Smith
>Release:        10.0-RELEASE
>Organization:
>Environment:
FreeBSD xxzz..xxxx.xxxxx 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
USB mouse thru KVM switch does not work or get detected. Xorg crashes
with various errors related to Intel DRM.

# dmesg | grep usb
usbus0: EHCI version 1.0
usbus0 on ehci0
usbus1: EHCI version 1.0
usbus1 on ehci1
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
ugen1.1: <Intel> at usbus1
uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <Intel> at usbus0
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
Root mount waiting for: usbus1 usbus0
Root mount waiting for: usbus1 usbus0
ugen1.2: <vendor 0x8087> at usbus1
uhub2: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
ugen0.2: <vendor 0x8087> at usbus0
uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus0
ugen1.3: <vendor 0x0835> at usbus1
ukbd0: <USB Keyboard> on usbus1
uhid0: <USB Mouse> on usbus1

Here mouse is read as a remote control (uhid0). I have tried various
USB & PS/2 mouse but that didn't work. 

In Xorg.0.log the mouse gets detected but DRM fails -

   151.339] (II) config/hal: Adding input device USB KVM
[   151.339] (II) LoadModule: "kbd"
[   151.340] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[   151.365] (II) Module kbd: vendor="X.Org Foundation"
[   151.365] 	compiled for 1.12.4, module version = 1.8.0
[   151.365] 	Module class: X.Org XInput Driver
[   151.365] 	ABI class: X.Org XInput driver, version 16.0
[   151.365] (II) Using input driver 'kbd' for 'USB KVM'
[   151.365] (**) USB KVM: always reports core events
[   151.365] (**) USB KVM: always reports core events
[   151.365] (**) Option "Protocol" "standard"
[   151.365] (WW) Option "Device" requires an string value
[   151.365] (**) Option "XkbRules" "base"
[   151.365] (**) Option "XkbModel" "pc105"
[   151.365] (**) Option "XkbLayout" "us"
[   151.365] (**) Option "config_info" "hal:/org/freedesktop/Hal/devices/usb_device_835_1601_USB_Mouse_if0"
[   151.365] (II) XINPUT: Adding extended input device "USB KVM" (type: KEYBOARD, id 6)
[   167.443] (II) AIGLX: Suspending AIGLX clients for VT switch
[   167.443] (WW) intel(0): drmDropMaster failed: Unknown error: -22

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: freebsd ia64 <freebsd.ia64@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/188186 USB KVM Mouse fails to function
Date: Sun, 20 Apr 2014 21:28:58 -0700

 Here is more information on KVM mouse failure -
 
 When I attach additional USB mouse & jump the KVM mouse port on the
 tower, the mouse gets detected and works.
 
 I am unable to set UQ_HID_IGNORE as per usbconfig.
 
 Additional information -
 
 root@xxxxxx:/home/xxzz # usbconfig
 ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH
 (480Mbps) pwr=SAVE (0mA)
 ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH
 (480Mbps) pwr=SAVE (0mA)
 ugen0.2: <product 0x0024 vendor 0x8087> at usbus0, cfg=0 md=HOST
 spd=HIGH (480Mbps) pwr=SAVE (0mA)
 ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST
 spd=HIGH (480Mbps) pwr=SAVE (0mA)
 ugen1.4: <product 0x04ec vendor 0x045e> at usbus1, cfg=0 md=HOST
 spd=HIGH (480Mbps) pwr=ON (500mA)
 ugen1.3: <USB KVM vendor 0x0835> at usbus1, cfg=0 md=HOST spd=LOW
 (1.5Mbps) pwr=ON (100mA)
 ugen1.5: <USB Optical Mouse vendor 0x04ca> at usbus1, cfg=0 md=HOST
 spd=LOW (1.5Mbps) pwr=ON (98mA)root@xxxxxx:/home/xxzz # usbconfig
 
 root@xxxxxx:/home/xxzz # usbconfig -u 1 -a 3 dump_info
 ugen1.3: <USB KVM vendor 0x0835> at usbus1, cfg=0 md=HOST spd=LOW
 (1.5Mbps) pwr=ON (100mA)
 
 root@xxxxxx:/home/xxzz # usbconfig -u 1 -a 3 dump_curr_config_desc
 ugen1.3: <USB KVM vendor 0x0835> at usbus1, cfg=0 md=HOST spd=LOW
 (1.5Mbps) pwr=ON (100mA)
 Configuration index 0
 
     bLength = 0x0009
     bDescriptorType = 0x0002
     wTotalLength = 0x003b
     bNumInterfaces = 0x0002
     bConfigurationValue = 0x0001
     iConfiguration = 0x0003  <USB KVM>
     bmAttributes = 0x00a0
     bMaxPower = 0x0032
 
     Interface 0
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0003
       bInterfaceSubClass = 0x0001
       bInterfaceProtocol = 0x0001
       iInterface = 0x0001  <USB Keyboard>
 
       Additional Descriptor
 
       bLength = 0x09
       bDescriptorType = 0x21
       bDescriptorSubType = 0x11
        RAW dump:
        0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x43,
        0x08 | 0x00
 
      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0081  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0008
         bInterval = 0x000a
         bRefresh = 0x0000
         bSynchAddress = 0x0000
 
 
     Interface 1
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0001
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0003
       bInterfaceSubClass = 0x0000
       bInterfaceProtocol = 0x0000
       iInterface = 0x0002  <USB Mouse>
 
       Additional Descriptor
 
       bLength = 0x09
       bDescriptorType = 0x21
       bDescriptorSubType = 0x11
        RAW dump:
        0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x82,
        0x08 | 0x00
 
      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0008
         bInterval = 0x000a
         bRefresh = 0x0000
         bSynchAddress = 0x0000
 
 root@xxxxxx:/home/xxzz # usbconfig add_dev_quirk_vplh 0x0835 0x1601
 0x0000 0xffff UQ_HID_IGNORE
 
 root@xxxxxx:/home/xxzz # dmesg -a
 .
 .
 .
 ukbd0: at uhub3, port 4, addr 3 (disconnected)
 uhid0: at uhub3, port 4, addr 3 (disconnected)
 ukbd0: <USB Keyboard> on usbus1
 kbd2 at ukbd0
 ugen1.3: <vendor 0x0835> at usbus1 (disconnected)
 ukbd0: at uhub3, port 4, addr 3 (disconnected)
 ugen1.3: <vendor 0x0835> at usbus1
 ukbd0: <USB Keyboard> on usbus1
 kbd2 at ukbd0
 ugen1.5: <vendor 0x04ca> at usbus1
 ums0: <USB Mouse> on usbus1
 ums0: 16 buttons and [XYZ] coordinates ID=1
 ums1: <vendor 0x04ca USB Optical Mouse, class 0/0, rev 2.00/2.00, addr
 5> on usbus1
 ums1: 3 buttons and [XYZ] coordinates ID=0
 
 The mouse works if I attach additional USB mouse and  jump the KVM USB
 port. PS/2 mouse does not get detected at all.
Responsible-Changed-From-To: freebsd-amd64->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun May 4 04:47:51 UTC 2014 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188186 
>Unformatted:
