Bug 13662 - do not always disable second wheel on bad packet
Summary: do not always disable second wheel on bad packet
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Mouse (show other bugs)
Version: 7.3 (2007.09)
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-14 14:35 UTC by Brice Goglin
Modified: 2018-06-12 19:06 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Brice Goglin 2007-12-14 14:35:25 UTC
"Pigeon" reported on the Debian BTS that he often got his secondary mouse wheel disabled because of:
  (II) Mouse autoprobe: Disabling secondary wheel
He is using a Trust AmiTrack trackball configured for ExplorerPS2 protocol (and the same problem happens using IMPS2).

He used the following patch to just ignore bad packets instead of disabling the wheel completely. It seems to work fine so far (he got at least one bad packet and the system survived fine).

I guess there were some good reasons for disable the wheel in this case. But maybe adding an option to just ignore bad packets would be a good idea?

diff -u src/mouse.c.orig src/mouse.c     
--- src/mouse.c.orig    2007-12-06 14:57:38.000000000 +0000
+++ src/mouse.c 2007-12-06 14:27:08.000000000 +0000
@@ -1511,9 +1511,14 @@
   case 0x0e: dw = -1; break;
   case 0x0f: dz = -1; break;
   default:
+#ifdef notdef
     xf86Msg(X_INFO,
             "Mouse autoprobe: Disabling secondary wheel\n");
     pMse->negativeW = pMse->positiveW = MSE_NOAXISMAP;
+#else
+    xf86Msg(X_INFO,
+            "ExplorerPS/2 decode: unrecognised z-axis packet received\n");
+#endif
     }
   }
   if (pMse->negativeW == MSE_NOAXISMAP)
Comment 1 Pigeon 2007-12-14 16:08:47 UTC
See also:

Original Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=454546

Probably related problem: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392864

Reasoning behind the introduction of the problem code: https://bugzilla.novell.com/show_bug.cgi?id=144682

-- 
Pigeon

http://pigeonsnest.co.uk/
Comment 2 Matthias Hopf 2007-12-18 09:15:40 UTC
Hm. I added this code because too many people had two wheels configured, but
using a 1 wheel mouse that sends gathered events of which some look like 2
wheel events. If more than 2 events are gathered together a packet is created that cannot occur with the 2 wheel mouse protocol. Unfortunately, there is no way of reliably autodetecting this.

I have one idea: Pigeon, can you log the spurious z-Axis value? I just had the idea that packets can have both wheels reported in one packet, and that would create a 'spurious' (read: not yet interpreted correctly) packet. In that case this could be easily fixed for good.
Comment 3 Pigeon 2007-12-20 08:53:23 UTC
Will do, I'll get back once I've logged some data.
Comment 4 Adam Jackson 2018-06-12 19:06:43 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.