Home Interests Linux

The Perfect (almost) Touchpad Settings on Linux

howchoo
howchoo   (467)
September 13, 2023
7 minutes

Share

Interests
Posted in these interests:
linux • 12 guides

Proceed with caution

Some users have reported that these settings have messed up their trackpads. We’ll leave this guide up to serve as a reference, but as a general rule, don’t go copy and pasting settings all willy-nilly. 🙂

The touchpad on my Macbook is my #1 concern about switching to linux full time. The option set for touchpad drivers on the Macbook are as follows: Synaptics, libinput, and mtrack. They all have their flaws. Usually it’s palm detection, ignoring the thumb resting on the touchpad, and not having enough settings to emulate the “feel” of the Macbook’s touchpad.

Mtrack + a ton of testing configuration has come the closest and addresses all of my concerns. The main problems it solved for me are the following:

  1. sufficient palm detection (libinput is great as well, synaptics not so much)
  2. sufficient thumb detection (since I always rest my thumb on the touchpad while tracking)
  3. ignoring the thumb during click (since I wish to perform a single click with my thumb while my pointer is still on the touchpad)
  4. having sufficient settings to customize the feel

Here’s how to replicate my setup.

1 – Install the driver

Mtrack is a touchpad driver written for the Xorg display server. If you are using something else, you are out of luck. If you don’t know if you’re using it, the odds are in your favor. To be 100% sure, run a:

ps -e | grep X

If you see “Xorg” in the list, you’re good to go.

To install, we’re going to use a forked repository of the mainline mtrack. It has some very vital features to emulate the macbook feel. Use the following commands:

cd /tmp
git clone https://github.com/p2rkw/xf86-input-mtrack.git
cd xf86-input-mtrack
./configure --with-xorg-module-dir=/usr/lib/xorg/modules
sudo make
sudo make install

I did not require any additional dependencies but you might. If you do, try running the following:

sudo apt build-dep xserver-xorg-input-mtrack

2 – Add a conf file for the mtrack driver

Write the following file using your favorite text editor: /usr/share/X11/xorg.conf.d/50-mtrack.conf

And the contents:

Section "InputClass"
        MatchIsTouchpad "on"
        Identifier      "Touchpads"
        Driver          "mtrack"
        Option          "Sensitivity" "0.60"
        Option          "FingerHigh" "5"
        Option          "FingerLow" "1"
        Option          "IgnoreThumb" "true"
        Option          "ThumbRatio" "70"
        Option          "ThumbSize" "25"
        Option          "IgnorePalm" "true"
        Option          "TapButton1" "0"
        Option          "TapButton2" "0"
        Option          "TapButton3" "0"
        Option          "TapButton4" "0"
        Option          "ClickFinger1" "3"
        Option          "ClickFinger2" "3"
        Option          "ClickFinger3" "3"
        Option          "ButtonMoveEmulate" "false"
        Option          "ButtonIntegrated" "true"
        Option          "ClickTime" "25"
        Option          "BottomEdge" "30"
        Option          "SwipeLeftButton" "8"
        Option          "SwipeRightButton" "9"
        Option          "SwipeUpButton" "0"
        Option          "SwipeDownButton" "0"
        Option          "SwipeDistance" "700"
        Option          "ScrollCoastDuration" "500"
        Option          "ScrollCoastEnableSpeed" ".3"
        Option          "ScrollUpButton" "5"
        Option          "ScrollDownButton" "4"
        Option          "ScrollLeftButton" "7"
        Option          "ScrollRightButton" "6"
        Option          "ScrollDistance" "350"
EndSection

3 – Restart X server

The command to do this varies based on your system but rebooting is a sure fire way to get it done.

4 – Fine tune the settings to your liking

You can read the details of the available settings at the driver’s Github page.

The ones you will probably want to adjust are:

Sensitivity – to adjust the pointer speed and ScrollDistance – to adjust the scroll speed with 2 finger scrolling

Everything else comes as close as possible to the macbook’s touchpad feel.

NEXT UP

How to Install SSHFS

howchoo
howchoo   (467)
September 29, 2023

This guide will show you how to install SSHFS on various operating systems. 1 – On macOS Using brew, install FUSE. Now install SSHFS: 2 – On Ubuntu/Debian 3 – On Windows Find the desired version of win-sshfs from this page and download it.

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo's writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Discover interesting things!

Explore Howchoo's most popular interests.

Explore