Disabling the Laptop TouchPad in Ubuntu Linux

March 27th, 2008 by rvdavid Leave a reply »

Here’s a quick tip on disabling the touchpad on the Ubuntu Linux distro. It’s been bugging me for a while now that I have to use a non-gnome native solution to disabling my touchpad qsynaptics written in QT.

For those who are impatient and just want the quick instructions, I recommend that you install synclient, and issue a synclient TouchpadOff=1 usually SHMConfig is already on and this would be enough – in addition, synclient is usually installed by default (it is in Ubuntu Gutsy Gibbon).

Also, syndaemon can be activated pretty much by issuing a syndaemon -d. This disables the touchpad automatically for you when you start using the keyboard.

If you’ve tried to do this and it does not work, I guess you’ll just have to read below.

Method 1: Using qsynaptics. (What I used to do)

qsynaptics as I mentioned above, is a QT application. It was written to configure the synaptic touch pad. If you are comfortable with this, then you can follow the steps below.

Step 1: install it through the repository:

$ sudo aptitude install qsynaptics

Step 2: Once you’ve installed it, you need to run the qsynaptics program through the terminal:

$ qsynaptics

This should load up the GUI for qsynaptics. There’s a fieldset that says “switch synaptics touch pad” with two radio buttons below it on | off.

Step 3: Select “off”

Loading the qsynaptics settings on startup

This config option gets saved, but you’ll have to add it as a startup program in Sessions settings.

So what you need to do is the following:

Step 4: Go to System >> Preferences >> Sessions. This should bring up the Session configuration screen.

Step 5: Click the “Add” button. This should bring up the “New Startup Program” form. Fill the fields in accordingly:
Name: Restore qsynaptics settings
Command: qsynaptics -r
Comment: Restore last qsynaptics settings

Method 2: Using synclient

synclient is a program that allows you to set the toucpad parameters on the fly.

For this to happen however, you will first need to edit your xorg.conf file. It won’t be major, but you should back up anyway (ALWAYS do a back up) :)

Enabling the SHMConfig setting

Step 1: Back up your xorg.conf file

$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf-backup

Step 2: Open up your systen’s xorg.conf file.

$ sudo vim /etc/X11/xorg.conf

Step 3: Find the input device section which has “Synaptics Touchpad” as the identifier.
Step 4: In this part of the confguraiton file, there should be an “Option” called “SHMConfig” followed by either “on” or “off” -> This setting needs to be set to “on”.

Step 5: Edit the file if necessary, save and exit from the editor. If you had to turn the setting on, you will need to restart your computer. If it was already on, then skip restarting.

And that’s it. You should be able to use synclient!

Review your options with synclient -l

Doing a synclient -l will display your current user settings.

rvdavid@notebook:~$ synclient -l
Parameter settings:
LeftEdge             = 1872
RightEdge            = 5072
TopEdge              = 1712
BottomEdge           = 4144
FingerLow            = 25
FingerHigh           = 30
MaxTapTime           = 180
MaxTapMove           = 220
MaxDoubleTapTime     = 180
SingleTapTimeout     = 180
ClickTime            = 100
FastTaps             = 0
EmulateMidButtonTime = 75
VertScrollDelta      = 60
HorizScrollDelta     = 80
VertEdgeScroll       = 1
HorizEdgeScroll      = 0
VertTwoFingerScroll  = 0
HorizTwoFingerScroll = 0
MinSpeed             = 0.0822368
MaxSpeed             = 0.197368
AccelFactor          = 0.00164474
EdgeMotionMinZ       = 30
EdgeMotionMaxZ       = 160
EdgeMotionMinSpeed   = 1
EdgeMotionMaxSpeed   = 304
EdgeMotionUseAlways  = 0
UpDownScrolling      = 1
LeftRightScrolling   = 1
UpDownRepeat         = 1
LeftRightRepeat      = 1
ScrollButtonRepeat   = 100
TouchpadOff          = 1
GuestMouseOff        = 0
LockedDrags          = 0
RTCornerButton       = 2
RBCornerButton       = 3
LTCornerButton       = 0
LBCornerButton       = 0
TapButton1           = 1
TapButton2           = 2
TapButton3           = 3
CircularScrolling    = 0
CircScrollDelta      = 0.1
CircScrollTrigger    = 0
CircularPad          = 0
PalmDetect           = 1
PalmMinWidth         = 10
PalmMinZ             = 200
CoastingSpeed        = 0
PressureMotionMinZ   = 30
PressureMotionMaxZ   = 160
PressureMotionMinFactor = 1
PressureMotionMaxFactor = 1

