Trackpad (touchpad) too sensitive on Ubuntu?

I resurrected a Dell Latitude e6420 a couple of weeks ago after it was kindly donated to me. It just needed some RAM and a Hard Drive and an operating system. I might get around to writing that process up at some point but for the sake of brevity, I’ll cut to the chase.

After installing Ubuntu 16.04 LTS on it and spending a fair while messing around with it, the final thing I wanted to do was sort out the trackpad/touchpad. It seemed to be far too sensitive (as opposed to ‘fast’), I would be accidentally selecting text on web pages, unintentionally dragging files around and all of that. In fact, it was so sensitive that I could move the cursor around by hovering my finger a few millimetres over it. There’s nothing in the standard Ubuntu GUI to adjust this sensitivity, but there is a command that you can plug into a terminal that sorts it out:

synclient FingerHigh=100

I have mine set to 100, but you can easily run the command again with a different integer value if it doesn’t work for you. The bigger the number, the less sensitive and vice-versa.

There are a lot of parameters you can tweak with synclient – no doubt I’ll be trying some of those out in the future, but for now that fixed most of the issues I’ve been having. Here’s the man page for synclient in case you want to have a go.

Once you’re happy with the way your touchpad is behaving, you’ll need to create a script to make the settings ‘stick’ on reboot. Now, you could follow my steps and export your synclient settings or you could actually copy mine and tweak from there. If you’re a glutton for punishment, in terminal type:

synclient -l > touchsettings

This will dump all the settings to a new file called ‘touchsettings’ – you’ll need to make a load of edits:

nano touchsettings

Then you need to make the format like this (just copy mine!):

synclient LeftEdge=300
synclient RightEdge=1700
synclient TopEdge=210
synclient BottomEdge=1190
synclient FingerLow=12
synclient FingerHigh=100
synclient MaxTapTime=180
synclient MaxTapMove=107
synclient MaxDoubleTapTime=100
synclient SingleTapTimeout=180
synclient ClickTime=100
synclient EmulateMidButtonTime=75
synclient EmulateTwoFingerMinZ=141
synclient EmulateTwoFingerMinW=7
synclient VertScrollDelta=48
synclient HorizScrollDelta=48
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
synclient CornerCoasting=0
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient MinSpeed=1
synclient MaxSpeed=1.75
synclient AccelFactor=0.0819336
synclient TouchpadOff=2
synclient LockedDrags=0
synclient LockedDragTimeout=5000
synclient RTCornerButton=2
synclient RBCornerButton=3
synclient LTCornerButton=0
synclient LBCornerButton=0
synclient TapButton1=1
synclient TapButton2=3
synclient TapButton3=0
synclient ClickFinger1=1
synclient ClickFinger2=1
synclient ClickFinger3=0
synclient CircularScrolling=0
synclient CircScrollDelta=0.1
synclient CircScrollTrigger=0
synclient CircularPad=0
synclient PalmDetect=0
synclient PalmMinWidth=10
synclient PalmMinZ=100
synclient CoastingSpeed=20
synclient CoastingFriction=50
synclient PressureMotionMinZ=15
synclient PressureMotionMaxZ=80
synclient PressureMotionMinFactor=1
synclient PressureMotionMaxFactor=1
synclient ResolutionDetect=1
synclient GrabEventDevice=0
synclient TapAndDragGesture=1
synclient AreaLeftEdge=0
synclient AreaRightEdge=0
synclient AreaTopEdge=0
synclient AreaBottomEdge=0
synclient HorizHysteresis=12
synclient VertHysteresis=12
synclient ClickPad=0

Press ctrl-O to save the file. Then you’ll need to make it ‘executable’ with this command:

sudo chmod +x touchsettings

Now you’ll need to add it to your ‘Startup Applications’ – this is probably possible via terminal but I did it with the ‘Search your computer’ button in Unity like so:

Open ‘Startup Applications’ and then ‘Add new’:

And that *should* do it…

Increase disk space on debian VM filesystem with command line

If, like me, you’re a bit of a linux n00b and you’ve made the mistake of setting up a development VM-based linux server (in my case Debian) that ended up being a production server but you failed to provision enough disk space (it was only a dev server am I right?!) then you’ll probably have tried increasing the disk space in vSphere or similar and wondered how to make the OS see that extra disk space…

What you need to do is rebuild the partitions and then get the filesystem to fill the space, particularly the rootfs, which is probably where you are see 90%+ when you run:

$ df -h

First thing you need to do is have a read of this excellent guide: Live resizing of an ext4 filesytem on linux

Pay particular attention to the disclaimer about data loss. You MUST create a backup in case you mess this up.

This is actually magic. After adding additional disk via your VM management tool, you’re going to log in to your linux system and using fdisk you’ll delete active partitions, all of them. While you are logged on! Then you’re going to create new partitions and then get use resize2fs to get the OS to recognise the new space.

A colleague and I practiced this on a clone, and this morning I came in early and we did it on the production server.

The only slightly complicated bits were picking the right number of sectors to give to sda1 (we went with 60000000) leaving enough room for sda2 (Extended) and sda5 (Linux swap / Solaris).

The other bit we stumbled on while trying to follow the codesilence recipe was that the code section for resize2fs at the bottom of the post didn’t show the command to edit fstab, and we tried to do that last… that didn’t work 🙂 We reread it and realised the correct order is stated in this bit:

run mkswap, adjust /etc/fstab to the new UUID and turn the swap on

After you run mkswap, it will give you a UUID that you need to copy (or screenshot) which you then enter into /etc/fstab using your preferred editor (that’s nano for me, but you may prefer vim or vi… you sick puppy) THEN you do the swapon bit…

Enjoy your new space!