Bug 46540 - mousedrv ignores "Device" and "Protocol" in xorg.conf
Summary: mousedrv ignores "Device" and "Protocol" in xorg.conf
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Mouse (show other bugs)
Version: 7.7 (2012.06)
Hardware: All All
: medium blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 14:13 UTC by WJ
Modified: 2018-08-10 20:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
DEBUG patch, to verify and test the problem and solution (6.05 KB, patch)
2012-02-28 15:15 UTC, WJ
no flags Details | Splinter Review
Patch mousedrv to recognize Device and Protocol (3.36 KB, patch)
2012-02-28 15:19 UTC, WJ
no flags Details | Splinter Review

Description WJ 2012-02-23 14:13:24 UTC
It is impossible to use a serial mouse with xorg, because the mousedrv does not see the "Device" line.  I have modified mousedrv, and have confirmed this with printf statements.  The test for "Device" always returns NULL, because it is before the call to CollectOptions.  An identical test placed after CollectOptions does see the xorg.conf "Device" line and can printf to confirm this.
The test for "Protocol" is right before the "Device" test and fails for the same reason.
I have modified a mousedrv by reording the calls, and have confirmed that "Device" in xorg.conf works simply by putting the CollectOptions before any calls to test for Options.  Have not got "Protocol" to work yet.

There is no way to use a serial mouse without using the "Device" line in xorg.conf.  HAL and UDEV cannot discover a serial mouse.
This has blocked use of a serial mouse on Linux 2.6 over 18 months and 2 distributions.  I still use Linux 2.4 because of this.  There is no way around it.  Other mice do not have 3 buttons.
There is no reason to have code in mousedrv checking for Options in a way that cannot possibly work.
Comment 1 WJ 2012-02-28 15:15:58 UTC
Created attachment 57781 [details] [review]
DEBUG patch, to verify and test the problem and solution

DEBUG statements, conditional.
Comment 2 WJ 2012-02-28 15:19:02 UTC
Created attachment 57782 [details] [review]
Patch mousedrv to recognize Device and Protocol

This patch is required to use a serial mouse with any of the recemt xorg mousedrv.
Apply patch to xf86-input-mouse-1.7.0/src.
Comment 3 Alan Coopersmith 2012-03-16 23:33:53 UTC
xf86-input-mouse 1.7.2 already has a patch to restore Device & Protocol
recognition:

http://cgit.freedesktop.org/xorg/driver/xf86-input-mouse/commit/?id=b65651974ee5620086b484086ea12d78c92fa369

Does that work for you?
Comment 4 WJ 2012-11-30 19:48:51 UTC
The existing patch is hardly adequate.  The GETOPTIONS was not missing, it was misplaced, and now it is called twice.  While that might get it working in some situations, I had to make the changes as appeared in my patch to get all the situations that I could test to work as before, without breaking something anew.
My debugging experience was that moving only one line, such as that, would break some of the other tests.
Comment 5 GitLab Migration User 2018-08-10 20:58:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/issues/12.


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.