Radu Cotescu's professional blog

g33k w17h pa45510n

How to Fix Cursor Jumping in Ubuntu

Since I installed Ubuntu on my laptop (an Asus X55sv with Intel Core 2 Duo T7500) a few months ago, I still faced one bug I was ashamed to write about because I wasn’t sure if it was a bug or just my fingers made the strange thing happen from time to time. I am talking about the cursor jumping all around when I was typing in everything else but the terminal or programs that run in it (vim and nano).

I was having difficulties when writing posts on my blog, when writing different things in OpenOffice.org Word Processor, when writing text in text fields on sites etc. It was a really annoying thing that even made me think my touchpad was broken. But I was sure that it didn’t happen back in the Windows days. So I started looking for a solution because I said to myself that this can clearly be fixed one way or another because Linux has this power of finding solutions to common bugs really fast.

I have found three solutions to this:

  1. one:

     sudo nano /etc/X11/xorg.conf

    and then adding Option "HWCursor" "false" to the Device section;

  2. two:

     sudo nano /etc/X11/xorg.conf

    and then find this section

     Section "InputDevice"
             Identifier      "Synaptics Touchpad"

    and add Option "SHMConfig" "on", after which you save the file and then add

     syndaemon -i 3 -d -t -k

    to your startup programs (System -> Preferences -> Sessions -> Startup Programs) where the usage for syndaemon is:

     Usage: syndaemon [-i idle-time] [-m poll-delay] [-d] [-t] [-k]
       -i How many seconds to wait after the last key press before
          enabling the touchpad. (default is 2.0s)
       -m How many milli-seconds to wait until next poll.
          (default is 200ms)
       -d Start as a daemon, ie in the background.
       -p Create a pid file with the specified name.
       -t Only disable tapping and scrolling, not mouse movements.
       -k Ignore modifier keys when monitoring keyboard activity.
       -K Like -k but also ignore Modifier+Key combos.
       -S Use SHMConfig even if input device properties are available.
  3. three:

     sudo apt-get install touchfreeze

    where touchfreeze is a program that automatically disables your touchpad while you type and then enables it after a delay that you set. Of course you have to add it to the Startup Programs like above.

Out of all these, I chose the third one, as it is the only one that doesn’t mess with xorg.conf which could potentially make your X not start the way it should. Everything is working great now and I haven’t experienced any jump-around from my cursor. All this was needed because hardware producers refuse to support Linux and most of the drivers found in it are community based. But fortunately all these minor glitches can be fixed.

Does it work for you too or you haven’t experienced this bug? Please tell me in the comments and specifiy the make and model of your laptop.

How To, Linux, Ubuntu

« Right click not working in Firefox 3.5 I am on Twitter too »