To turn off the touchpad, you will need to modify the “TouchpadOff” setting and change it to zero “0″ instead of one “1″.

synclient lets you do this on the fly! Simply issue a synclient TouchpadOff=1 command and presto! Your touchpad is off.

As with method 1, you can add this to

Go to System >> Preferences >> Sessions. This should bring up the Session configuration screen.

Click the “Add” button. This should bring up the “New Startup Program” form. Fill the fields in accordingly:
Name: Disable touchpad
Command: synclient TouchpadOff=1
Comment: Disable TouchPad

You could also assign the command “synclient TouchpadOff=1″ to a shortcut key to turn the touch pad off and “synclient TouchpadOff=0″ to another shortcut key to turn the touch pad on.

Method 3: Using syndaemon

This method is probably the most elegant. When running in daemon mode, it disables the touchpad when you are using the keyboard and enables the touchpad when you stop typing.

Before doing this however you will need to verify that your the SHMConfig setting is “on” and make sure that the toucpad is on. So if you have previously issued a synclient TouchpadOff=1 command, you will need to enable your touchpad again by issuing a synclient TouchpadOff=0. The following steps will enable syndaemon.

Step 1: If not already, Install syndaemon

$ sudo aptitude install syndaemon

Step 2: Run syndaemon in daemon mode

$ syndaemon -d

Step 3: As with the previous two methods, you can enable this at startup by adding the command that starts syndaemon as a new startup program.

Go to System >> Preferences >> Sessions. This should bring up the Session configuration screen.

Click the “Add” button. This should bring up the “New Startup Program” form. Fill the fields in accordingly:
Name: run syndaemon daemon
Command: syndaemon -d
Comment: syndaemon daemon

if you enjoyed this post, make sure you subscribe to my RSS feed!
You can also follow me on Twitter here.

