Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Add additional mouse settings for disabling mouse acceleration and middle click emulation [$350] #491

Closed
heew opened this issue Jul 25, 2017 · 12 comments · Fixed by #494
Assignees
Labels

Comments

@heew
Copy link

heew commented Jul 25, 2017

As was done in Gnome 3.22 (see https://www.reddit.com/r/linux_gaming/comments/553v1p/gnome_322_includes_option_to_disable_mouse/) we should be able to disable these settings from the GUI and not be forced to use xinput --list and xinput --set-prop.

It really is not good for gaming to have mouse acceleration and I cannot get X to respect any of my .conf files to this (even after following the "man xorg.conf.d").

Image here shows how Gnome has it in the GUI: https://imgur.com/a/DYdUO.

I am currently working around this with a self-made script that I run prior to gaming, but I feel this should be more easier to work around.

Keep up the great work with MATE and I hope we can make it better!


There is a $350 open bounty on this issue. Add to the bounty at Bountysource.

@flexiondotorg flexiondotorg changed the title [Request] Add additional mouse settings for disabling mouse acceleration and middle click emulation [Request] Add additional mouse settings for disabling mouse acceleration and middle click emulation [$300] Jul 25, 2017
@heew
Copy link
Author

heew commented Jul 25, 2017

Some additional information..

From man xorg.conf.d:

       Xorg uses a configuration file called xorg.conf and files ending in the suffix .conf from  the  directory  xorg.conf.d  for  its  initial  setup.   The
       xorg.conf configuration file is searched for in the following places when the server is started as a normal user:

           /etc/X11/<cmdline>
           /usr/etc/X11/<cmdline>
           /etc/X11/$XORGCONFIG
           /usr/etc/X11/$XORGCONFIG
           /etc/X11/xorg.conf
           /etc/xorg.conf
           /usr/etc/X11/xorg.conf.<hostname>
           /usr/etc/X11/xorg.conf
           /usr/lib/X11/xorg.conf.<hostname>
           /usr/lib/X11/xorg.conf

So that means I should be able to add the following file and it should have kept the settings persistent:

[root@tower:~]# cat /etc/xorg.conf 
Section "InputClass"
	Identifier "ZOWIE EC-2 A"
	MatchDriver "libinput"
	MatchIsPointer "on"
	Option "AccelProfile" "flat"
	Option "MiddleEmulation" "off"
EndSection
[root@tower:~]#

I have also tried with this file:

[root@tower:~]# cat /etc/X11/xorg.conf.d/95-mouse-fix.conf 
Section "InputClass"
	Identifier "ZOWIE EC-2 A"
	MatchDriver "libinput"
	MatchIsPointer "on"
	Option "AccelProfile" "flat"
	Option "MiddleEmulation" "off"
EndSection
[root@tower:~]# 

So it seems MATE does not fully follow the run-parts listed in "man xorg.conf.d"?

According to how I read it it should have been included:

[root@tower:~]# run-parts --list /etc/X11/xorg.conf.d/
/etc/X11/xorg.conf.d/00-avoid-glamor.conf
/etc/X11/xorg.conf.d/00-keyboard.conf
/etc/X11/xorg.conf.d/95-mouse-fix.conf
/etc/X11/xorg.conf.d/99-nvidia.conf
[root@tower:~]#

99-nvidia.conf contents:

[root@tower:~]# cat /etc/X11/xorg.conf.d/99-nvidia.conf
#This file is provided by xorg-x11-drv-nvidia
#Do not edit

Section "Files"
	ModulePath   "/usr/lib64/nvidia/xorg"
	ModulePath   "/usr/lib64/xorg/modules"
EndSection
[root@tower:~]#

This particular issue could be related to #133, but there should really be a simple GUI option to do this.

Here is how I currently work around it - each time before gaming I run the following script:

[howard@tower:~]$ cat bin/mouse_fix.sh 
#!/usr/bin/bash
xinput --list | sed -ne 's/^[^ ][^V].*id=\([0-9]*\).*/\1/p' | while read id
do
	case  `xinput --list-props $id` in
        *"libinput Middle Emulation Enabled ("*)

            # turn off middle mouse emulation
			emulation_id=$(xinput --list-props $id |grep 'libinput Middle Emulation Enabled (' |egrep -o "\([0-9]{1,}\)" |sed 's/(\|)//g')
			xinput --set-prop $id $emulation_id 0

            # turn off mouse acceleration
            maccel_id=$(xinput --list-props $id |grep 'libinput Accel Profile Enabled (' |egrep -o "\([0-9]{1,}\)" |sed 's/(\|)//g')
            xinput --set-prop $id $maccel_id 0 1
		;;
	esac
done
[howard@tower:~]$ 

I was surprised that my xorg.conf.d file is not being respected, but as previously mentioned I think there should be a GUI way of doing this - similar to how Gnome 3.22 did.

I have tried to add the script to start up applications and crontab that fails - I assume because it does not detect X.

@flexiondotorg flexiondotorg changed the title [Request] Add additional mouse settings for disabling mouse acceleration and middle click emulation [$300] [Request] Add additional mouse settings for disabling mouse acceleration and middle click emulation [$350] Aug 3, 2017
@snaiperskaya96
Copy link

This will be easily achievable as soon as Mate will move to GTK3.4

@flexiondotorg
Copy link
Member

MATE is all GTK3 now. Minimum version is 3.14.

@snaiperskaya96
Copy link

snaiperskaya96 commented Aug 8, 2017 via email

@flexiondotorg
Copy link
Member

3.4 is less than 3.14.

@snaiperskaya96
Copy link

snaiperskaya96 commented Aug 8, 2017 via email

@flexiondotorg
Copy link
Member

No problem ☺️

@heew
Copy link
Author

heew commented Sep 10, 2017

Any updates on this?

@tom-seewald
Copy link

I'm guessing they are waiting for more money to be added to the bounty.

@zodywoolsey
Copy link

zodywoolsey commented Sep 7, 2018

While I was looking through some similar issues and some of the code it appears that what is requested has been added. Is this the case? Were the appropriate individuals rewarded the bounty as promised? If not, I might be up to attempting to solve this issue.

@Neverest
Copy link

@zodywoolsey From what I have seen, a GUI option to disable mouse acceleration has not ben added.

@monsta monsta transferred this issue from mate-desktop/mate-applets Jul 26, 2019
@sc0w sc0w added the bounty label Jul 26, 2019
@vkareh
Copy link
Member

vkareh commented Aug 2, 2019

@vkareh vkareh self-assigned this Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants