Ralf Öchsner

Logitech Performance Mouse MX on Linux

This short tutorial shows how to make every button of the Logitech Performance Mouse MX work on Linux. I have only tested it on Ubuntu Linux (12.04, 12.10 and 13.04 Desktop) so far, but it should work as well on all other modern Linux distributions. Basically the mouse works just fine out of the box but there are some things that need a little bit of tuning to make all the features work as expected (e.g. as on Windows).

What works out of the box

When you connect the USB receiver the mouse is detected by X11 and the following features already work:
  • normal pointer operation
  • left, right and middle mouse button
  • back and forward button (for example in Firefox)
  • hyper-fast scrolling (the button is mechanical so no software support required)
  • side scrolling
  • USB charging and operation via USB cable (actually the cable doesn't replace the wireless connection, it only charges it)

What doesn't work

  • the big thumb button
  • the zoom button

Making it work and customization

Thumb button

On Windows the big thumb button shows all opened application windows when you have the Logitech mouse software installed. This behaviour is very similar to the Initiate Window Picker For All Windows function of Compiz/Unity/Gnome. In my opinion the Compiz function works even better and faster than the one of the Logitech Windows software. The mouse button can be comfortably assigned to this function with the CompizConfig Settings Manager. If not already done it can be installed via Synaptics or apt-get on Ubuntu:
sudo apt-get install compizconfig-settings-manager
Then open the CompizConfig settings manager (ccsm) and click on the "Scale" plugin: Then go to the Bindings tab and select Initiate Window Picker For All Windows with the mouse symbol in front of it and assign the function to Button 10 (which is the thumb button): With this setting the button needs to be pressed to show you all opened windows. When you release the button it will be automatically switched to the window that lies under the cursor. If you like that behaviour you can of course leave it like that. However on Windows the button just toggles the function so that the button doesn't need to be pressed all the time. To get that very same behaviour just check the radio button which says Button Bindings Toggle Scale Mode (cp. screenshot).

Zoom button

With the Windows software the zoom button enables a zoom mode where the mouse wheel can be used for zooming until the zoom button is pressed again. For most applications this is the same behaviour as holding down the control button on your keyboard and using the mouse wheel in the meantime. So my approach is to turn the zoom mouse button into button that toggles the control button. This works very well for most use cases. To accomplish that xbindkeys and xautomation can be used:
sudo apt-get install xbindkeys xautomation
Then create the file .xbindkeysrc with the following content in your home folder:
"/usr/bin/xte 'keydown Control_L' &"
b:13
"/usr/bin/xte 'keyup Control_L' &"
Control + b:13
The configuration can be tested with:
xbindkeys -n -v
Xbindkeys has to be started after every login to work permanently. On Ubuntu you can add a Startup Application in the menu on the upper right to do that. With xbindkeys you can also do all kinds other customizations. Feel free to experiment with it!