Free Software

Software Engineering with FOSS and Linux

Fully disabling touchpad in Ubuntu 9.10 Karmic Koala

Ubuntu 9.04 used to allow you to fully disable the touchpad through the System -> Preferences -> Mouse -> Touchpad menu. In 9.10 this has been replaced with a ‘Disable touchpad while typing’ option, which I find inadequate in several cases. Here’s a way to fully disable your touchpad in 9.10:

  • First, find the HAL configuration file for your touchpad. Mine lies in /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi, but according to some posts it might be found in /usr/share/fdi/policy/10osvendor/11-x11-synaptics.fdi
  • Either delete the HAL configuration file, or rename it to something else (without the .fdi extension). This way hald (the HAL daemon) will not reset the touchpad driver when we will disable it.
  • In a console, run xinput list to find the name of your touchpad device under X. For example, I get:

$ xinput list |grep -i touchpad

“AlpsPS/2 ALPS DualPoint TouchPad”    id=8    [XExtensionPointer]

  • To disable the  touchpad, run:

xinput set-int-prop “AlpsPS/2 ALPS DualPoint TouchPad” “Device Enabled” 8 0

Of course you should replace “AlpsPS/2 ALPS DualPoint TouchPad” with your own device name, as shown by xinput list.

To automatically disable your touchpad each time you log into X, you should add a startup script. In Gnome, use System -> Preferences -> Startup Applications, click on ‘Add’,  use a name like ‘Disable Touchpad’ and type in the xinput set-int-prop line in the Command field.

To facilitate touchpad handling (i.e. to enable/disable it at will, for example when you plug in/out a mouse), you could create the following script:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          touchpad
# Required-Start:    $remote_fs $syslog $all
# Required-Stop:
# Default-Start:
# Default-Stop:    2
# Short-Description: Disables the touchpad
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin
TOUCHPAD=”AlpsPS/2 ALPS DualPoint TouchPad”

. /lib/init/vars.sh
. /lib/lsb/init-functions

case “$1” in
start)
xinput set-int-prop “$TOUCHPAD” “Device Enabled” 8 1
;;
restart|reload|force-reload)
rmmod psmouse && modprobe psmouse
;;
stop)
xinput set-int-prop “$TOUCHPAD” “Device Enabled” 8 0
;;
*)
echo “Usage: $0 start|stop” >&2
exit 3
;;
esac

Of course you should use your own device in the TOUCHPAD=… line. Save it in /etc/init.d/touchpad, and set it to off by default:

sudo update-rc.d touchpad stop 99 2 .

Note: The rmmode psmouse && modprobe psmouse commands in the restart option will reset your touchpad (and, incidentally, your mouse) if your driver fails due to a bug described here.

January 4, 2010 - Posted by | linux |

