Nov 132010

Despite the lack of official support for GNU/Linux there is good news for G700 purchasers.

Out of the Box
All the main functions work mostly as expected, including the on-board profile switching and resolution (dpi) adjustment. Most functions come with sane defaults and the only feature that is not picked up is the tilt wheel. Further configuration is therefore only required if you would like to use the tilt wheel or customise generated events. This is great news if you move the mouse to another PC.

Like many of these devices the G700 registers itself as both a keyboard and a mouse device, unlike many of these it actually uses the keyboard device out of the box to send keymap events. This allows it to do a lot more out of the box.
Testing all done with Debian 5.0 (Lenny).

Out of the box switching between wireless and corded worked seamlessly.

This is not the case with the evdev driver but is not a problem in practice. The setup shown causes X to use the device that is detected when X starts. Preference is given to the last plugged in device and reverts safely to the last device left plugged in. Therefore in practice X starts with the wireless receiver detected and when the cord is plugged in it charges the battery but does not switch the mouse signals over. If you really want the cord to be used for mouse signals just restart X.

USB Report Rate
The box claims that the default polling rate is 500/s (not the 1000/s max) to conserve system resources. Seems to work just fine. I expect that this is also the reason this mouse does not use the “unifying” receiver, as all the available bandwidth is used by the mouse.

The G700 comes with 5 preset profiles and 5 levels of dpi. So lets go right ahead (and do some of Logitech’s work for them again) mapping out most of the default profiles. Seriously would it have been so hard to include a copy of the designer’s bit of paper in the box with the default profiles? No doubt all profiles are very customisable with the Logitech’s software download and will probably be held in the on-board memory for transfer between machines but of course Linux is not in the OS list and happily we can do plenty with the default profiles.

Xev is a handy program that reports X events. Simply run it from an x-terminal and watch the output. Xev’s mouse button 1 is indicated by B1 in this post.

All Profiles:
– the first 7 buttons are mapped to the default functions.

Xev  G700  Action
B1    G1     L_Click
B2    G2     R_Click
B3    G3?    M_Click
B4    G12?   Scroll_Up
B5    G12?   Scroll_Down
B6    G13?   Scroll_Left #Tilt wheel switch requires evdev
B7    G13?   Scroll_Right #Tilt wheel switch requires evdev

– Good base profile with 5 stage dpi.
– Notice that [B12] and [B15] are fixed to on-board functions and never report events with the evdev driver.

Xev  G700  Action
B8    G4   B8 #Default browser action: Back. Suitable for mapping to Alt_L+Left (back).
B9    G5   B9 #Default browser action: Forward. Suitable for mapping to Alt_L+Right (forward).
B10   G6   B10 #No default X action, suitable to be mapped to Alt_L+Up (dir up).
B11   G7   B11 #No default X action, suitable to be mapped to (Enter).
[B12] G8   Battery Check #Fixed xev never reported.
[B13] G9   dpi- #Xev not reported in this profile.
[B14] G10  dpi+ #Xev not reported in this profile.
[B15] G11  Profile Sw #Fixed xev never reported.

– This is my favourite profile, quick High/Low dpi switching and B14 is available for mapping ๐Ÿ™‚
– Only the differences relative to profile-1 are shown.

Xev  G700  Action
[B13] G9   2-stage dpi, High/Low. #Xev not reported in this profile.
B14   G10  B14 #Available for mapping. Maybe another Enter or M_Click?

– Seems like an office type profile.
– No dpi switching.
– Not really required in Linux since scanning text copies and middle click pastes.

Xev  G700  Action
[B10] G6   Ctrl_L+c (cut)
[B11] G7   Ctrl_L+v (paste)
[B13] G9   keycode 229 (keysym 0x0, NoSymbol), scrolls values if held down.
[B14] G10  keymap notify that changes windows like Alt+Tab.

– Same a profile-1.

– Can’t see myself using this one.

Xev  G700  Action
[B8]  G4   Super_L+Left (back?) #Super_L = Meta_L = Window_L key.
[B9]  G5   Super_L+Right (forward?).
[B10] G6   Super_L+c  (I happen to have Meta_L+c as a hot key for a Calculator).
[B11] G7   Super_L+v  (I happen to have Meta_L+v as a hot key for a Video player).
[B13] G9   Super_L+f  (I happen to have Meta_L+f as a hot key for a File manager).
[B14] G10  F3. (find in Firefox.)


USB or event[] devices can be used in xorg.conf but they have issues and creating a custom device with udev is very easy. Initially it seems logical to create 2 devices “g700wireless” and “g700corded” and have multiple entries in xorg.conf but the evdev driver does not hot swap devices well. Possibly hotplug could be used but it really does not matter for me in practice.


