Summary: | x11/xorg: xorg + hal: mouse input devices psm0 and usm0 not correctly recognized ("No Device specified, looking for one") | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Martin Birgmeier <Martin.Birgmeier> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-x11 (Nobody) <x11> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Martin Birgmeier
2012-09-08 07:50:08 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-x11 reclassify and assign. The same here with the latest ports tree. I use xdm and the first session is almost always success. But if a user closes the session, while next session a USB mouse may fail to be detected. And at both diskless stations booting from this server mouses stopped working also. I had to add 'Option "AutoAddDevices" "Off"' and define input devices at xorg.conf to get mouses back. HTH -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve I have Lenovo ThinkPad with built-in PS/2 mouse (stick) and also plug in external USB mouse. $ lshal |egrep 'psm0|ums0' freebsd.device_file = '/dev/psm0' (string) input.device = '/dev/psm0' (string) freebsd.device_file = '/dev/ums0' (string) usb.freebsd.devname = 'ums0' (string) $ ps auxwww |grep mouse root 10274 0.5 0.1 9608 1532 ?? Ss 12:35AM 0:10.88 /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.ums0.pid root 10153 0.0 0.2 12248 3496 ?? I 12:34AM 0:00.28 hald-addon-mouse-sysmouse: /dev/psm0 (hald-addon-mouse-sy) root 10293 0.0 0.2 12248 3488 ?? I 12:35AM 0:00.01 hald-addon-mouse-sysmouse: /dev/ums0 (hald-addon-mouse-sy) Case 1: both mouses: PS/2, USB plugged in $ startx PS/2 mouse becomes disabled, USB mouse seems to work (movable), but there is a problem with responses to mouse clicks and commands in xterm (delay in appearance of typed input chars, missing output from commands). $ cat /var/log/Xorg.0.log X.Org X Server 1.7.7 Release Date: 2010-05-04 X Protocol Version 11, Revision 0 Build Operating System: FreeBSD 9.1-RC1 i386 Current Operating System: FreeBSD localhost.localdomain 9.1-RC2 FreeBSD 9.1-RC2 #0 r241133: Tue Oct 2 17:11:45 UTC 2012 root@obrian.cse.buffalo.edu:/usr/ob j/usr/src/sys/GENERIC i386 Build Date: 03 October 2012 10:23:17PM ... (WW) AllowEmptyInput is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled. (WW) Disabling Mouse0 (WW) Disabling Keyboard0 ... (WW) PS/2 Mouse: No Device specified, looking for one... (II) PS/2 Mouse: Setting Device option to "/dev/sysmouse" (--) PS/2 Mouse: Device: "/dev/sysmouse" (==) PS/2 Mouse: Protocol: "Auto" (**) PS/2 Mouse: always reports core events (**) Option "Device" "/dev/sysmouse" (==) PS/2 Mouse: Emulate3Buttons, Emulate3Timeout: 50 (**) PS/2 Mouse: ZAxisMapping: buttons 4 and 5 (**) PS/2 Mouse: Buttons: 9 (II) XINPUT: Adding extended input device "PS/2 Mouse" (type: MOUSE) (**) PS/2 Mouse: (accel) keeping acceleration scheme 1 (**) PS/2 Mouse: (accel) acceleration profile 0 (II) PS/2 Mouse: SetupAuto: hw.iftype is 4, hw.model is 0 (II) PS/2 Mouse: SetupAuto: protocol is SysMouse (II) config/hal: Adding input device Optical Mouse (WW) Optical Mouse: No Device specified, looking for one... (II) Optical Mouse: Setting Device option to "/dev/sysmouse" (--) Optical Mouse: Device: "/dev/sysmouse" (==) Optical Mouse: Protocol: "Auto" (**) Optical Mouse: always reports core events (**) Option "Device" "/dev/sysmouse" (==) Optical Mouse: Emulate3Buttons, Emulate3Timeout: 50 (**) Optical Mouse: ZAxisMapping: buttons 4 and 5 (**) Optical Mouse: Buttons: 9 (II) XINPUT: Adding extended input device "Optical Mouse" (type: MOUSE) (**) Optical Mouse: (accel) keeping acceleration scheme 1 (**) Optical Mouse: (accel) acceleration profile 0 (II) Optical Mouse: SetupAuto: hw.iftype is 4, hw.model is 0 (II) Optical Mouse: SetupAuto: protocol is SysMouse (II) config/hal: Adding input device AT Keyboard ... Case 2: mouses: PS/2 only (note: USB mouse will be plugged in after startx). $ startx PS/2 mouse works. $ cat /var/log/Xorg.0.log ... (WW) PS/2 Mouse: No Device specified, looking for one... (II) PS/2 Mouse: Setting Device option to "/dev/psm0" (--) PS/2 Mouse: Device: "/dev/psm0" (==) PS/2 Mouse: Protocol: "Auto" (**) PS/2 Mouse: always reports core events (**) Option "Device" "/dev/psm0" (==) PS/2 Mouse: Emulate3Buttons, Emulate3Timeout: 50 (**) PS/2 Mouse: ZAxisMapping: buttons 4 and 5 (**) PS/2 Mouse: Buttons: 9 (II) XINPUT: Adding extended input device "PS/2 Mouse" (type: MOUSE) (**) PS/2 Mouse: (accel) keeping acceleration scheme 1 (**) PS/2 Mouse: (accel) acceleration profile 0 (II) PS/2 Mouse: SetupAuto: hw.iftype is 3, hw.model is 0 (II) PS/2 Mouse: SetupAuto: protocol is PS/2 (II) PS/2 Mouse: ps2EnableDataReporting: succeeded (II) config/hal: Adding input device AT Keyboard ... $ USB mouse plugged in. $ cat /var/log/Xorg.0.log ... (II) config/hal: Adding input device Optical Mouse (WW) Optical Mouse: No Device specified, looking for one... (II) Optical Mouse: Setting Device option to "/dev/sysmouse" (--) Optical Mouse: Device: "/dev/sysmouse" (==) Optical Mouse: Protocol: "Auto" (**) Optical Mouse: always reports core events (**) Option "Device" "/dev/sysmouse" (==) Optical Mouse: Emulate3Buttons, Emulate3Timeout: 50 (**) Optical Mouse: ZAxisMapping: buttons 4 and 5 (**) Optical Mouse: Buttons: 9 (II) XINPUT: Adding extended input device "Optical Mouse" (type: MOUSE) (**) Optical Mouse: (accel) keeping acceleration scheme 1 (**) Optical Mouse: (accel) acceleration profile 0 (II) Optical Mouse: SetupAuto: hw.iftype is 4, hw.model is 0 (II) Optical Mouse: SetupAuto: protocol is SysMouse $ Both mouses work. I've made a patch and it seems to solve this problem. This patch goes to x11-drivers/xf86-input-mouse. It changes src/mouse.c. I've attached the patch. It seems like that the hal configuration module correctly added the "Device" option, in config/hal.c in xorg-server. The xorg-server copied it into the IDevRec struct's commonOptions field, in NewInputDeviceRequest() in hw/xfree86/common/xf86Xinput.c Later, this struct is passed into xf86NewInputDevice(), and then passed into mouse driver's MousePreInit(). However, there is a problem here. If the ABI version is old, MousePreInit() calls NewMousePreInit(), and copied some info from IDevPtr into InputInfoPtr, which is passed into NewMousePreInit(). But it does not copy the commonOptions field. So the options, including the "Device" option, is lost. This patch just copies IDevPtr.commonOptions into InputInfoPtr.options, and then it works. -- Cheers, Henry Seems like this is fixed in xf86-input-mouse 1.7.2: http://cgit.freedesktop.org/xorg/driver/xf86-input-mouse/commit/?id=b65651974ee5620086b484086ea12d78c92fa369 We can just apply this commit and wait for the new version... -- Cheers, Henry That was it indeed. I applied the patch from the git repo, and now both mice work normally. Thank you for your help. Regards, Martin Just a me too here. Both diskless stations and the server work with the patch. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve State Changed From-To: open->closed The patch from upstream was committed. Thanks for the report! |