Bug 74713 - upgrade to xserver-xorg 1.15 causing issues with mousewheel in some games
Summary: upgrade to xserver-xorg 1.15 causing issues with mousewheel in some games
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-08 15:24 UTC by Jason Pleau
Modified: 2018-12-17 17:25 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xscope data when the issue is present (commit not reverted) (17.23 KB, text/plain)
2014-02-10 23:16 UTC, Jason Pleau
no flags Details
xscope data when the issue is NOT present (commit reverted) (13.61 KB, text/plain)
2014-02-10 23:17 UTC, Jason Pleau
no flags Details

Description Jason Pleau 2014-02-08 15:24:34 UTC
Greetings.

This is a weird issue I've been trying to fix, and ultimately downgrading to xorg-1.14.

I am running Arch Linux 64-bit, running with the nvidia propritary drivers (tried 331.20, 331.38, 334.16-beta).

The issue I am having is when I play games that run on Valve's GoldSrc engine (for example Counter-Strike 1.6), with vertical-sync OFF, my mouse's wheel stops working correctly. Both wheelup/wheeldown will respond as "thumb buttons".

For a while I thought it was an issue with the latest nvidia drivers (331.38), or the game. But yesterday I tried downgrading xorg to 1.14, and the issue vanished.

I'm looking to find out why this happens, and what changed from 1.14 to 1.15 that could be causing this. And possibly a way to fix it too :)

Thanks

Jason
Comment 1 Jason Pleau 2014-02-10 01:11:31 UTC
I spent a few hours learning how to git-bisect, and I found the commit that introduced the issue for me:

http://cgit.freedesktop.org/xorg/xserver/commit/?id=9bf46610a9d20962854016032de4567974e87957

Reverting this commit results in my mousewheel working correctly in my game

I would propose a patch that simply reverses it, but surely there is a way to keep the proposed changes in this commit and at the same time fix my issue.

For now I'll just revert on my system

Thanks

Jason
Comment 2 Peter Hutterer 2014-02-10 05:21:07 UTC
That would be a rather odd side-effect of that patch. Can you hook up xscope and check the actual values being sent are incorrect?
Comment 3 Chris Wilson 2014-02-10 13:34:29 UTC
I think the issue will be related to the event/reply? being sent split between two different packets (from two separate calls to WriteToClient) and the reconstruction going wrong. If this is the case, the error would crop up randomly in normal usage if the Client buffer had just sufficient backlog to force the flush between the two WriteToClient. Checking the data on the wire is definitely the best first step in debugging this.
Comment 4 Jason Pleau 2014-02-10 17:45:36 UTC
(In reply to comment #2)
> That would be a rather odd side-effect of that patch. Can you hook up xscope
> and check the actual values being sent are incorrect?

I will try to get xscope running (never used it myself, and by reading the manual I'm not sure yet how to set it up), but I highly doubt I'm in a position of knowing if values are correct or not. 

I found this commit with trial-and-error with git-bisect, recompiling each time and manually testing if the issue was present or not.

Once I have some output / log I'll attach it here

Thanks

Jason
Comment 5 Peter Hutterer 2014-02-10 21:43:20 UTC
$ echo $DISPLAY
:0
$ xscope -i4 -o0 > xscope.out
$ DISPLAY=:4 someprogram

-i and -o map to the numbers in the current display and the one you want to set for the program. usually $DISPLAY is :0, so 0, the other one is free for the choosing.

The output is human-readable so you should be able to debug at least the input events. if the button number itself changes in the event then we have some other issue, if it's a re-assembling issue then xscope may provide some hints there too.
Comment 6 Jason Pleau 2014-02-10 23:16:50 UTC
Created attachment 93813 [details]
xscope data when the issue is present (commit not reverted)
Comment 7 Jason Pleau 2014-02-10 23:17:07 UTC
Created attachment 93814 [details]
xscope data when the issue is NOT present (commit reverted)
Comment 8 Jason Pleau 2014-02-10 23:23:01 UTC
Thank you Peter for your assistance regarding xscope

I have attached to the bug two versions of the output, one with the problem present, and another one where I reverted the commit (and the problem does not appear).

The buttons numbers seem to be the same (Mod2 on press, Mod2 | Button5 on release), so it must be something else?

I have not included output that happened before and after mouse movement. If needed I'll re-run it and include the entire file

Thanks

Jason
Comment 9 Jason Pleau 2014-06-08 01:37:49 UTC
Hello.

Have you taken a look at the dumps I included in my previous post?

The issue is still present with 1.15.1, and reverting the commit still works to correct it.

(PS: This is not a major issue, but still is quite annoying. I can try contacting Valve again, there is a chance there's something on their end, but their communication is quite the opposite of "good"..)

Thanks

Jason
Comment 10 Daniel Gleason 2015-03-22 18:33:26 UTC
Hi all,

The issue is still present in 1.16. Is anyone working on it? I am about to recompile xorg to try and fix the issue myself on my system.

Thanks,
Dan

X.Org X Server 1.16.0
Release Date: 2014-07-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-70-generic x86_64 Ubuntu
Current Operating System: Linux pootar 3.16.0-31-generic #43-Ubuntu SMP Tue Mar 10 17:37:36 UTC 2015 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.16.0-31-generic root=UUID=7b53f358-e096-4c39-9f17-e21ca8b12e6a ro quiet splash
Build Date: 12 February 2015  02:46:23PM
xorg-server 2:1.16.0-1ubuntu1.3 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.32.4
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Comment 11 Peter Hutterer 2015-03-23 07:14:54 UTC
the two xscope outputs don't hint at anything here. the button events are 4/5 in both outputs (well, one output only has button 5 events, but that's probably input data).

For the buttons to be thumb buttons, the button numbers would have to be 8 or higher. That's not the case here though. Two more questions: does this happen with open drivers, and does it happen in all apps or just the GoldSrc engine?
Comment 12 Daniel Gleason 2015-03-25 03:20:30 UTC
Peter, I was unable to run the game with open drivers so I can't comment on that. I also went back and re-installed xubuntu 13.10 because I know everything on my system worked just fine. I would like the update to the latest LTS release, but I'm fine with where I'm at. If there is anything I can do from 13.10 let me know, but I don't want to go through the hassle of another reinstall.
Comment 14 Daniel Gleason 2016-04-06 17:16:49 UTC
Is there anything being done about this? I would love to upgrade from 13.10 but this specific bug is blocking me from doing so.

Here is more info about the bug:
https://github.com/ValveSoftware/steam-for-linux/issues/3302

Thanks,
Dan
Comment 15 Peter Hutterer 2016-04-28 04:21:43 UTC
judging by the comments in that bug, this is a GoldSrc issue, affecting only the binary driver. I'm not sure what exactly is going on, but since we don't know what the binary blobs are doing it'll be a bit hard to debug...
Comment 16 GitLab Migration User 2018-12-17 17:25:41 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/xserver/issues/555.


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.