KERNEL=="event[0-9]*", SYSFS{idProduct}=="c51a", SYSFS{idVendor}=="046d", SYSFS{../phys}=="usb-*/input0", SYMLINK+="g7"
KERNEL=="event[0-9]*", SYSFS{idProduct}=="c531", SYSFS{idVendor}=="046d", SYSFS{../phys}=="usb-*/input0", SYMLINK+="g700"
KERNEL=="event[0-9]*", SYSFS{idProduct}=="c06b", SYSFS{idVendor}=="046d", SYSFS{../phys}=="usb-*/input0", SYMLINK+="g700"

Plug/unplug the receiver and/or cable alternately and `ls /dev/ |grep g700` to see that /dev is populated as expected. There is a possibility that udev may need a restart `/etc/init.d/udev restart`.


Just add an InputDevice section to xorg.conf, the Identifier can be added to ServerLayout if you need.


Section "InputDevice"
    Identifier     "G700"
    Driver         "evdev"
    Option         "Device"    "/dev/g700"
##                     #To find use: cat /proc/bus/input/devices
##    Option          "Phys"  "usb-*/input0" # USB port dependant
##    Option          "Device" "/dev/input/event3" # Detect order dependant
##    Option         "SendCoreEvents"
    Option         "CorePointer"

Take Action

Now that Xev is reporting all the button events we just need a couple of programs to take action. In this case I am using B8=back, B9=forward, B10=Dir up, B11=Return/Enter.
The following requires installing: xvkbd and xbindkeys.


"/usr/bin/X11/xvkbd -xsendevent -text "[Alt_L][Left]""
 m:0x0 + b:8
"/usr/bin/X11/xvkbd -xsendevent -text "[Alt_L][Right]""
 m:0x0 + b:9
"/usr/bin/X11/xvkbd -xsendevent -text "[Alt_L][Up]""
 m:0x0 + b:10
"/usr/bin/X11/xvkbd -xsendevent -text "[Return]""
 m:0x0 + b:11
"/usr/bin/X11/xvkbd -xsendevent -text "[Return]""
 m:0x0 + b:14

Then we need to start xbindkeys, this can be done from the command line while testing and by your desktop startup scripts once we are happy with the results:


#Logitech G700 mouse bindings see ~/.xbindkeysrc

There are several other tools on the ‘net that can be used to take action.
Have fun and perhaps this post is of interest to you:
Logitech G7, G700, Performance MX (M950) and Razer Mamba, Nagga Epic and Cybord R.A.T 9

Gavin Kromhout:

Thank you for visiting.
Do look around.
Do leave a comment.

  18 Responses to “Logitech G700 mouse in Debian GNU/Linux”

  1. Do you think it is safe to assume everything you described here will work with (K)Ubuntu? I’ve already made an inquiry on the Ubuntu forums and didn’t get any responses. Have you been able to adjust the signal refresh rate? It can do it 1000 times per second, but I really don’t need that and would prefer longer battery life.


  2. The concept should work with most Debian based distro’s, newer distro’s may have slight differences where X is newer or older.
    Lots of info on Ubuntu input devices can be found here

    No I have not tried to update the refresh rate, see the paragraph headed USB Report Rate.

  3. Hi,

    I don’t catch your how to, am I supposed to create the udev rules ? I have created the rules but thre is no output from ‘ls /dev/ |grep g700’ under Ubuntu Maverick. no device seems to be created.
    Could you explain a little more ?

  4. Hi,
    same problem as daponz for me on Ubuntu Lucid (10.04).

    BTW: cat /proc/bus/input/devices

    I: Bus=0003 Vendor=046d Product=c531 Version=0111
    N: Name=”Logitech USB Receiver”
    P: Phys=usb-0000:00:1d.1-2/input0
    S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input9
    U: Uniq=
    H: Handlers=mouse1 event5
    B: EV=17
    B: KEY=ffff0000 0 0 0 0
    B: REL=143
    B: MSC=10

    Maybe that helps?

    Best Regards,

  5. Hi Brooklyn,

    I have contacted Daponz by email with some suggestions, but no response yet so posting them here:

    So you have added the lines to /etc/udev/rules.d/010_local.rules:

    KERNEL==”event[0-9]*”, SYSFS{idProduct}==”c51a”, SYSFS{idVendor}==”046d”, SYSFS{../phys}==”usb-*/input0″, SYMLINK+=”g7″
    KERNEL==”event[0-9]*”, SYSFS{idProduct}==”c531″, SYSFS{idVendor}==”046d”, SYSFS{../phys}==”usb-*/input0″, SYMLINK+=”g700″
    KERNEL==”event[0-9]*”, SYSFS{idProduct}==”c06b”, SYSFS{idVendor}==”046d”, SYSFS{../phys}==”usb-*/input0″, SYMLINK+=”g700″

    Then restarted udev with `/etc/init.d/udev restart` and plug/unplug the devices?

    Does /etc/udev/rules.d/ exist and look like the correct place?
    This post seems to show that it is the correct place for ubuntu:

    Perhaps try shutting the machine down once the rules are added, unplug/replug receiver and restart machine.
    Still nothing with `ls /dev/ |grep g700` ?

  6. Brooklyn’s output from:

    `cat /proc/bus/input/devices |grep -A 4 -B 2 Logi`

    matches mine:

    I: Bus=0003 Vendor=046d Product=c531 Version=0111
    N: Name=”Logitech USB Receiver”
    P: Phys=usb-0000:00:03.1-1/input0
    S: Sysfs=/class/input/input1
    U: Uniq=
    H: Handlers=mouse1 event1

    I: Bus=0003 Vendor=046d Product=c531 Version=0111
    N: Name=”Logitech USB Receiver”
    P: Phys=usb-0000:00:03.1-1/input1
    S: Sysfs=/class/input/input2
    U: Uniq=
    H: Handlers=kbd event2

    So the rules should apply as stated in the article, in this case it would appear that there is some change in udev or Ubuntu?

  7. If you can’t get udev rules to work then try changing /etc/X11/xorg.conf:

    Comment out:
    ## Option “Device” “/dev/g700”
    Option “Device” “/dev/input/event1” # Detect order dependant

    Naturally X must be restarted.
    This will use the event device directly and can be used to test everything else.
    Note that the event device is likely to change on reboot and replugging devices.

  8. Hi!
    You can use setpoint under Windows and set all keys to general keys. If you do so, all keys will be reported by xev.

    PS: Please remove SYSFS{../phys} clause, it is not universal

  9. Hi

    Good to confirm that the profile settings are indeed kept onboard the G700.

    No the SYSFS{../phys} clause not ‘universal’ the article does note that Debian GNU/Linux 5.0 (Lenny) was the test system. Could you share your udev rules and system?

  10. I can also confirm that it’s possible to get xev events for all buttons if they are set to “generic” in setpoint. I used the USB bus forwarding feature of Virtualbox-4 to flash the new button config in a virtual Windows XP.

  11. @gavingc: Yes the mouse has flash memory which is retained if i remove the battery.
    I think that including the phys clause is wrong anyway since i think it depends on usb hub.
    So I just dropped this clause and it worked for Gentoo
    Ah I also edited the rules file a bit. g700w is the wireless and g700c is the corded (ie when charging). Both link to g700
    KERNEL==”event[0-9]*”, SYSFS{idVendor}==”046d”, SYSFS{idProduct}==”c531″, SYMLINK+=”input/g700 input/g700w”
    KERNEL==”event[0-9]*”, SYSFS{idVendor}==”046d”, SYSFS{idProduct}==”c06b”, SYMLINK+=”input/g700 input/g700c”

  12. Could you please tell me how many buttons are reported as mouse buttons?
    That makes a whole world of difference, since only mouse buttons can be associated to dragging actions (as a one-mouse-button move or one-mouse-button resize action).

    Thanks in advance!

  13. Hi, with my current setup, xev shows.
    The left, right and middle click buttons identify as mouse buttons.
    The Scroll Up and Down, Left and Right also identify as mouse buttons.
    The remaining thumb buttons and mode buttons register as key press events.

  14. Thank you gavingc,
    I’ve decided to give it a try and I couldn’t be happier. This mouse is amazing from the very start (just sad that two buttons are hard set in hardware). No extra requirement is needed for using it on linux, unless you like to customize it (I surely do).

    But also interesting enough, for me, it recognizes all the 4 lateral buttons as mouse buttons. Which is absolutely great.

  15. Hi Blayster,

    That’s awesome, glad to hear you love the G700 mouse.
    So the 4 thumb buttons are all reported as mouse buttons on your setup?
    Which OS/version are you using mate?

  16. I am using Gentoo Linux (kernel 3.3.1-gentoo), but probably that’s a perk of my WM (e17), and its only for the profile1. Never tested to see what happens with xev, but I’ve tested with input-events. It recognizes as follows:
    Their function doesn’t really matter, once I reconfigure them for doing something else. What I am yet to find is how to have G10 and G9 as mouse buttons as well (or at least to have G4~G7 as mouse buttons and the others configurable; profile1 won’t allow me to configure it)

  17. Found a profile in which G10 is as well recognized as mouse button, but G9 just adjusts the dpi. Its the profile with the top led off and the other two on. The other buttons are recognized the same, but G10 is recognized as ???. I can configure it in e17 menu normally though, where it is recognized as “Extra Button (14)”.

  18. That is Profile-2 above and my favourite, I love being able to switch dpi high/low.
    Sometimes I get caught when other people use the mouse and bump the profile button, then my back/up/forward buttons don’t do what they are supposed to, I wonder why for a while then remember to change it back to Profile-2 lol.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>