Related posts:

  1. Setting up Ubuntu on my new 19 inch LG S900-U.CPS1A Notebook/Work Rig!


  1. DK says:

    # create a desktop launcher to run this (better still, a toolbar icon so that single click does it)…
    /usr/bin/synclient TouchpadOff=$(if [[ $(expr `synclient -l | grep TouchpadOff | cut -f2 -d =`) == 0 ]]; then echo 1; else echo 0; fi)

  2. Walter says:

    I was hoping to find the solution I needed here. I tried everything you specified and more in the past month.
    Nothing seems to work in Kubuntu. Do you have something for Kubuntu? The qsynaptics screen that appears has no active buttons to click except for the ‘Cancel’ button and a message saying that the ‘synaptics driver driver must be loaded and to set SHMConfig to “on” in Xfree86Config. Kubuntu does not have Xfree86Config. Instead the “SHMConfig” “on” code goes into xorg.conf and I have had it there for a month now. My laptop touchpad is a Logitech NOT a Synaptics but the xorg.conf file does not even mention it.
    Also there is no System >> Preferences >> Sessions selection in Kubuntu. Do you have help for Kubuntu?
    Thank you for your time,

  3. rvdavid says:

    Hi Walter,

    qsynaptics is basically telling you that it can’t change your settings until you have set SHMConfig to “on” in your xorg.conf file.

    in your /etc/X11/xorg.conf file, do you have anything that resembles the following?

    Section “InputDevice”
    Identifier “Synaptics Touchpad”
    Driver “synaptics”
    Option “SendCoreEvents” “true”
    Option “Device” “/dev/psaux”
    Option “Protocol” “auto-dev”
    Option “HorizEdgeScroll” “0″
    Option “SHMConfig” “on”

    If not, then try doing a backup of your xorg.conf file by doing the following:
    $sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

    Then try appending the parameters above to your xorg.conf file. Save the file and restart X

    If adding the parameters, causes you problems or locks your X session, you can restore the revert the xorg.conf file to it’s previous state by doing the following:
    $sudo mv /etc/X11/xorg.conf.backup /etc/X11/xorg.conf

    Good luck with it, let us know how you go!



  4. Walter says:

    Thank you for your suggestions rvdavid. I have actually tried everything you and many more things in the past month. Nothing seems to work. I have also been on many forum sites and found out that even the “gurus” have no real idea of what is going on. Some of them have admitted to the very same problem. In one place I picked up a subtle hint from a developer that this is not a priority item and there is some sort of security issue involved in memory access concerning synclient etc… I just downloaded a recent version of Kubuntu 8.04 LTS (Hardy Heron) and perhaps this version has all access to these memory areas block because when I enter the code synclient TouchPadOff=1 I receive an error message saying “Can’t access shared memory area. SHMConfig disabled?” – and I do have the code “SHMConfig” “on” in the xorg.conf file, so the error message does not match the facts!!!!
    This touchpad has been causing all sorts of confusion during typing this message @#E$*&^%!!!
    Thank you again for the offered help,

  5. Walter says:

    *** SOLUTION FOUND ***
    A very simple solution has been found: sudo rmmod psmouse (to disable touchpad) and sudo modprobe psmouse (to enable mouse again).
    SEE this link for the very simple solution:

  6. Walter says:

    Another Approach using a single shortcut key to turn TouchPad Off/ON in Kubuntu.
    See last post in following link:
    St. Thomas, Ontario = 42.77?N, 81.11?W =
    RASC: Royal Astronomical Society of Canada

  7. rvdavid says:

    Thank you for providing additional resources for Kubuntu users Walter. Glad you managed to get it all going! :)

  8. PO says:

    Hi there,

    To provide information for other users, I should say;
    I am using Ubuntu 8.10 on an old Asus Laptop W1N.
    Last method that you have supplied works flawlessly and without any problem.

    Thanks a lot,

  9. anon says:

    apt-get install gsynaptics

  10. Jason says:

    Fantastic tip thanks so much this was driving me crazy!


  11. Danilo says:

    Another possibility to disable the touchpad is xinput:

    xinput set-int-prop “SynPS/2 Synaptics TouchPad” “Device Enabled” 8 0

    You can find your device name with xinput list.

    Xinput also allows you to configure many of the touchpad properties. See the manpage for more details.

  12. Jalal says:

    you don’t need to do all of that, simply go to Application > Ubuntu software center, then search for pointing devices and disable or enable it easily by GUI.

    • rvdavid says:

      At the time of this writing gpointing-device-settings was not available to ubuntu.

      Might try it though, thanks for mentioning it.

      $ sudo aptitude install gpointing-device-settings

  13. Brittany says:

    None of these apps are available in the 10.10 repo’s.

  14. georges says:

    On 11.04, you don’ t need to install any software, just run this in a terminal:
    synclient TouchPadOff=1

    my laptop has a trackpoint that works perfectly, so It’s great to disable the touchpad!!!
    And the buttons on top of the touchpad still work, so it’s just perfect for me!

  15. René Gruneisen says:

    With Linux Mint 11.0 on a Toshiba C660/C660B try FN+F9 to make the touchpad work/stop.

  16. Kramulous says:

    [user@host Scripts]$ cat TouchpadToggle.sh
    # this turns off or on the touchpad
    # This script is bound to the Control F9 key by
    # Applications -> System Tools -> System Settings -> Keyboard
    # -> Shortcuts tab -> Custom Shortcuts.
    # Add a new one and set the command to the full path of this script.
    # Define your keyboard shortcut

    if [ -f ~/.touchpadOn ]; then
    synclient TouchPadOff=1
    touch ~/.touchpadOff
    rm ~/.touchpadOn
    synclient TouchPadOff=0
    touch ~/.touchpadOn
    rm ~/.touchpadOff

  17. Victor says:

    Please correct the second paragraph:
    > issue a synclient TouchPadOff=1
    should be replaced with
    > issue a synclient TouchpadOff=1
    (at least on my system it is case sensitive)

  18. Fahad says:


    STATUS=$(synclient | grep TouchpadOff | awk ‘{print $3}’);

    if [ $STATUS -eq 0 ]
    synclient TouchpadOff=1

    synclient TouchpadOff=0

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.