Debounce Mouse?

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
tundra

Debounce Mouse?

Post by tundra »

I have an environment where pretty much every mouse I try has bad bounce problems with the middle button (scroll wheel). I am looking for a way to introduce a software delay to suppress the bounce. It seems other have had this problem and there was a workaround at one time. However, I am not clear this will work with current software:


blog.guntram.de/?p=16

So my questions are these:

- Does that patch above still apply?

- Is there an easier way to do this?

- If I wanted to write the code myself, how would I go about getting the current stuff and then getting my patches applied to the upstream master?

(Easier is better here...)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Debounce Mouse?

Post by Cosmo. »

The pity truth is: If one button starts to bounce, the mouse is a case for replacement.
tundra

Re: Debounce Mouse?

Post by tundra »

Not the case at all. These are brand new meece
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Debounce Mouse?

Post by all41 »

Cosmo. wrote:The pity truth is: If one button starts to bounce, the mouse is a case for replacement.
That is what I used to think as well.
I had a mouse which double or triple clicked with a single right click finger action. I quit using it for some
time and used a wired mouse instead. So one day I decided to disassemble the wireless mouse to see if the switch
could be replaced.
Under magnification I noticed the solder around the switch pins had a tiny crack on one of the pins. I resoldered the switch pins and wala!
It is still working perfectly after a couple years.
Everything in life was difficult before it became easy.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Debounce Mouse?

Post by Cosmo. »

tundra wrote:These are brand new meece
If you would have written "mouse" I would have answered to bring it back to the vendor. But multiple brand new mice with the same bug are unlikely.

What do you mean with this:
tundra wrote:I have an environment,
:?: What environment? Does this mean, that this problem does not exist everywhere? Is the problem reproducible in the live system?
tundra

Re: Debounce Mouse?

Post by tundra »

Every new mouse I have tried with a particular configuration - same desktop machine, a KVM, etc. has overly sensitive middle button sensitivity except the original Microsoft Intellimouse Optical I used to use (and is now utterly worn out). This is a timing thing and what is clearly needed is the ability to tune debounce times.

If you look at the link above, others have the same problem, a solution was proposed and then rejected due to lack of time to test.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Debounce Mouse?

Post by all41 »

tundra,
I have reread this topic and admit that I still do not understand the problem.
Can you further describe 'bounce problems with the middle scroll wheel' and 'overly sensitive middle button'.
Are these usb mouses or wireless?
I have used a plethora of devices without the problems you are encountering.
Everything in life was difficult before it became easy.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Debounce Mouse?

Post by Cosmo. »

Please provide an reproducible example, where you use the middle mouse and where it overreacts / bounces.
Habitual

Re: Debounce Mouse?

Post by Habitual »

Not all "KVMs etc" are created equal.
(more info about that)
tundra

Re: Debounce Mouse?

Post by tundra »

