Logitech MX Revolution revoco in Ubuntu 9.04 Jaunty: Click-to-Click even after a resume/wakeup

It’s been a LOONG time since I’ve posted eh?

Well I finally solved my issues I’ve been having with revoco in the later version of Ubuntu. For those of you who don’t know, when you buy a Logitech MX Revolution mouse (or its ilk), the middle button can alternatively work in “click-to-click” mode (where you feel “clicking” when you spin the wheel) or “free spin” mode where the wheel spins free of resistance. By default the mouse maps the middle click to alternate in between these modes (by default I mean every time it loses connection with the PC, e.g. in the event of a shut down). This has the unfortunate habit of also laying the smack down on a normal middle button event (like middle clicking a link in Firefox to open it up in a new tab) sent to the PC (plus I hate free spin).

For a while btnx solved my problems as it had the ability to send revoco signals to supported mice, but recent changes in Xorg have rendered this useless.

However an enterprising individual named Edgar Toernig wrote a command line utility called revoco that lets you set the modes.

So to get the mouse to always work in click-to-click mode (as you would expect it) you would first need to get a copy of revoco from here. Alternatively, if the site goes down you can download revoco version 0.5 from me.

Next you’ll need to compile it (just run make in the extracted directory).

Once it’s all compiled, I like to use sudo to move the file to /usr/local/bin/.

Next I create an init.d script to set the mouse to click-to-click on boot. Save the following to the text file /etc/init.d/revoco:

#!/bin/bash
/usr/local/bin/revoco click

Finally run a chmod +x /etc/init.d/revoco to allow the code to execute.

All this is well and good but you’ll notice that on a resume from hibernate/sleep, your mouse will be back to its old shenanigans. To fix this we want to create a script in /etc/pm/sleep.d/. So in this folder lets edit a text file 10revoco:

#!/bin/bash
case "$1" in
        hibernate|suspend)
                /usr/local/bin/revoco click
                ;;
        thaw|resume)
                /usr/local/bin/revoco click
                ;;
        *) exit $NA
                ;;
esac

Again lets run a chmod +x /etc/pm/sleep.d/10revoco to allow us to execute

Now if you give it a try, you’ll notice that even on wakeup/resume from hibernation/suspend your mouse will stay in click to click mode!

Comments 8

  1. Geoff wrote:

    Just wanted to say thanks for posting this. I’ve got the MX Revolution, and setting up revoco was a breeze. I prefer to use auto=15,15 myself because I like the free scroll mode, but it’s all a matter of preference. Thanks!

    Posted 03 Jun 2009 at 10:50 pm
  2. Carl wrote:

    Thanks a lot for this Daniel! Having a dysfunctional mouse drove me away from linux multiple times. This made all the difference.

    I had one extra step to make revoco usable by a regular non-root user – setting the usb device read/writable by all users. Otherwise I got “revoco: No permission to access hiddev (/dev/usb/hiddev0-15)
    Try ’sudo revoco …’”

    I did:
    sudo chmod 0666 /dev/usb/hiddev*

    Posted 05 Jun 2009 at 2:51 pm
  3. CoOokie wrote:

    Thanks a lot Daniel! I was dying to know how to get my MX Revolution’s wheel to work as it shoud (with click I mean).

    Posted 13 Jun 2009 at 11:26 am
  4. Colin wrote:

    Many thanks for the information — this was driving me nuts. I also found the following UbuntuForums thread quite helpful:
    http://ubuntuforums.org/showthread.php?t=966403

    Posted 14 Jun 2009 at 7:13 pm
  5. Chapman wrote:

    Thank you! Finally I have the free scroll like I wanted.

    Posted 04 Aug 2009 at 12:14 pm
  6. Nick wrote:

    Is there any purpose for the hibernate|suspend case? Seems pointless to modify that mouse state when the computer is about to sleep… setting it on thaw|resume should be plenty.

    Posted 12 Sep 2009 at 10:48 pm
  7. Stew wrote:

    Absolute life saver ! Thank you so much.

    Posted 18 Nov 2009 at 4:22 pm
  8. hatchetman82 wrote:

    thank you very much for the guide, it was really helpful.

    I’ve switched to using udev to configure the mouse, and published the modified howto here:
    http://hatchetman82.blogspot.com/2009/11/solving-mx-revolution-click-to-click.html

    Posted 29 Jan 2010 at 7:34 am

Trackbacks & Pingbacks 1

  1. From Jon Rogers » Logitech MX Revolution on Ubuntu Lucid 10.04 on 22 Mar 2010 at 4:06 pm

    [...] side scroll. One thing to investigate if your scroll wheel isn’t doing what you want is revoco, which is a tiny program for just that one thing, though I don’t need [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *