Getting MX Revolution setup in Gentoo

I recently bought a Logitech MX Revolution mouse. This is a very nice cordless laser mouse with plenty of buttons. See Gizmodo review for pictures. As usual I first googled to find what others have done to get everything working with this mouse. Of course the usual functionality was there without anything special. The first link Google gave me was
Based on this information I set out to setup my new mouse. First I changed my xorg.conf to have the following:

Section "InputDevice"
        Identifier  "Mx Rev"
        Driver      "evdev"
        Option      "Protocol"  "Auto"
        Option      "Name"      "Logitech USB Receiver"
        Option      "Phys"      "usb-*/input0

This gives evdev control of my mouse and still keeps my other stuff working using the normal /dev/mice/input. This at least makes it possible to control this mouse specifically if I need to. The hotplug input framework should hopefully make this kind of stuff obsolete in the future.

Having evdev working and handling the mouse I got xev to recognize all my mouse buttons nicely. I have been using imwheel with my previous mouses and have found it an able tool to map mouse events to keyboard events. Here is my .imwheelrc:

None, Thumb1, Alt_L|Left
None, Thumb2, Alt_L|Right
None, Left, Control_L|W
None, Right, Control_L|T

None, Thumb1, N
None, Thumb2, B

None, Thumb1, Shift_L|Right
None, Thumb2, Shift_L|Left

What this does:

  • Makes back/forward work in Firefox with Thumb buttons
  • Makes creating/deleting tabs work by tilting the scroll wheel
  • Makes Thunderbird go to next unread message / previous message using Thumb buttons
  • Makes Konsole change tabs using Thumb buttons

Using the same pattern you should be able to adjust the rest of the buttons to your liking. I will probably look into using the Thumb wheel to control beryl.

The last thing I didn’t like about the default behavior of the MX in Linux was the scroll wheel. By default it is in the Free-spin mode which means that clicking the wheel does not generate Button2 events. I found a handy tool to control the features of this mouse in the comments of that blog post and I made an ebuild for it Using this tool I can just issue revoco manual=6 and after that I can use the One-Touch Search button to change the scrolling mode of the mouse. I don’t know yet if this is good enough for the main tree as it atm must be run setuid because of default /dev/usb/hiddevN permissions. Will probably add it if I find the time to rewrite it using libhid.

The final touch to glue all this together is to have my .xprofile start the necessary programs for me:

revoco manual=6
#xmodmap -e "keycode 122 = XF86Search"
/usr/bin/imwheel -k -b "007689"

Notice that you can use xmodmap to map the One-Touch search to XF86Search if you like. It’s quite weird how the button is handled. To the OS it is shown as a keyboard with one button. Well engineers are creative.