26 Comments »

  1. How about disabling the touchpad while typing without a mouse plugged in & disabling it completely when the mouse is plugged in? Are those simple to do?

    Comment by LCC | January 6, 2010 | Reply

    • Updated the post with a way to set the touchpad manually.

      Comment by xpapad | January 7, 2010 | Reply

      • Thanks for the info. I’ve been searching for an easy way to do this very thing.

        Comment by LCC | January 7, 2010

  2. […] Ubuntu 9.04 used to allow you to fully disable the touchpad through the System -> Preferences -> Mouse -> Touchpad menu. In 9.10 this has been replaced with a ‘Disable touchpad while typing’ option, which I find inadequate in several cases. More here […]

    Pingback by Ubuntu-News – Your one stop for news about Ubuntu » Blog Archive » Fully disabling touchpad in Ubuntu 9.10 Karmic Koala | January 11, 2010 | Reply

  3. Thanks a lot for your direction.

    Comment by paran | February 26, 2010 | Reply

  4. Apparently this only works temporarily. If you switch to the console and back again or between to xservers this is being reset. Is there way around this?

    Comment by Reinaert | March 1, 2010 | Reply

  5. So far so good….thank you.

    FYI
    Macbook Pro(4,1)
    Ubuntu 9.1

    the command $ xinput list |grep -i touchpad just reports “Type is TOUCHPAD” …you actually have to go through the list and find it(which is slightly confusing for a newbie)

    Here is what it is on my macbook pro(4,1)
    “bcm5974” id=9 [XExtensionPointer]
    Type is TOUCHPAD
    Num_buttons is 12
    Num_axes is 2
    Mode is Relative
    Motion_buffer is 256
    Axis 0 :
    Min_value is 0
    Max_value is 1280
    Resolution is 1
    Axis 1 :
    Min_value is 0
    Max_value is 800
    Resolution is 1

    Comment by Manzier | March 10, 2010 | Reply

  6. I like the idea of “disable touchpad while typing”. But I want the delay set for longer, so that the touchpad isn’t available for three seconds or so. Do you know how to achieve that?

    Please respond by email. jackdesert556@gmail.com

    Comment by Jack | March 28, 2010 | Reply

  7. I did as you said but got error message says:”unable to find device “SynPS/2″. When I typed a command “xinput list |grep -i touchpad” I got “‘SynPS/2 Synaptics TouchPad’ id=2 [XExtensionPointer] Type is TOUCHPAD”. So I typed “xinput set-int-prop “SynPS/2 Synaptics TouchPad” “Device Enabled” 8 0”. I actually tried with ‘2’ instead of ‘8’, which I thought that might be an Id number. Can you help? Becouse this touchpad is really bugging me out. Tnx

    Comment by bilguun | April 11, 2010 | Reply

  8. I actually worked it out. But now I would like to restore my “11-x11-synaptics.fdi”. Any suggestions?

    Comment by bilguun | April 12, 2010 | Reply

  9. […] I gave up… and decided to give Linux Mint 8 a try. Installation was easy and wireless seems to be working with no problems. But the mouse drift problem is still there. After more searching I finally found this… Fully disabling touchpad in Ubuntu 9.10 Karmic Koala […]

    Pingback by tcollins.net » Blog Archive » Disabling Dell Latitude D600 mouse pointer stick on Linux Mint 8 (Ubuntu 9.10) | May 6, 2010 | Reply

  10. For Ubuntu 10.04 (Lucid Lynx) this works for me:
    I put the following in ~/.bashrc:

    alias tpoff=’xinput –set-prop 13 “Device Enabled” 0′
    alias tpon=’xinput –set-prop 13 “Device Enabled” 1′

    then I can type:
    $ tpoff
    or
    $ tpon
    to turn the touchpad on my laptop on and off. The ’13’
    is the device id number of the touchpad and was found
    using:

    $ xinput –list | grep -i touchpad

    as suggested in the original post by Xenofon.

    Comment by Gregben | June 29, 2010 | Reply

    • Thanks it works Great!!

      Comment by dwk | February 1, 2011 | Reply

    • Thanks Gregben it is great idea to put the commands as an alias.

      Comment by Selim Ozkan | May 15, 2011 | Reply

  11. bad luck that in your example the id is 8, the same as the number for the format which is required to set the property…

    Comment by Guru | August 5, 2010 | Reply

  12. Great! This worked like a charm for me, using Ubuntu Lucid. Thank you!

    Comment by Brittany Dunlap | August 10, 2010 | Reply

  13. Actually the script did not work to disable it at boot/login. So I’ll try to figure out how to fix that. But the simple code worked to disable it during the login session :) Thanks.

    Comment by Brittany Dunlap | August 11, 2010 | Reply

  14. Nevermind. I didn’t add it to startup lol Forget my last comment.

    Comment by Brittany Dunlap | August 11, 2010 | Reply

  15. a while ago… i ve had installed touchpad driver on Ubuntu / Macbook … and it was flawesly smooth ! as in .mac OS .. now I am trying to find it, but no clue where it was….any hint ? ..thanks

    Comment by manolo | September 10, 2010 | Reply

  16. This is much easier than just having a simple checkbox like in the old days, and having too many options confuses my poor little brain. It’s much easier to spend hours searching the internet for stuff to type into a command line.

    Thanks GNOME guys!

    Comment by Name (required) WHY??? | October 10, 2010 | Reply

  17. Thanks from Spain!!

    Comment by fjpereza | November 5, 2010 | Reply

  18. Gregben, you are my personal hero. My HP laptop has a crazy sensitive touchpad, and even if I set the “disable while typing” option my pointer flies all over the place. Thank you, thank you, thank you for that handy script that lets me easily decide whether I’m going to plug in a mouse or not.

    Comment by Mark Tabler | January 18, 2011 | Reply

  19. in Ubuntu 10.10 I change the /apps/gnome_settings_daemon/keybindings/touchpad (using the configuration editor) from XF86TouchpadToggle to t and use that shortcut whenever I want to disable the touchpad.

    Comment by Chris | February 23, 2011 | Reply

  20. in Ubuntu 10.10 I change the /apps/gnome_settings_daemon/keybindings/touchpad (using the configuration editor) from XF86TouchpadToggle to <Control><Alt>t and use that shortcut whenever I want to disable the touchpad.

    Comment by Chris | February 23, 2011 | Reply

  21. […] Xenofon Papadopoulos for your post on disabling the touchpad in linux, I’ve used it more than once after a […]

    Pingback by notes » Blog Archive » Disable ALPS DualPoint Touchpad | March 18, 2011 | Reply

  22. It is really a nice and helpful piece of info. I am glad that you just shared this helpful
    info with us. Please keep us up to date like this.
    Thanks for sharing.

    Comment by www.youtube.com | June 4, 2014 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: