Logitech G9 on Linux

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.


Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
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"
EndSection

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:
xmodmap ~/.Xmodmap

Advertisements

9 responses to “Logitech G9 on Linux

  1. Hello. Have you working wheel-right and wheel-left buttons?

  2. Unfortunately I have only been able to bind keyboard strokes through SetPoint. Left tilt and Right tilt work great once you bind an action to that keystroke though.

  3. MeanEYE

    :/ Just fuked everything up… :/

    I think Logitech could provide us with some help since this mouse costs quite a bit… :( Back to drawing board… or at least to xorg.cong…

    I think am gonna wait for Ubuntu 8.04

  4. bob

    hey, i deleted the corresponding section in my xorg.conf file and replaced it with this one you supplied, but now my mouse wheel doesnt scroll up and down the page anymore so i changed it back. Why is it doing that?

  5. bob: I would check `xev` at the console, see if you are getting any ButtonRelease events for the wheel.

    If you haven’t already, you may need to use the Xmodmap that I added (although i’m not sure if that will futz your wheel into working again).. also check to make sure that your mouse was configured in SetPoint properly — that was the source of a lot of my problems early on.

  6. Hi there.
    I’ve got the tilt-wheel working just fine. (:

    What profile are you using? It wont work in the red or the blue profile, but in the green – the gaming one – it works just fine. (:

  7. galanomatis

    Hi!
    Are you sure about the “pointer” values order? With them pushing left tilt it tilts right and pushing right tilt does a single left click, as it does without using .Xmodmap.
    BTW: Can you give me a link on how I bind the clicks to these actions in Firefox?

  8. That is actually what I found to be the default without .Xmodmap applied. I’m not sure how the actions should be bound to Firefox, but as I remember there was a way to do this.

  9. joe

    Has anyone figured out how to have a different value for the horizontal and vertical dpi’s?

    This is a really important feature for FPS games…

    any help appreciated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: