Picture of Jürgen Kreileder

Logitech MX1000 Configuration

I’ve had to buy a new mouse, this time I got me a Logitech MX1000 (my first Logitech mouse ever). The Microsoft IntelliMouse Explorer I’ve used on my G5 got broken, it lost about two out of ten of clicks on the left button.

I’m not completely satisfied with the MX1000. It’s too heavy and a bit too small for my hands. The notable exception is the Forward button, it’s too far away from my thumb. I’ve had the last problem with the IntelliMouse Explorer too. I still have a few IntelliMouse Optical on other machines, I really like that mouse. Perfect Size, good wheel, easily reachable side buttons. The only drawback is the annoying big red light.

Anyhow, back to the MX1000. Only a few changes to my configuration for the IntelliMouse Explorer where needed to get it working. Here’s my new configuration:

  • /etc/X11/XF86Config-4 or /etc/X11/xorg.conf:
    Section "InputDevice"
     Identifier "MX1000"
     Driver     "mouse"
     Option     "CorePointer"
     Option     "Protocol"        "evdev"
     Option     "Dev Name"        "Logitech USB Receiver"
     Option     "Buttons"         "12"
     Option     "ZAxisMapping"    "11 12 10 9"
     Option     "Resolution"      "800"
     Option     "Emulate3Buttons" "false"
    EndSection
  • /etc/X11/Xmodmap:
    ! MX1000
    pointer = 1 2 3 8 9 10 11 12 6 7 4 5

    This gets the buttons in right order: Scrolling the wheel generates 4 and 5, tilting the wheel 6 and 7.

  • ~/.xbindkeysrc:
    (You have to install xbindkeys and xvkbd for this; I’m starting xbindkeys in ~/.gnomerc)
    # Backward and Forward buttons
    "xvkbd -text "\[Alt_L]\[Left]""
      m:0x10 + b:8
    "xvkbd -text "\[Alt_L]\[Right]""
      m:0x10 + b:9
    
    # "Cruise Control" disabled:
    #"xvkbd -text "\[Page_Up]""
    #  m:0x10 + b:11
    #"xvkbd -text "\[Page_Down]""
    #  m:0x10 + b:12
    
    # "Cruise Control" enabled:
    # Only use this if you have problems with Mozilla
    #"NoCommand"
    #  m:0x10 + b:11
    #"NoCommand"
    #  m:0x10 + b:12
    
    # Application-Switch button
    # A-Tab doesn't work
    # Use it as another Forward for now
    "xvkbd -text "\[Alt_L]\[Right]""
      m:0x10 + b:10

    Using the Application-Switch button for switching windows in GNOME doesn’t work because it would require holding down the Alt key while pressing Tab several times, xvkbd can’t do that. I’m using the button as another Forward now, it’s easier to reach than the real Forward button.
    Defining actions for the Cruise Control buttons only makes sense when Cruise Control is disabled (you can disable it with the Logitech Mouse Applet). If it is disabled, the buttons generate 11 and 12. When it is enabled, they generate a single button 11 or 12 event and then a series of button 4 or 5 events just like scrolling the wheel does.
    I have no idea why the mouse generates 11 or 12 before starting normal scrolling in Cruise Control mode. I’m mapping 11 and 12 to “NoCommand”, this eliminates the ButtonPress but not the ButtonRelease event. This seems to eliminate the negative effects of the extra button events in Mozilla. (Mozilla interprets the 11 and 12 events as normal left clicks, Firefox doesn’t have this issue. So if you’re using Firefox or if you don’t see the left-click problem with your Mozilla build, then don’t bind 11 and 12 to anything.)

  • At this point the Backward and Forward buttons should work in GNOME, KDE, and -based browsers. Horizontal scrolling should work in GNOME and KDE.
    Mozilla-based browser like need two additional changes to get horizontal scrolling working with the tilt wheel: Open about:config and set
    mousewheel.horizscroll.withnokey.action = 0
    mousewheel.horizscroll.withnokey.sysnumlines = true

