Beginning with some update during the last few months, Xorg begins to lose clicks from the USB mouse. The mouse moves, and clicks to some windows go through, but most don't (in kde4). This happens almost immediately when moused is running. So I disabled "ums[0-9]+" section in /etc/devd.conf that starts moused. But this also happens without moused. Without moused it begins later, or possibly has the lower chance of happening. This began when I upgraded 10.3 STABLE from some July revision to the current revision. Now this keeps happening when I upgraded to 11.0 STABLE. It looks like the update causing this regression has been merged into both 11 and 10.3. Restarting Xorg helps, but then this starts happening again.
I observe this with USB mouse. Plugging/unplugging doesn't help. Restarting xorg helps, which suggests that the problem is in xorg, because it reopens the device every time it is plugged again and still has the problem. Changing from kde4 to xfce4 doesn't help. The upstream report: https://bugs.freedesktop.org/show_bug.cgi?id=98507
The mouse that caused the problem has "horizontal" (left/right) wheel. Replacing the mouse with the one without the wheel makes the problem go away. I suspect that this commit to ums.c caused the problem: > ------------------------------------------------------------------------ > r305828 | hselasky | 2016-09-15 01:34:16 -0700 (Thu, 15 Sep 2016) | 7 lines > > MFC r305590: > Correctly map the USB mouse tilt delta values into buttons 5 and 6 > instead of 3 and 4 which is used for the scroll wheel, according to > X.org. > > PR: 170358 > > ------------------------------------------------------------------------
Hi, Can you provide more information about your mouse, like dmesg? Is the tilt-wheel button based or a scrollwheel? Can you send some output with hw.usb.ums.debug=16 Maybe the button to wheel conversion is simply too sensitive. Have you tried the new EVDEV support in 12-current? --HPS
It's Nano-transiver based mouse https://www.amazon.com/Microsoft-Explorer-Touch-Mouse-Black/dp/B00519UZM8: > ukbd0: <Microsoft Microsoft Nano Transceiver v1.0, class 0/0, rev 2.00/6.74, addr 2> on usbus1 It doesn't have any moving wheels. It is a touch mouse. Moving fingers generate up/down/left/right signals. > $ sysctl hw.usb.ums.debug=16 > hw.usb.ums.debug: 0 I didn't try EVDEV. It worked fine for years before the update. Now left/right doesn't work at all. And additionally Xorg gets confused very quickly and wrong windows get clicks which renders workspace unusable.
After: sysctl hw.usb.ums.debug=16 You should re-plug the device and collect debug prints from dmesg. --HPS
Created attachment 176325 [details] dmesg messages with sysctl hw.usb.ums.debug=16
Created attachment 176327 [details] shar archive Corrected the license.
Created attachment 176328 [details] mouse debug messages Sorry.
Created attachment 176331 [details] UMS patch Can you test the attached patch. Does it solve your problem?
Hi Hans, With this patch the problem of Xorg unusableness is gone (click destination aren't getting messed up any more). But left/right "wheel" signals don't work now in chrome (they definitely worked before). In xev, left motion signal shows as: > ButtonPress event, serial 40, synthetic NO, window 0x5000001, > root 0x29f, subw 0x5000002, time 1206689, (34,37), root:(981,646), > state 0x0, button 10, same_screen YES > > EnterNotify event, serial 40, synthetic NO, window 0x5000001, > root 0x29f, subw 0x0, time 1206689, (34,37), root:(981,646), > mode NotifyGrab, detail NotifyInferior, same_screen YES, > focus YES, state 0 > > KeymapNotify event, serial 40, synthetic NO, window 0x0, > keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Right motion signal shows as: > ButtonPress event, serial 40, synthetic NO, window 0x5000001, > root 0x29f, subw 0x5000002, time 1291589, (33,23), root:(877,607), > state 0x0, button 11, same_screen YES > > EnterNotify event, serial 40, synthetic NO, window 0x5000001, > root 0x29f, subw 0x0, time 1291589, (33,23), root:(877,607), > mode NotifyGrab, detail NotifyInferior, same_screen YES, > focus YES, state 0 > > KeymapNotify event, serial 40, synthetic NO, window 0x0, > keys: 4294967199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Button numbers might be wrong? I didn't run such test when mouse was working, so not sure what they should be.
Hi, Are you happy with this patch? Button numbers can be assigned in Xorg.conf . Can you check that? /etc/X11/Xorg.conf . --HPS
What bothers me is that these buttons were working out of the box before, and now they require manual setting in xorg.conf, which simple users won't be able to do for sure. So you know why this changed? Is this the consequence of the same patch, or maybe something else?
Hi, The tilt wheel was assigned the wrong buttons before. The problem is that the initial testing was done using a mouse with 16-buttons, so button 5 && 6 were valid. Your mouse has fewer buttons, so the button 5 && 6 never got cleared. Did you look at PR 170358 ? Check your Xorg.conf that the mapping of the buttons is not overwritten. --HPS
A commit references this bug: Author: hselasky Date: Mon Oct 31 18:38:50 UTC 2016 New revision: 308144 URL: https://svnweb.freebsd.org/changeset/base/308144 Log: Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. PR: 213919 MFC after: 3 days Changes: head/sys/dev/usb/input/ums.c
A commit references this bug: Author: hselasky Date: Mon Nov 7 08:14:29 UTC 2016 New revision: 308394 URL: https://svnweb.freebsd.org/changeset/base/308394 Log: MFC r308144 and r308165: Fixes for virtual T-axis buttons. Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. Make sure the virtual T-axis buttons generate button release event(s) for continuous tilting. PR: 213919 PR: 213957 Changes: _U stable/11/ stable/11/sys/dev/usb/input/ums.c
A commit references this bug: Author: hselasky Date: Mon Nov 7 08:15:58 UTC 2016 New revision: 308395 URL: https://svnweb.freebsd.org/changeset/base/308395 Log: MFC r308144 and r308165: Fixes for virtual T-axis buttons. Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. Make sure the virtual T-axis buttons generate button release event(s) for continuous tilting. PR: 213919 PR: 213957 Changes: _U stable/10/ stable/10/sys/dev/usb/input/ums.c
A commit references this bug: Author: hselasky Date: Mon Nov 7 08:17:24 UTC 2016 New revision: 308396 URL: https://svnweb.freebsd.org/changeset/base/308396 Log: MFC r308144 and r308165: Fixes for virtual T-axis buttons. Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. Make sure the virtual T-axis buttons generate button release event(s) for continuous tilting. PR: 213919 PR: 213957 Changes: _U stable/9/sys/ stable/9/sys/dev/usb/input/ums.c
A commit references this bug: Author: hselasky Date: Mon Nov 7 08:18:51 UTC 2016 New revision: 308397 URL: https://svnweb.freebsd.org/changeset/base/308397 Log: MFC r308144 and r308165: Fixes for virtual T-axis buttons. Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. Make sure the virtual T-axis buttons generate button release event(s) for continuous tilting. PR: 213919 PR: 213957 Changes: _U stable/8/sys/ _U stable/8/sys/dev/ _U stable/8/sys/dev/usb/ stable/8/sys/dev/usb/input/ums.c