I found a couple blogs that said they got middlemouse scrolling working on a thinkpad, but none of their methods worked on my x61Tablet with 64-bit Ubuntu 8.10 installed.  This version of ubuntu uses evdev instead of the xorg.conf file that previous versions used, so it makes configuring the middle mouse button a little bit more difficult.

The first thing you should do (just for your own records) is this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

that will return the properties of your trackpoint.  (change “TPPS/2 IBM TrackPoint” to “DualPoint Stick” if you have an X200 or  X61s.) I did not do this before changing settings, so I don’t know what the original looks like (if you do, please post it in the comments so I can have a record of it! I posted the final results of that command at the end.)

Now, what you will need to do is create a file, /etc/hal/fdi/policy/mouse-wheel.fdi with the following command:

sudo nano /etc/hal/fdi/policy/mouse-wheel.fdi

then paste in the contents with ctrl-shift-v:

<match key="info.product" string="TPPS/2 IBM TrackPoint">
<merge key="input.x11_options.EmulateWheel" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>

save and quit by hitting ctrl-x, then “y”.

To tell you what each line does:

EmulateWheel should be pretty obvious, you don’t actually have a wheel with a trackpoint, so it emulates one

EmulateWheelButton: which button pretends to be a wheel? the mouse buttons are numbered 1 2 3 in order, so “2” is the middle one

YAxisMapping: which directions should the y-axis go? (4 is up, 5 is down)

XAxisMapping: which directions should the x-axis go? (6 is left 7 is right)

Emulate3Buttons: actually I’m not sure what this does in conjunction with emulatewheel. It probably allows you to use middle-click still (like to close firefox tabs, or whatever else middle click does)

EmulateWheelTimeout: if the button is held for longer than the ammount of time, it switches off the middle mouse click.  Essentially, this is what turns off “middle mouse paste” when you are trying to scroll.

Now, the above configuration DOES NOT work for me, but it seems that it does for everybody else… If it still does not work for you, keep reading for the fix, and please leave a comment so I don’t feel so inept :P. What happens to me is that the xinput list-props command shows the buttons as being mapped correctly, but nothing happens in xev or in real use.  I cannot find errors in any log files or anywhere to indicate why or what is happening.

So, what I do to get it working is in the above file, change “YAxisMapping” and “XAxisMapping” to be misspelled by adding an extra “s” as such: “YAxsisMapping” “XAxsisMapping”

At this point, restart and test it again.  Just misspelling it works for many people.

If it still doesn’t work, create a new file.  This will be a shell script that is run at startup to map the horizontal scrolling correctly (If you don’t care about horizontal scrolling and only use vertical, just stop after you messed up or deleted the XAxisMapping and YAxisMapping lines).Use the following command:

nano /home/$USERNAME/.horizscrollscript

Then paste with ctrl-shift-v, or type in the following contents:

# The following line sets the X-axis mapping to buttons 6 and 7 so that
# horizontal scrolling works.
xinput -set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation X Axis" 8 6 7

then save and close with ctrl-X, then “Y”.  make the file executible with:

chmod +x /home/$USERNAME/.horizscrollscript

Now open the gnome sessions manager (System > Prefferences > Sessions, or alt-f2 and “gnome-session-properties”) and click “add”

for the “Name” field, name it something so you know what it does (I named it Horizontal Scroll Script).

In the “Command” field, enter the path to the file (/home/$USERNAME/.horizscrollscript)

The comment field is optional.  Save and restart, and everything should be working!

Please leave a comment if this does or does not work for you, I’m curious to know if I messed something up and that is why the first part of the tutorial doesn’t work.  ***UPDATE: It seems to work for nearly everybody except me… ugh***

To test everything, you should try this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

and it should return:

Device 'TPPS/2 IBM TrackPoint':
Device Enabled:        1
Middle Button Emulation:        1
Middle Button Timeout:        50
Wheel Emulation Inertia:        10
Wheel Emulation:        1
Wheel Emulation X Axis:        6, 7
Wheel Emulation Y Axis:        4, 5

Wheel Emulation Timeout:        200
Wheel Emulation Button:        2
Drag Lock Buttons:        0

those bolded lines are what we were trying to get! now to test how your computer sees you use those buttons, ust the command:


then you can hit keys on the keyboard and watch what it returns, or put the mouse pointer in the box that pops up and watch that as well.  You should be able to see that scrolling down is 5, up is 4, left is 6 and right is 7. (close xev with ctrl-z or by pressing the “x” on the box.)

The websites I used to formulate this approach are:



***Note:  There is a bug that makes it so that middlemouse scrolling does not work sometimes after a suspend/resume.  Here is the bug report on Launchpad.  There has been a patch released for the actual xorg-evdev, but not one specifically for ubuntu (so you would have to recompile and build evdev while applying this patch at this point)  Here is the URL for the Launchpad bug:


There is a temporary fix also, removing and reloading the “psmouse” module seems to fix it without suspending/resuming again, or restarting the computer.  This is kind of dangerous because it literally unloads the mouse drivers and then reloads them, so you will have to use the keyboard only to enter this in a terminal.  Use these commands:

sudo rmmod psmouse
sudo modprobe psmouse