April 5th, 2005: Update: Don’t bind 11/12 to anything in Cruise Control mode by default (only needed if there are problems with Mozilla). Fixed the "Cruise Control" comments in ~/.xbindkeysrc.

January 15th, 2006: Xorg 6.9 and later come with a different evdev driver. I’ve made an updated version of this guide now.

This article Jürgen Kreileder is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

24 Comments

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post. Both comments and pings are currently closed.

ydef said

#Next
“xvkbd -xsendevent -text “\[Control]\[Prior]””
m:0x0 + b:4
#Prior
“xvkbd -xsendevent -text “\[Control]\[Next]””
m:0x0 + b:5
#Left
“xvkbd -xsendevent -text “\[Meta_L]\[Left]””
m:0x0 + b:8
#Right
“xvkbd -xsendevent -text “\[Meta_L]\[Right]””
m:0x0 + b:9
#Kill
“xvkbd -xsendevent -text “\[Control]\[w]””
m:0x0 + b:10
#Next
“xvkbd -xsendevent -text “\[Prior]””
m:0x0 + b:11
#Prior
“xvkbd -xsendevent -text “\[Next]””
m:0x0 + b:12

This is my xbindkeysrc in case this helps someone. I like having the center thumb button be control-w, which closes xwindow,firefox tab, whatever running in x — very convenient.

Instead of horizontal scrolling with the y axis of the wheel (which i rare use) i prefer to have my y axis be next and prior so that I can skip move between tabs on firefox/mozilla effortlessly.

And for buttons 4 and 5 that are above and below the scroll wheel i have that set to go up one page and down one page per click on the browser with the control-next and control-prior.

Ydef

Marcus said

If you want to “xbindkeys” the wheel’s tilt left/right, do _not_ include the buttons 9 and 10 in “ZAxisMapping”.

Jason said

I’m having some trouble using the tilt left right buttons, this is my xorg configuration
Section “InputDevice”
Identifier “MX1000”
Driver “mouse”
Option “CorePointer”
Option “Dev Name” “Logitech USB Receiver”
Option “Buttons” “12”
Option “ZAxisMapping” “11 12 10 9”
Option “Resolution” “800”
Option “Emulate3Buttons” “false”
EndSection

and my .xbindkeysrc
# Backward and Forward buttons
“xvkbd -text “\[Alt_L]\[Left]””
m:0x10 + b:8
“xvkbd -text “\[Alt_L]\[Right]””
m:0x10 + b:9

# “Cruise Control” disabled:
#”xvkbd -text “\[Page_Up]””
# m:0x10 + b:11
#”xvkbd -text “\[Page_Down]””
# m:0x10 + b:12

# “Cruise Control” enabled:
# Only use this if you have problems with Mozilla
“NoCommand”
m:0x10 + b:11
“NoCommand”
m:0x10 + b:12

Looks like your configuration is missing the Option "Protocol" "evdev" line. Only the evdev protocol sees all buttons.

BorgHunter said

Well, I have the same problem as Jason, and using the evdev protocol breaks X. And apt can’t find the package. Google seems to indicate that evdev involves USB devices — what would be the alternative if the mouse is hooked up through PS/2?

How does it break X? Has it stopped starting up because it can’t find the mouse?

Both XFree86 and XOrg should work fine with evdev, I’m using it on several Debian installations. (Debian’s XFree86 has some evdev patches, so if you have a really old XFree86 package there might be problems. XOrg supports evdev without any additional patches.)

To get evdev running with X you need two things:

  • A kernel with evdev support: This is an abstract layer, it provides access to all input devices connected to the machine. Both USB and PS/2 input devices should show up in /proc/bus/input/devices. PS/2 devices may have limited event support, though.
    (Standard Debian kernels have evdev built as a module which normally gets loaded by hotplug while booting or when attaching a input device.)
  • An InputDevice section in the X configuration that has a Option "Protocol" "evdev" line. Using protocol evdev works at least for the mouse and kbd drivers. The Dev Phys and Dev Name options allow you to specify which input device gets used (you can get the values from /proc/bus/input/devices).