24 thoughts on “Getting MX Revolution setup in Gentoo”

  1. Thanks for the info. I was planning to get one of these myself but I was not sure I would be able to get the third button to work. I think I’ll go ahead and order one now.

  2. Nice… I’ve been looking for something to contol the scroll wheel…. It’s been the one thing keeping me from calling the mx revolution the best mouse I’ve ever used. Now I can’t wait to go home for lunch to give it a shot 🙂 Thanks for pointing me to revoco

  3. Ok! I got it. I’ll be trying it out tonight, as long as i got home! Hmmm, i cant wait to get home! 😛

    And yes, *nix without wheel click is nasty 😀

    Thak you very much!

  4. Zhenech,

    Thank you SOOOO much for that link! I did all of the stuff you have written here, but revoco returns this: “revoco: No Logitech MX-Revolution (046d:c51a) found.” Rest assured I have one and it is plugged in! Any help is appreciated! Also, I’m not sure where to put the revoco file after gcc. I am running Ubuntu 6.10.


  5. Sittin here in Berlin at the 23c3 😉
    Did you run revoco as root? The place you put the binary doesnt change anything.
    Do you have a /dev/usv/hiddevX, where X is some number between 1 and 16. If not, you need hiddev support in your kernel (and the proper rights to read and write to this device).
    Just a thought, do you use udev? If not, you maybe need to create the char-devs by-hand (cannot tell you the device adress, my MX is somewhere outside this building ;).


  6. Zhenech,

    Well after trying everything I could, I finally went to google and started searching for another download location and finally came upon this:

    Revoco 0.3 is located there (3 times). I downloaded it, and ran the gcc command on it as root. Gcc snagged on the spot where version is defined, but I cleared it up w/ some quotes (although the version does not display correctly because of this). In any case, the resulting program works like a charm! I’m opening new tabs like a champ now! I hope the link helps others. I am e-mailing Edgar to ask if I can host it so we will have yet another source for downloading it. Thanks!


  7. Sorry about the server failure – I hope it’s fixed next week. One backup location is

    (thanks Petri!)

    Don’t spread the ibiblio link. The tar.gz file is broken and URL won’t be valid for too long (it’s the incoming directory).

    About the compilation issue: just call make instead of calling gcc directly. The makefile passes the right version string to the compiler. (The backslashes in -DVERSION=”0.3″ are required.)

    With version 0.3 it’s no longer necessary to invoke revoke each time you login. The settings are permanent.

    Also, v0.3 looks in /dev and /dev/usb for the hiddev devices (it seems there’s some disagreement on where these have to be located). And if it can’t find an RX Revolution it gives some trouble-shooting advice.

    Ciao, ET.

  8. Btw, I’m disappointed by the MX Revolution. My wheel doesn’t spin freely any more 🙁 It stops spinning within one second. Some googling showed that I’m not alone with that: in Logitech’s forum there are a couple of people with similar problems – but no reply from Logitech staff yet.

    IMHO a pretty meager performance for such a pricy mouse – loses its main feature in less than two months …

    Ciao, ET.

  9. Well, my linux noobness shines through now. Using make is a much better solution…thanks again ET! It was because I was using gcc that it snagged. What I meant to say before was that it snagged where VERSION is in the usage section. Now, its obvious why.

    Petteri, I didn’t notice the link for the v0.3 source. I went straight to the link from Zhenech that took me to the v0.2 source, which didn’t work…probably because of what ET said above about where it looks for hiddev devices.

    In any case, I am at best a noob, and am much more educated on it now…and it works. Thanks for all the help!


  10. I have a laptop with an embedded
    bluetooth device.

    Is MX Revolution capable of working through my own bluetooth
    device rather then the wired usb bluetooth that it comes with?

    Has anybody done any tests?

  11. Yes, it is able to work as normal
    bluetooth adapter.
    Logically it should work cause bluetooth is standart technology but you never know till you try it.

    Before I spend my money on it just want to make sure it works directly. But still it’s good news it works with gentoo.

  12. Hi, and thanks for that fantastic info! This should be on the gentoo-wiki…

    A few tips for using my MX Revolution:

    1. I had to edit revoco-0.3.c and change:
    #define MX_REVOLUTION to 0xc525 as my usb id is slightly different. (DrDrew: your problem? use `lsusb`)

    2. The auto setting was a bit spastic by default – the solenoid was clicking on and off without even moving. This worked:
    $ sudo revoco auto=10
    (Froese – could this be your problem?)

    3. setting the manual click change to button “6” (find button) gives me my middle click back *woot*
    $ sudo revoco manual=6
    and also gets rid of that annoying “search” keyevent which I have a keyboard for 🙂

    4. … But unfortunately, when I set the manual=6 option, the auto scroll feature turns off again 😐

    But that’s a small price to pay! Thanks for finding and documenting this! Now I can show off to my friends 🙂

  13. For those who want to use wheel-click to toggle between free and click-for-click, you can use xmodmap to remap your middle click to another button. I use this in my ~/.Xmodmap:

    pointer = 1 9 3 4 5 7 6 8 2 10 11 12 13 14 15 16 17 18 19 20

    This makes the “forward” thumb button a middle mouse button. I find this much easier to press than the wheel itself!

  14. Hi,
    I just bought a MX 5500 Logitech kit, it has a MX Revolution mouse connected with bluetooth, but revoco doesn’t seem to work for me, i run it as root, it returns no error but the mouse behaviour does not change, i run revoco manual=6 or manual=13 but the middle button still is the one in control over the scroll mode.
    Any sugestions/tips would be appreciated 🙂

  15. Hi, I just got a MX Revolution as well. revoco worked a couple of times, but now it will not actually change the mode of the wheel. I can set free spinning mode, and revoco will report that’s the mode if I query it, but the wheel is constantly in ratcheting mode. Has anyone else had revoco appear to be working on the software side but not actually do anything to the mouse?

    PS This blog does not let me post a comment with my gmail address, thanks!

  16. I am completely new to Ubuntu 8.10

    I got so far as to download and extract. I went to the directory I extracted it in, and typed “make”. Now I have 2 new files: revoco, and revoco.o

    What do I do next to get this working. Please help.

  17. It seems there’s a new version of the MX-5500 mouse with the same vendor and product ID, but that communicates differently, and revoco hasn’t been updated to work with it. It detects the MX-5500 and prints the warning about it being experimental, but ultimately doesn’t work

    At work, I have the previous version and it works great to change mode. But at home, I have the newer one, and it doesn’t work. Unfortunately I’m not familiar enough with libusb to see immediately why it’s failing. I do have several notes from a usbmon dump while using VirtualBox/XP to control the mouse, and have identified several features of both the keyboard and the mouse, in case anyone would like to take a stab at fixing revoco’s support or writing an additional application for working with the keyboard. Feel free to contact me for the usbmon dump and notes.

Comments are closed.