From owner-freebsd-x11@FreeBSD.ORG Sun Sep 14 21:40:58 2014 Return-Path: Delivered-To: freebsd-x11@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69E6E5F7 for ; Sun, 14 Sep 2014 21:40:58 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 4FD10AAA for ; Sun, 14 Sep 2014 21:40:58 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ELewHa007592 for ; Sun, 14 Sep 2014 21:40:58 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-x11@FreeBSD.org Subject: [Bug 183478] x11-servers/xorg-server: DEVD backend is broken, here's a fix Date: Sun, 14 Sep 2014 21:40:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: henry.hu.sh@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-x11@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 21:40:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=183478 --- Comment #5 from Henry Hu --- I've tried this patch and it gives me better results than the current hal/devd backend. It does not have the problem in bug 175731. After unplugging one keyboard, other keyboards are still usable. There is a small problem though: vendor/product information is missing. From xorg log: // unplug [ 16484.088] (II) config/devd: received: -ums0 [ 16484.089] (II) config/devd: removing device ums0 [ 16484.089] (II) UnloadModule: "mouse" [ 16484.104] (II) config/devd: received: -uhid0 // plug [ 16486.469] (II) config/devd: received: +ums0 driver=mouse flags=pointer usb_id=: [ 16486.469] (II) config/devd: ums0: driver= [ 16486.469] (II) config/devd: ums0: flags= [ 16486.469] (II) config/devd: ums0: usb_id=<:> [ 16486.469] (II) config/devd: adding device ums0 [ 16486.469] (II) Using input driver 'mouse' for 'ums0' [ 16486.469] (**) ums0: always reports core events [ 16486.469] (**) Option "Device" "/dev/ums0" [ 16486.470] (==) ums0: Protocol: "Auto" [ 16486.470] (**) ums0: always reports core events [ 16486.470] (==) ums0: Emulate3Buttons, Emulate3Timeout: 50 [ 16486.470] (**) ums0: ZAxisMapping: buttons 4 and 5 [ 16486.470] (**) ums0: Buttons: 5 [ 16486.470] (**) Option "config_info" "devd:ums0" [ 16486.470] (II) XINPUT: Adding extended input device "ums0" (type: MOUSE, id 8) [ 16486.470] (**) ums0: (accel) keeping acceleration scheme 1 [ 16486.470] (**) ums0: (accel) acceleration profile 0 [ 16486.470] (**) ums0: (accel) acceleration factor: 2.000 [ 16486.470] (**) ums0: (accel) acceleration threshold: 4 [ 16486.470] (II) ums0: SetupAuto: hw.iftype is 5, hw.model is 0 [ 16486.470] (II) ums0: SetupAuto: protocol is SysMouse [ 16486.471] (WW) fcntl(28, F_SETOWN): Inappropriate ioctl for device [ 16486.495] (II) config/devd: received: +uhid0 usb_id=: [ 16486.495] (II) config/devd: uhid0: usb_id=<:> [ 16486.495] (II) config/devd: adding device uhid0 [ 16486.496] (II) No input driver specified, ignoring this device. [ 16486.496] (II) This device may have been added with another device file. The reason is that, in xhotplug.conf, it says action "/usr/local/etc/rc.d/xhotplug add/usb $device-name $port.$devaddr"; and in xhotplug usbconfig is called with '-d $1' where $1 is $port.$devaddr. However, usbconfig expects $bus.$devaddr, not $port.$devaddr. For example, in this case ums0 is at ugen0.3, but xhotplug is called with 2.3, but if you change it into $bus it still does not work. From debug devd log: Processing event '+ums0 at bus=0 hubaddr=2 port=2 devaddr=3 interface=1 vendor=0x046d product=0xc52b devclass=0x00 devsubclass=0x00 sernum="" release=0x1201 mode=host intclass=0x03 intsubcla ss=0x01 intprotocol=0x02 on uhub3' Pushing table setting device-name=ums0 setting bus=0 setting hubaddr=2 setting port=2 setting devaddr=3 setting interface=1 setting vendor=0x046d setting product=0xc52b setting devclass=0x00 setting devsubclass=0x00 setting sernum= setting release=0x1201 setting mode=host setting intclass=0x03 setting intsubclass=0x01 setting intprotocol=0x02 setting bus=uhub3 Processing attach event Testing device-name=ums0 against ^(joy|psm)[0-9]+$, invert=0 Testing device-name=ums0 against ^(atp|uep|uhid)[0-9]+$, invert=0 Testing device-name=ums0 against ^ums[0-9]+$, invert=0 Executing '/etc/rc.d/moused quietstart ums0' Executing '/usr/local/etc/rc.d/xhotplug add/usb ums0 2.3' Popping table The correct value (bus=0) is silently overridden by bus=uhub3, so it's hard to obtain the usb bus value. It's possible to obtain this value by looking into dmesg but that's too ugly. -- You are receiving this mail because: You are the assignee for the bug.