Friday, 18 May 2012

Restore u300s touchpad on resume in Ubuntu

I have finally found the time to fix the touchpad on my u300s. It was causing problems on resume from hibernate (as per notes from before). After a bit of poking around I've found a work-around.

I have synaptics which applies its changes on boot, however I have a problem with resume. Solution is this script:

# Restore three finger tapping

case "${1}" in
        # faster speed and acceleration
        DISPLAY=:0.0 su  -c "/usr/bin/synclient MinSpeed=1 MaxSpeed=2.81 AccelFactor=0.13"
        # 2 fingers scroll
        DISPLAY=:0.0 su  -c "/usr/bin/synclient VertTwoFingerScroll=1 HorizTwoFingerScroll=1"
        # enable tap to click (2 fingers for middle click, 3 fingers for right click)
        DISPLAY=:0.0 su -c "/usr/bin/synclient TapButton1=1 TapButton2=2 TapButton3=3"
Put in /etc/pm/sleep.d/ called something like 80_touchpad_restore and remember to make it executable. Done - mouse settings will be set as per this script on resume from hibernate.

Solution was cobbled together from here, here and here.

No comments: