5

I'm struggling to make my custom touchpad persistent.

I very well know the config I want. Here's the command, using synclient:

synclient RightButtonAreaLeft=0 RightButtonAreaTop=0 ClickTime=20 AccelFactor=0.3 MaxSpeed=2.5 PalmDetect=1 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 VertEdgeScroll=0 HorizEdgeScroll=0

As explained here and there I created /etc/X11/xorg.conf.d/50-synaptics.conf instead of editing /usr/share/X11/xorg.conf.d/50-synaptics.conf with the following content:

Section "InputClass"
  Identifier "touchpad catchall"
  Driver "synaptics"
  MatchIsTouchpad "on"
  MatchDevicePath "/dev/input/event*"
  Option "RightButtonAreaLeft" "0"
  Option "RightButtonAreaTop" "0"
  Option "ClickTime" "20"
  Option "AccelFactor" "0.3"
  Option "MaxSpeed" "2.5"
  Option "PalmDetect" "1"
  Option "VertTwoFingerScroll" "1"
  Option "HorizTwoFingerScroll" "1"
  Option "VertEdgeScroll" "0"
  Option "HorizEdgeScroll" "0"
EndSection

Surprisingly, it does change something, as my mouse goes faster, but doesn't apply all options, as HorizTwoFingerScroll isn't available.

Since /usr/share/X11/xorg.conf.d/50-synaptics.conf is still there, I'm wondering if it isn't interfering. Here's what's in there:

# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
#       MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

Why are there several ones? How can I disable them (considering I'm not allowed to edit the file)? Did I miss something?

  • 2
    You've probably figured out a workaround, but for less-experienced users, here's a fix: Make a script that runs synclient with the options you want (e.g. to make three-finger tap do a middle click, synclient TapButton3=2 ClickFinger3=2), and put the script in Startup Applications. It will run on login. – wjandrea Mar 29 '16 at 21:21
  • I actually haven't. Your solution can work, but I'd like to script it. Basically, I'm running a script that does all my customization on my OS when installed. You have a command-line solution I'd prefer. – Augustin Riedinger Mar 30 '16 at 08:04
  • Workarounds aside (note: you can put the commands you want in the Startup Applications command line separated by &&): is there some known reason that horiztwofingerscroll and lockeddrags cannot be set via the user-created settings file: sudo gedit /usr/share/X11/xorg.conf.d/60-synaptics-options.conf? NOTE: This seems to be a recurrent issue popping up around the web, but I have not seen any actual solution. – Rsync Mar 26 '17 at 17:44

2 Answers2

2

I tried all from above, /etc/X11/xorg.conf.d/60-synaptics.conf, just /etc/X11/xorg.conf, startup-command in either xfce or mate and even startup-script with 10 seconds delay and then execute synclient-commands in a loop or without a loop. Nothing worked. Only thing I couldn't try was to set it via gsettings because I didn't find any touchpad settings there.

Working Solution for me was: Just adding the synclient command at the end of ~/.bashrc So in your case, just add:

synclient RightButtonAreaLeft=0 RightButtonAreaTop=0 ClickTime=20 AccelFactor=0.3 MaxSpeed=2.5 PalmDetect=1 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 VertEdgeScroll=0 HorizEdgeScroll=0

Probably, adding it to ~/.xinit will do the same :) (adding it to .bashrc won't make an effect before you either re-login or execute source ~/.bashrc)

I know, bashrc is not the place where synclient settings should be stored, but after spending hours on this issue it is the only working solution for me and I'm not having any side effects.

Tejas Lotlikar
  • 2,945
  • 5
  • 17
  • 26
0

update: I found this'll make "Mouse & Touchpad" UI in System Settings stop functioning. You'll have to resort to config file edits later on.

For me on ubuntu 16.04, I finally found that GNOME by conf is overwriting the settings, so I did:

# enable natural scroll in GNOME config,
# it may alter the sign of *ScrollDelta option values defined in /usr/share/X11/xorg.conf.d/*
/usr/bin/gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true
/usr/bin/gsettings set org.gnome.desktop.peripherals.mouse natural-scroll true

# prevent GNOME from overwriting configured options defined in /usr/share/X11/xorg.conf.d/* at all
/usr/bin/gsettings set org.gnome.settings-daemon.plugins.mouse active false

then things work fine.

fyi I have to use /usr/bin/gsettings coz Anaconda python shipped with a non-functioning gsettings command, while I happens need to prepand anaconda bin to my PATH.