Me and U(buntu)

My Ubuntu Experience!

Logitech Laser G9 and Ubuntu

Posted by Jason on December 23, 2007

Five is two more than three!

As I mentioned in an earlier post, I have a new Logitech G9 Laser Mouse. Although the basic buttons (meaning the left and right buttons and the mouse wheel) seemed to work fine, I wanted to get support in there for all five buttons.

I got a good start by following the instructions here, but afterwards I noticed that is seemed my two thumb buttons and the mouse wheel up and down has swapped places.

This part I can handle

I sort of suspected the ButtonMappings were just not quite right for my mouse, and I found out that you can use xev to see what mouse button number is being signaled. (Apparently xev is installed by default.)

From there, it was straight-forward to end up with this, which seems to work fine:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Emulate3Buttons" "true"
Option "Buttons" "7"
Option "ButtonMapping" "1 2 3 4 5"
Option "ZAxisMapping" "6 7"
EndSection

…And there you have it! Or at least you have what I have.

2008.04.27 – Edited to Add:

After LOTS of twidling and many helpful people, I can get all 11 (yes, ELEVEN) buttons usable in Ubuntu! (You can use the DPI buttons as mouse buttons, but you lose the multiple DPI settings ability in the mouse profile, of course.)

There are a few of ways to do this:

1. Use Logitech Software

You can get SetPoint from Logitech, use it and the G9 on a Windows machine to create a custom profile. Set up the buttons as you like. For the “extra” buttons (the wheel tilt and DPI buttons, set them to send keystrokes.)

Drawback here: you have to use Windows. boo :(

2. Use evdev drivers

Yes, I couldn’t get this working for the longest time – many thanks to cHiOs for helping me out here!

Turns out that the “evdev” driver is pretty particular about the “Device” setting. Something like this worked for me:

Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "Name" "Logitech G9 Laser Mouse"
Option "Vendor" "046d"
Option "Product" "c048"
Option "Protocol" "auto"
Option "Device" "/dev/input/event2"
Option "Emulate3Buttons" "no"
Option "Buttons" "11"
Option "ZAxisMapping" "4 5"
EndSection

With this setup, all the buttons reported in xev, although not sequentially. In my case I did not have a button 6 or 7. The buttons instead reported all the way up to 14.

In this case, I used SetPoint to set all the buttons to report as “generic buttons”.

Drawbacks:

I could not get ET:QW to see the DPI buttons (which were reporting as 13 and 14 in my case).

The /dev/input/event# could change, because this is a USB device. I could NOT get the /dev/input/by-id method to work, which some sites mentioned.

Buttons are not numbered sequentially. This probably shouldn’t bother me, but it did. Greatly.

I also could not get xmodmap to reorder the buttons, even though many sites mention it.

3. Use btnx

Several people suggested I try btnx. I compiled and ran it, and it worked quite nice. This was the relevant xorg.conf section:

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
EndSection

Drawbacks:
Under this method I could not get ET:QW to see either the mouse tilt wheel or the DPI buttons correctly. In this case, I just used btnx to map the buttons to keypresses – so this works out to about the same thing as Option 1, except you don’t need Windows.

Finished

I’m done with messing about with this unless something new comes up. I can get enough functionality out of each button with btnx, that I think I will be sticking with that method.

Plus I’m just plain tired of this issue – there’s lots of other things I need to doodle with!

One Response to “Logitech Laser G9 and Ubuntu”

  1. [...] Edit to Add: See Comments for a half-way workaround I am using. 2008.04.27 Edit to Add: See my updated original blog entry on the Logitech G9 for my final (?) resolution on this – all 11 buttons working in Ubuntu and in [...]

Sorry, the comment form is closed at this time.

 
Follow

Get every new post delivered to your Inbox.