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"

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


Formac Studio TVR on Linux

I have a Formac Studio TVR. Its probably a few years old but I used it a long time ago to painstakingly record TV episodes to a Powerbook G4 12″.

As a firewire device on Linux, it works as a DV capture device. So if you have one of these lying around, it works. Just make sure to do the following:

  • The raw1394 module (`modprobe raw1394` on the command prompt as root).
  • Change the permissions on /dev/raw1394 so that regular users can read it, or open your DV capture application with privileges high enough to read/write to it. (There are also other methods around this I believe).
  • Grab a DV capture application, such as Kino, go into the capture prompt and use it there (its fairly simple). You can even use VLC to grab DV video.

    While there is an analog TV tuner on the Formac, there is no mention of how it is operated, nor is there any documentation about how to control it.