Here is the problem case: While scrolling with the middle mouse wheel, even the most momentary of contact by downward pressure (this is easy to do with every mouse I've tried thus far) immediately triggers one, and often more than one, middle button click events. This could be solved by adding delay and debounce code to the mouse driver. Again - I point you to my original link and note that many people have encountered this.

These are all wires meece because KVM does not deal kindly with wired ones.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Debounce Mouse?

Post by Cosmo. »

Mh, all my mice (mostly Logitech) I used in many years needed to press the wheel button expressively. I had never the case, that the wheel button git pressed, when I only wanted to scroll.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Debounce Mouse?

Post by all41 »

The patch referred to in op adds a debounce property for the device in x. I changed the default setting of 0 to 20.
I am unable to check the effectiveness since I do not have a "bouncy" mouse button.
My middle click seems to operate normally with the new setting.
debounce.png
Everything in life was difficult before it became easy.
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: Debounce Mouse?

Post by JayBird707 »

I have the mouse problem with my system. I have three Logitech M510 units, two which are essentially brand new. All three work fine with Win in a VM. I'm running Mint 18.3 XFCE (also tried Cinnamon) and all three need to be debounced for working in Mint. I have looked at blog.guntram.de/?p=16 and it's over my head. If I had the .deb for Mint 18.3 I could give it a go since I've looked at all the xinput steps and the terminal work is not a problem. Is there someone with a copy of the 18.3 associated .deb file?
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
oggan

Re: Debounce Mouse?

Post by oggan »

I've been having this issue too and it's really annoying.
I'd like to apply the mentioned patch but can't figure out how.
On the blog-page mentined in this thread (blog.guntram.de/?p=16) there's instructions but I can't get them to work:

Code: Select all

apt-get source xserver-xorg-input-evdev-dev
 sudo apt-get build-dep xserver-xorg-input-evdev-dev
 cd xserver-xorg-input-evdev-2.8.2/
 patch -p 1 < ../evdev-debounce.patch
 dch -i
 debuild -us -uc -b
 cd ..
 
FIrst 2 lines work.
The third one works if changed to cd xserver-xorg-input-evdev-2.10.1

But the fourth one gives me an error: bash: ../evdev-debounce.patch: No such file or directory

And there's no other file in there with a similar name so I do't kow what to do.
Any help?
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: Debounce Mouse?

Post by JayBird707 »

There is a link to the patch in blog.guntram.de . The problem is that the link is for the Ubuntu 14.04 version of the patch. If you are on Mint 18.3 (Ubuntu 16.04) that's not going to work. I have posted on the blog a request for someone to create the .deb file with the updated patch. If I hear anything I'll come back here and post it.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
hanspr

Re: Debounce Mouse?

Post by hanspr »

If anyone wants to try.

I read that the inputlib project has implemented mouse debounce on the newest versions. Linux Mint has version 1.6 installed, versions 1.9 and above have this implemented.

You may download the latest testing packages from debian website at : https://packages.debian.org/testing/libs/
You have to download libinput-bin (1.10.2-1) and libinput10 (1.10.2-1)

Install with :
sudo dpkg -i libinput10_1.10.2-1_amd64.deb
sudo dpkg -i libinput-bin_1.10.2-1_amd64.deb

I also downloaded version from stable (the current one on Mint) to reinstall in case something goes wrong.

I've been testing for 2 days and I had a temporary freeze about 10 seconds only once. It has not happened again. And I could say it reduced the bouncing problem of my mouse over 95%, it happens not very often anymore. Right now there seems to be no way to adjust the time so you have to live with the build in one.
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: Debounce Mouse?

Post by JayBird707 »

This is super 'hanspr'! To finally hear from someone who has made some progress is terrific. I am currently using a very cheap wired mouse and I have no problems at all. The moment I try to use my more expensive Logitech wireless mouse the problem returns. Before I go ahead and try your recommendation could yoyu please tell me what type of mouse you are using?
Thanks!!
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
Bronze Globe
Level 3
Level 3
Posts: 167
Joined: Wed Dec 14, 2016 1:27 am

Re: Debounce Mouse?

Post by Bronze Globe »

Is there a way to make this work on Mint 17.3 32-bit? I've tried installing the i386 versions of libinput-bin (1.10.2-1) and libinput10 (1.10.2-1). They have unmet dependencies, and just have the option to be uninstalled when I try fixing them with apt-get -f install.
User avatar
trytip
Level 14
Level 14
Posts: 5366
Joined: Tue Jul 05, 2016 1:20 pm

Re: Debounce Mouse?

Post by trytip »

every once in a while mouse gets triggered and shoots across the screen but have not sure if this is the same behaviour. seems to me that adding a delay would only delay the bounce but not prevent it if i understand correctly. you can slow it down by trying these
To slow down mouse to x0.2:

Code: Select all

xinput --set-prop 'USB Optical Mouse' 'Coordinate Transformation Matrix' 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 2.0
Back to normal:

Code: Select all

xinput --set-prop 'USB Optical Mouse' 'Coordinate Transformation Matrix' 1.0 0.0 0.0  0.0 1.0 0.0  0.0 0.0 1.0
To get the device name of your mouse:

Code: Select all

xinput --list --short
Image
Bronze Globe
Level 3
Level 3
Posts: 167
Joined: Wed Dec 14, 2016 1:27 am

Re: Debounce Mouse?

Post by Bronze Globe »

No, I don't have the mouse cursor shooting across the screen issue. I have the issue where clicks register incorrectly. Single registering as double, click-and-drag registering extra clicks during the drag, stuff like that.
Locked

Return to “Hardware Support”