Logitech G7 mouse in Sarge

Well if you were lucky enough to snag on of these exceptional mice in you're Christmas stocking (like me, thanks to my wonderful wife) or you're looking to buy one now that they are a more reasonable price (for top of the line anyways). Then here's the breakdown for usage in Sarge:

(Please note there are 2 'models' of these mice the original was green with hard plastic all round and the current revised model is all black with a carbon fibre look and rubber grip. I speak here of the latter, very sexy, not sure if any firmware/operational differences exit. A google of 'gentoo+G7+wiki' or 'G7+ubuntu+forum' will provide heaps of confusing detail but not for Sarge.)

1.Out the box all basic mice functions will work, great! Point and click I didn't even change XF86Config-4 from the PS/2 setup mouse I was using.
--Picked up by the usual XF86Config-4 'mouse' driver and usb setup.
--The hardware 3 step res works fine.
--The thumb button was picked up as button 8 and so could be mapped using your preferred manner (I was using xmodmap and imwheel) or see ~/.xbinkeysrc bellow.

2.Try:
$>xev
and click the thumb and tilt wheels while over the window to see what is detected and what button number.

3.Ah the tilt buttons... are not picked/assigned using the 2.6.8 debian kernel and xfree86 4.3.0 no matter what combination of drivers I tried with what config and I spent a day and a half trying ;-( so long story short if you absolutely have to have the use of these your system can no longer remain pure Sarge/Stable.

######################################################################
The following was a huge mission and X doesn't seem to be all that stable any more so unless you absolutely have to have the tilt buttons working (and have spare hours to waste) perhaps wait for the next Debian stable release, not too far off now I hope, or even possibly upgrade everything to unstable...you have been warned.

Strongly Suggest to change /etc/inittab so that X does not start on boot look for this line and change 2 to 1 (remember to change it back later):
id:1:initdefault:

**I finally got the tilt working with the following in Sarge using www.backports.org
linux-image-2.6.18-3-686
linux-headers for above needed for nvidia build.
linux-kbuild-2.6.18
x11-common 6.9.0.dfsg
xserver-xorg 6.9.0.dfsg

As you can imagine there are many, many dependancy issues to resolve and in the proccess I ended up removing most of the X apps and reinstalling them along with KDE 4:3.5.0-3bpo1 (why not it is pretty). Of course if your using accelerated video hardware then the older Nvidia drivers in Sarge will not work well with the newer Xorg so I got 'NVIDIA-Linux-x86-1.0-9746-pkg1.run' from the nvidia driver site. Many hours in a console later and $> xev now registers the tilt buttons with the following setup.

######################################################################
$> cat /proc/bus/input/devices|less
I: Bus=0003 Vendor=046d Product=c51a Version=4101
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:03.0-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c51a Version=4101
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:03.0-1/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6639fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0

To repeatedly get the event number and optionally update xorg.conf try this little
script(needs xorg setup below): www.debianhelp.org/node/4390
######################################################################
/etc/X11/xorg.conf

Section "InputDevice"
Identifier "LogitechG7"
Driver "evdev"
Option "Device" "/dev/input/event1"
Option "Name" "Logitech USB Receiver"
Option "Phys" "usb-*/input0"
Option "SendCoreEvents"
EndSection

Apparently the 'Device' line should not be needed in newer x.org but mine always complained about no device specifed, the trouble is that the usb system registers two "Logitech USB Receiver" with no way to tell the difference except that the mouse event is always at "usb-*/input0". Of course if you boot with different usb peripherals plugged in the event number may change and X will freeze (once it has successfully locked up the keyboard) so I ssh in from another machine and issue a reboot.
######################################################################
/home/user/.xbindkeysrc

"/usr/bin/X11/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6
"/usr/bin/X11/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:7
"/usr/bin/X11/xvkbd -xsendevent -text "\[Alt_L]\[Up]""
m:0x0 + b:8

The spacing quotation marks and new lines (6 of) must all be retained exactly as above.
Of course if you just want to use the thumb button (8) mapped to your choice of command most likely "\[Alt_L]\[Left]"" for -back- in your browser use:

"/usr/bin/X11/xvkbd -xsendevent -text "\[Alt_L]\[Up]""
m:0x0 + b:8

Also of course for this to work:
#> aptitude install xvkbd xbindkeys
######################################################################
/home/user/.kde/Autostart/xmodscript

#!/bin/sh
#Logitech G7 mouse bindings see ~/.xbindkeysrc
xbindkeys

Create an executable script to start xbindkeys when kde starts, or place in your window managers startup scripts or $>xbinkeys
######################################################################

Well after all that a very slick mouse that performs well once you get used to using short quick taps in the tilt buttons to only get 1 click not 3 ;-) Have fun.

No votes yet
Syndicate content