How to edit synaptics configuration? xorg.conf way doesen't work
Solution 1
I created the /etc/X11/xorg.conf.d/71-synaptics.conf file with the following contents with sudo vi
:
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton3" "2"
EndSection
and I can see in /var/log/Xorg.0.log that the option has been set.
[ 91056.468] (**) Option "TapButton3" "2"
The option was merged with options I had set similarly in my 70-synaptics.conf file.
If your device uses a different device or different driver (see the /var/log/Xorg.0.log to see), you should adjust the Identifier and Driver lines appropriately.
Another approach is to disable the gnome mouse settings plugin.
-
To do this start a terminal with Alt+Ctl+T, and then install the dconf-editor:
apt-get install dconf-editor
hleinone -
Launch dconf-editor
dconf-editor
and navigate the tree to org.gnome.settings-daemon.plugins.mouse.
- Finally, uncheck the Active box
A drawback of this latter approach is that no settings you configure in System Settings-> Mouse and Touchpad will be effective.
This approach, from the comments, is from here by way of hleinone.
Solution 2
Old Answer
You can use ClickFinger3
instead, which is quite close to TapButton3
.
I encountered exactly the same problem. In addition to TapButton3
, my conf file also set ClickFinger3
to 2.
Section "InputClass"
Identifier "touchpad bind middle button"
MatchDriver "synaptics"
Option "TapButton3" "2"
Option "ClickFinger3" "2"
EndSection
However, my Xorg.0.log
does have the following.
[ 35.860] (**) Option "TapButton3" "2"
[ 35.860] (**) Option "ClickFinger3" "2"
The ironic thing is ClickFinger3
works pretty well but TapButton3
doesn't even work.
I also tried to put synclient TapButton3=2 ClickFinger3=2
in the .xsessionrc
file, in the startup application script.
I tried this
xinput set-prop --type=int --format=8 "SYNA2393:00 06CB:75E2 Touchpad" "Synaptics Tap Action" \
`xinput list-props "SYNA2393:00 06CB:75E2 Touchpad" | sed -n 's/,//g; s/Synaptics Tap Action.*:\(.*\)./\1/p'` 2
and that
xinput set-prop --type=int --format=8 "SYNA2393:00 06CB:75E2 Touchpad" "Synaptics Tap Action" 2 3 0 0 1 3 2
To no avail, none of them works for TapButton3
and all of them works for ClickFinger3
. I spent a day (literally, no exaggeration) to research about it and arrived at this conclusion.
This line of code is very likely to the cause of this strange behavior.
References:
state of multitouch gestures in 14.04 / Unity
How can I disable arbitrary default multitouch gestures in Unity?
New Answer
I found the real solution after I wrote the above.
Accidentally, I unchecked the "Tap to Click" option in Mouse & Touchpad via GUI and then read the output of synclient
. I observed that all the tap related values had been set to 0. This made me believe that the Unity mouse panel executes synclient
upon login and sets "Synaptics Tap Action"
to 2, 3, 0, 0, 1, 3, 0
.
To verify my conjecture, I needed to disable this GUI thing. I googled "ubuntu unity control center override synclient" and got this link as the top result.
I conducted an experiment by deactivating the GNOME mouse plugin.
gsettings set org.gnome.settings-daemon.plugins.mouse active false
Then I rebooted, hooray, the TapButton3
finally worked after login. I jollied around and soon found out my usual natural (reverse?) scrolling, which I set through GUI settings , no longer worked. After some investigation, I gathered the following actions (possibly incomplete) made by GNOME mouse plugin.
synclient HorizTwoFingerScroll=1 VertEdgeScroll=0
syndaemon -i 1.0 -t -K -R &
I can now make touchpad settings on a per-user base (which I prefer). So I removed my synaptics.conf
file and wrote the following as my ~/.xsessionrc
.
synclient TapButton3=2 ClickFinger3=2
synclient HorizTwoFingerScroll=1 VertEdgeScroll=0
# the following ampersand is significant
syndaemon -i 1.0 -t -K -R &
# natural scrolling
synclient VertScrollDelta=-28 HorizScrollDelta=-28
Reference:
How do I make my synclient settings stick?
Related videos on Youtube
Aldo DeeJay
Updated on September 18, 2022Comments
-
Aldo DeeJay over 1 year
I need to bind the TapButton3 as central mouse button so i do:
synclient TapButton3=2
it works great but when i restart or wake up from suspension it forgets the setting. i know that i have to create the xorg.conf as follows
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" Option "TapButton3" "2" EndSection
but this doesen't work. anyone can help me? ...please?
-
Admin almost 12 yearsMake sure the path is
/etc/X11/xorg.conf
. The first slash is important. -
Admin almost 12 yearsyes off course, the path is correct. but is the xorg file that i wrote correct?
-
Admin almost 12 yearsYes, your xorg.conf format is correct. How did you create/edit your file?
-
Admin almost 12 yearsi type in the terminal: sudo gedit /etc/X11/xorg.conf
-
Admin almost 12 yearsI suppose there could be some complex reasons your setup isn't reading the conf file. The simplest would be perhaps you've inadvertently changed permissions. What do you get as output when you run:
ls -l /etc/X11/xorg.conf
? -
Admin almost 12 years-rw-r--r-- 1 root root 133 mag 19 17:49 /etc/X11/xorg.conf
-
Admin over 2 yearsmy log file is in ~/.local/share/xorg/Xorg.0.log
-
-
hleinone almost 12 yearsI have the above configuration and still when I return from suspend the TapButton3 is back at 0.
-
John S Gruber almost 12 years@hleinone What does the /var/log/Xorg.0.log file say? Can you see that it doesn't set it, or that it sets it and sets it back. If the latter, when does the reset happen and are there any helpful messages around the time it happens?
-
hleinone almost 12 yearsI don't see it being set on the log.
-
John S Gruber almost 12 yearsI'd suggest that you look at the first 50 lines of your /var/log/Xorg.0.log file to your question. Mine says:
Using config directory: "/etc/X11/xorg.conf.d"
. If you still also have a /etc/X11/xorg.conf file both the file and the directory presumably should be listed. If it says that and you are sure of all the other details you might try adding a different option and see if the log says that is set (determine if it doesn't like the option in the file or if it doesn't find like the file). -
hleinone almost 12 yearsMine says:
Using config directory: "/etc/X11/xorg.conf.d"
andUsing system config directory "/usr/share/X11/xorg.conf.d"
No mention about /etc/X11/xorg.conf since it doesn't exist. -
John S Gruber almost 12 years@hleinone, you can try to set another option and see if it shows it is set. You should also check to see that a synaptics touchpad was found. Mine says:
config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event8)
, followed byLoadModule: "synaptics"
, followed by:Loading /usr/lib/xorg/modules/input/synaptics_drv.so
. It must be a touchpad and must be handled by the Xorg synaptics driver in order to match the rule. -
hleinone almost 12 yearsOk, there's
config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event6)
then followed by those two lines you mentioned. And actually there's theOption "TapButton3" "1"
as well (I changed it to 1). But on boot it's back at 0. I removed all the other means of fixing this issue, so there's only the 71-synaptics.conf file. -
hleinone almost 12 yearsHow ever I set it up in the /etc/X11/xorg.conf.d/71-synaptics.conf it'll always be overridden by 0 on boot and doesn't seem to have any effect on suspend. As advised here the startup application trick works for startup, but doesn't help at all on returning from suspend.
-
hleinone almost 12 yearsI used the solution described in here to solve this. So unchecking the org.gnome.settings-daemon.plugins.mouse active box in dconf-editor.
-
Pierre.Vriens over 6 yearsSo what is the actual answer to the question?
-
Lei Zhao over 6 yearsYou can use
ClickFinger3
instead, which is quite close toTapButton3
.