Regarding PS/2 devices. The kernel’s driver is the limiting factor here (AFAIK this applies both to direct PS/2 access and access via the evdev layer). Stock kernels won’t see all buttons. There are some patches which make it work with the tilt wheel of the Microsoft mice (IIRC that required patching X too) but even that wouldn’t make it see all buttons of the MX1000.

John said

Should these instructions work for KDE also? I’ve got Suse 10 and haven’t been able to get the buttons working correctly yet.

Yes, the instructions work for KDE too. If doesn’t work for you, start with checking whether the X server really uses the evdev driver for the mouse.

Redendorf said

I may be having the same problem as BorgHunter. I’m new to linux and just installed FC4. Whenever I set my Protocol to evdev, X does not start.
Here are the relevant portions from my /var/log/Xorg.0.log:
(**) Option “Protocol” “evdev”
(EE) Mouse0: Unknown protocol “evdev”
(EE) PreInit failed for input device “Mouse0”
(II) UnloadModule: “mouse”
(WW) No core pointer registered
No core pointer
Fatal server error:
failed to initialize core devices

here is my /proc/bus/input/devices:
I: Bus=0003 Vendor=046d Product=c50e Version=2500
N: Name=”Logitech USB Receiver”
P: Phys=usb-0000:00:11.2-2/input0
H: Handlers=mouse0 event1
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

here is my /proc/bus/input/handlers:
N: Number=0 Name=kbd
N: Number=1 Name=mousedev Minor=32
N: Number=2 Name=evdev Minor=64

I’m guessing that my handler should be event2 instead of event1. I think the problem may be that evdev doesn’t seem to be a module but is compiled into the kernel (modprobe evdev does not find the module). …no clue how to proceed from here. Any help would be appreciated.

Redendorf, the kernel side looks OK. I don’t have a Fedora installation at hand right now, so can’t check whether it Fedora ships the X evdev driver.

Maybe somebody else can answer this, it should at /usr/X11R6/lib/modules/input/evdev_drv.so or a similar location.

Matthew Rodgers said

I have been using these settings for my MX1000 for about 6 months now.
So far, they work pretty good, but I have a few problems if anyone wants to help.
Every once and a while, the mouse just suddenly stops working. When I had this problem in win64, I installed the driver for it and it fixed the problem (lol in windows i always forget it requires drivers cause sometimes stuff works anyway). So I look at the new xorg evdev which supposed to have better support, but it is masked, and I’ve tried unmasking and compile for 64 bit, but I don’t feel like it anymore. When the mouse stops working, sometimes X actually crashes and I have to reboot linux cause my keyboard stops too and cold/hotplug don’t even work whenI unplug and replug, so something is bad.
The only other problem I have, which is the one I think you can probably help with is when I scroll down the page in firefox, sometimes it sends a (page back) signal, causing the page to go back to the previous, meaning every time I instinctually scroll down, I am forced back to the last page. Sometimes I get annoyed and then I start justusing the right side scrollbar. I DO know that tilting the scroll wheel left should send that signal, but I am def not tilting left at all, and it still sends it every now and then. I would just like to turn off the left tilt and right tilt support for the mouse. Any ideas?

Matthew Rodgers said

I actually just fixed my problem.
For 6, yes 6 months, my gentoo linux 64 bit machine has been crashing each time the mouse froze up.
Also, when scrolling down in mozilla, my web page would go back.
Here is the fix if you are using what was said earlier here.
Basically, get rid of the 10 9 in the ZAxisMapping cause it screws it up (at least in my 64 bit system I don’t know about 32 maybe it works who knows).

Identifier “MX1000”
Driver “mouse”
Option “CorePointer”
Option “Protocol” “evdev”
Option “Dev Name” “Logitech USB Receiver”
Option “Buttons” “12”
Option “ZAxisMapping” “11 12”
Option “Resolution” “800”
Option “Emulate3Buttons” “false”
Option “Device” “/dev/mouse”

