How to fix cursor jumping in Ubuntu

Posted on July 5th, 2009 at 12:59, in How To, Linux, 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. sudo nano /etc/X11/xorg.conf

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

  2. 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. 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.

Similar Posts:


4 Comments

Anonymus Gravatar

Brian said

on July 31st, 2009,

at 19:02 hours

This works… kind of. Chose the 3rd option, too. Still very sensitive, but thank you!

Radu said

on July 31st, 2009,

at 19:45 hours

I’ve seen some minor glitches too… But it’s better than without. Anyway, most of the time I use a Logitech V220 mouse.

Anonymus Gravatar

Steve Kroon said

on September 16th, 2009,

at 10:07 hours

I tried installing touchfreeze in Ubuntu, but it also required editing the X config file, since the default is not to have SHMConfig on. Maybe you didn’t notice because you put it on for solution 2?

[This seems to be resolved in a newer version of touchfreeze in testing, though]

Radu said

on September 16th, 2009,

at 21:10 hours

Hi Steve! I didn’t have to edit anything. It just worked… For your interest I don’t have that option enabled in xorg.conf.

Think you've got something to say?

For leaving comments including source code or terminal output, please use the the following tags like in the next example:

[language]
code lines
[/language]
where you substitute language with the programming laguage used throught the code example (for terminal output that would be bash), e.g:
[bash]
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
[/bash]

To see a list of all the supported languages, please check this page.

If you want to include code bits inline, please use the code tags like in the following example:

The <code>$USER</code> variable holds the current logged in username.

Subscribe without commenting


Bear