A common issue that presents itself to many GalliumOS users is the lack of palm detection as well as the inability to disable the touch pad for a fraction of a second while the user is typing. If you have had frustration dealing with the touchpad in GalliumOS, there is a way to fix this and have something very close to stock ChromeOS behavior.
This guide will assume that your hardware is equipped with an 'Elan' touchpad. Nearly all Chromebooks use this hardware.
Before you start
Verify your hardware is using an Elan touchpad. Open up a terminal, and issue the following command:
If your touchpad is Elan hardware, you will see it clearly.
If you do not see 'Elan Touchpad' as your hardware - proceed with caution. This fix has only been tested on Elan hardware.
We will be making changes to the input system. It's advised that before you begin this process, you have a backup of anything critical - just in case.
To start off, we are going to need to install libinput. Open up a terminal, and issue the following command:
sudo apt install xserver-xorg-input-libinput
This will install libinput on your system, and configure it with the default settings.
Your output will look something like this:
If you choose to reboot or restart your xorg session at this point before configuration, do so at your own risk - I recommend that you follow along with this guide and configure the input before rebooting.
This will set your touchpad to be what most users expect - a single 'tap' will be a 'left click', a 'tap with two fingers' will be a 'right click', and a 'tap with three fingers' will be a middle click.
We're going to open up a terminal, and issue the following command:
sudo nano /usr/share/X11/xorg.conf.d/90-libinput.conf
Your terminal will now be editing the configuration, and you will see something like this:
Notice the 'third' entry. This is the entry that contains the line:
You will add this line:
Option "Tapping" "true"
See above screencapture and double check everything.
Once you have added this line and double checked you have it in the right place: issue a control + x (hold down ctrl key and press x). You will be prompted to save the file, the 'y' key will save the file.
Test our changes
Now that we have installed libinput and enabled proper tapping - this is a great time to reboot. Issue the following command in your terminal (or use the power key or any other method you prefer to reboot your machine)
At this point, you may notice that the mouse cursor is 'faster' or 'slower' than you are used to; that's fine. We'll address this in the next section. For the moment, you should be able to move your cursor, issue a left click with a single tap, issue a right click with a two finger tap, and issue a middle click with a three finger tap.
To test this, open a web browser and search your favorite search engine for anything. In the results - a single tap should open a link, a double finger tap on the link should open the right click menu, and a triple finger tap on the link should open the link in a new tab.
Tweak mouse acceleration
At this point - your Elan touchpad should be ignoring movements/clicks/taps for a moment while you are typing. However, your mouse cursor may be too 'slow' or too 'fast' for your personal preferences. Thankfully, this is very easy to fix.
First up - we'll need to verify the device ID# of your touchpad. Open a terminal, and issue the following command:
This will return the device ID of your touchpad. As you can see in my example - the ID number is 10. Your ID number may not be the same, so take your time here and make sure you have the correct device ID.
Now, we can go ahead and begin to tweak the acceleration.
xinput --set-prop 10 'libinput Accel Speed' 0.2
You will need to replace ## with the device ID of the 'Elan Touchpad' as determined by the above instructions. In my case, the device ID is '10' - however this very well may not the case on your system.
These changes will take effect right away, so go ahead and play with the mouse and determine if it is 'too fast' or 'too slow' for your personal preference. If it's too fast, try again with a speed of 0.15, if it's too slow, try again with a setting of 0.25. Continue to change the acceleration until you have a mouse speed that 'feels right' to you.
Once you are happy with the acceleration level, we're going to want to have this setting apply on every reboot. Open up a terminal, and issue the following command:
Press control+v a few times to page forward, until you are at the end of the file. On a new line, simply add the following:
xinput --set-prop foo 'libinput Accel Speed' bar
Where foo is the device ID determined earlier, and bar is the acceleration setting that worked well for you. For my personal settings, it looks something like this:
xinput --set-prop 10 'libinput Accel Speed' 0.125
Once you have added the proper line to your .bashrc file, hold down the ctrl key, press the 'x' key, and answer 'y' to save the file. At this point, you can reboot and your custom mouse speed should take effect after login!
Now that we have made these changes, please note that the default XFCE GUI mouse settings in your control panel will no longer function. Any changes you need to make need to made in the above mentioned configuration files.
Help! I hate this and and want to revert to stock behavior!
Easy as pie. Open up a terminal and simple issue this command:
sudo apt purge xserver-xorg-input-libinput
And then reboot. All of your settings are back to stock GalliumOS behavior.