Rafael said

Sorry for my lack of knowledge on this matter, but I didn’t understand how to use xbindkeysrc, I got it through apt, but am I supposed to run it, or is it an editable text file? I didn’t find the .gnomerc folder in ~ , am I supposed to download something else?

~/.xbindkeysrc is just a simple text file, it’s the configuration for the xbindkeys program. You can start the program manually by just typing its name.
To automatically start xbindkeys just put it into ~/.gnomerc. ~/.gnomerc is a simple shell script which gets executed when a GNOME sessions startus up (see /etc/X11/Xsession.d/55gnome-session_gnomerc).

Note that some parts of this guide are a bit outdated for XFree 6.9 (most noteably the xorg.conf part). I’ll post an updated guide soon.

Marcus said

With the new “evdev” driver in xorg 6.9 (“evdev” no longer works as protocol in ‘driver “mouse”‘) I cannot get events from all buttons (tested via xev). All important options (“Buttons”, mappings and so on) are not supported by the new “evdev” driver (in fact, there’s only one option – “Device”). Hints anyone?

Mader said

Hello,

I have a “few” questions. Perhapse someone is able to give me the answers…

I have tried the udev rule above, but with no success. That does not bother me too much because X is happy with event1

But

You tell me to use xvkbd, but I am not able to install it while it is conflicting with x11-common. I am on a debian/sid amd64 box.

I want to use the kcontrol part for logitech mice, but I have no permission to write to the device. My user is in group plugdev (perhaps a debian specific detail). Is there a possibility to set the permisson for the device by the udev rule?

Sorry for asking that much, but I am not able to dig that deep in the mud…

Thank you in advance.
Wolfgang

Mader said

…the udev script now works. I had an typo. sorry

Ralf said

I’m having problems with the evdev driver… if I choose it as the protocol, X crashes as soon as I restart it. Some websites claim that there is a bug with (the new version of?) evdev, could this be the problem? I’m using Ubuntu 6.06. In the package mananger I found this note in the description of xserver-org-input-evdev: “Note that this driver is different from Protocol “evdev” in the keyboard and mouse drivers, as shipped with Ubuntu 4.10 and 5.04, and Debian 3.1″. Does this mean Ubuntu 6.06 doesn’t have the evdev protocol?

I’ve tried other protocols: with “Logitech” the mouse doesn’t work at all, and with protocols like “ExplorerPS/2” and “auto” not all the buttons work properly (tilt is not detected at all, the app switch button is seen as button 1, etc).

dante said

hey thanx very very much this really worked for me… i did lots of bindings already since i don’t use the feature side-scrolling anyway.
for all you people who don’t have the evdev thingy or xorg says you don’t have it:

– your kernel needs it compiled in
so:
Device Drivers —>
Input Device Support —>
Event Interface

USB Support —>
USB Human Interface Device (full HID) support
[*] HID input layer support

—————————————————————————-

recompile your kernel, and take evdev as driver and _not_ as protocol in your config. set protocol to auto. then reinstall the package with the xorg-evdev driver inside. for debian unstable this is xserver-xorg-input-evdev. then reconfigure this package (dpkg-reconfigure [package]) and restart x.

this should work by then.
it worked for me.

thanks for your help here!
greets, dante

dante said

something just got lost, it’s:

Device Drivers —>
Input Device Support —>
Event Interface

USB Support —>
USB Human Interface Device (full HID) support
[*] HID input layer support

dante said

fuck! just put “Event Interface” right into the kernel and not as module.
greets

andreas said

For all those whose X-Server crashed using the new evdev driver (afaik since X.org 6.9), I found out that I had to replace “Dev Name” with “Name” to get it work.

Section “InputDevice”
Identifier “MX1000”
Driver “evdev”
Option “CorePointer”
Option “Name” “Logitech USB Receiver”
Option “Buttons” “12”
Option “ZAxisMapping” “11 12 10 9”
Option “Resolution” “800”
EndSection

greets
Andreas