A new Logitech G9 mouse arrived on my doorstep today. What was first pure glee and joy (it better inspire glee and joy for its cost), turned into a sheer headache. The following is the right way to set things up:
To get it all configured, you actually need to fetch a copy of Logitech’s SetPoint software at http://logitech.com/setpoint/. The reason for this is actually quite interesting — the default profiles change what xev and X register as clicks (the button numbers change, some are duplicated, etc).
Once you have it downloaded and installed (probably to a friendly Windows computer nearby), you’ll want to make a profile with the buttons defined as follows:
1 – Left Click
2 – Right click
3 – Unassigned
4 – Unassigned
5 – Unassigned
6 – Unassigned
7 – Unassigned
8 – DPI Increase
9 – DPI Increase
Save it, assign it a pretty color and disconnect it. Plug it into your Linux machine.
As it turns out, the Logitech G9 appears as both a keyboard and a mouse device, so configuration is not as straightforward as it should be. One clever soul on the Gentoo wiki specified the Dev Phys precisely, along with the handler name.
While this works, on my system the handler varies across reboots. Adding udev rules, to make everything persistent across reboots was not working either, so I did the following in /etc/X11/xorg.conf.
Identifier "Configured Mouse"
Option "Phys" "*/input0"
Option "Name" "Logitech G9 Laser Mouse" # from /proc/bus/input/devices
Option "HWHEELRelativeAxisButtons" "11 12" # I haven't gotten the tilt wheel working yet, sadly
Option "WHEELRelativeAxisButtons" "4 5"
Option "Emulate3Buttons" "false"
Option "Buttons" "9"
Reboot (or if you’re concerned about uptime, hit the magic CTRL+ALT+BACKSPACE combo to restart X after saving and quitting your edit of xorg.conf).
Hopefully this helps somebody out there save some time.
Update: Because the g9 can actually store settings on the mouse, you can bind the “unused” left and right tilt to obtuse keystrokes, making it useful for swapping through tabs in Firefox, or for games like World of Warcraft (where you need every random trigger you can get to make use of your two hands).
Update 2: After a fresh install, i’ve discovered that you’ll need .Xmodmap with the following present in your user’s home directory:
pointer = 1 2 3 4 5 8 9 6 7
The following command will do it for you:
echo “pointer = 1 2 3 4 5 8 9 6 7” > ~/.Xmodmap
To get it going without a restart, type in: