# Configuring a High-Performance Logitech Mouse (WIP)

## Doogman

Since most of the docs for getting a Logitech mouse working correctly are out-of-date, I've decided to take a crack a writing something useful.  Hopefully this thread will eventually become the start of something useful.  

Configuring a High-Performance Logitech Mouse HOWTO

All you need to know to get your new-fangled, multi-button Logitech mouse working correctly in today's Gentoo.  Make sure you have Xorg 7.1 or newer, a Linux Kernel revision of 2.6.16 or newer and that your mouse is connected to the USB port.  Also verify in /etc/make.conf that evdev is defined in INPUT_DEVICES, aka: "INPUT_DEVICES="keyboard mouse evdev". 

Now, check to see if evdev is working with your mouse:

```

$ cat /proc/bus/input/devices

I: Bus=0003 Vendor=046d Product=c01e Version=2200

N: Name="Logitech USB-PS/2 Optical Mouse"

P: Phys=usb-0000:00:02.0-1/input0

S: Sysfs=/class/input/input1

H: Handlers=mouse0 event1

B: EV=7

B: KEY=ff0000 0 0 0 0 0 0 0 0

B: REL=103

```

If you see something similar to that, your kernel and mouse are working well together.  If you don't see this, make sure your kernel is configured with evdev support.  Notice the information in the "Name" section, you will need that next.

Now it's time to edit the /etc/X11/xorg.conf file.  Look for a section named "InputDevice" that describes the mouse, comment out that section with pound signs # and add this:

```

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "evdev"

   Option      "Name" "Logitech USB-PS/2 Optical Mouse"

EndSection

```

!!! IMPORTANT !!!

Make sure the information in the Name option is the same as what is described in /proc/bus/input/devices.  This will vary from one mouse to another.

Here's another way to do it, copied from the evdev man page.  While it uses cryptic options, it seems to work with all mice without customization. 

```

Section "InputDevice"

     Identifier  "Mouse0"

     Driver      "evdev"

     Option "evBits"  "+1-2"

     Option "keyBits" "~272-287"

     Option "relBits" "~0-2 ~6 ~8"

     Option "Pass"    "3"

EndSection

```

Now, restart Xorg and try the mouse.  All the basic functions should work.  To check all the mouse buttons, install the program xev "emerge xev" and use it to test your buttons by moving the pointer inside the box and pressing a button.  You shoud see a buttonpress and buttonsrelease event for each mouse button.  Remember, moving the mouse wheel is a different button press in each direction.  If your buttons aren't working as expected, make sure to check for stale xmodmap settings with xmodmap -pp.  This is what it looks like for a Logitech MX518:

```

$ xmodmap -pp

There are 10 pointer buttons defined.

    Physical        Button

     Button          Code

        1              1

        2              2

        3              3

        4              4

        5              5

        6              6

        7              7

        8              8

        9              9

       10             10

```

If you wish, you can use xmodmap to change the "order" of the mouse buttons, although that usually isn't necessary nowadays with the evdev driver.

Now, all the mouse buttons should be working correctly. but there's more to do.  With most Logitech mice, you need a helper program to get the most out of the mouse.

#emerge lomoco

See "man lomoco" for docs.  Example:

```

# lomoco -i

001.002: 046d:c01e MX518 Optical Mouse (M-BS81A) Caps: RES SSR

        Resolution (RES): 400 cpi

        USB Mouse Polling Interval:   10ms (default:  10ms)

```

That's no fun.  Here's the lomoco line I use, placed in /etc/conf.d/local.start

lomoco -h --sms &> /dev/null

```

# lomoco -i

001.002: 046d:c01e MX518 Optical Mouse (M-BS81A) Caps: RES SSR

        Resolution (RES): 1600 cpi

        USB Mouse Polling Interval:   2ms (default:  10ms)

```

HINT:I have a Logitech MX518 and absolutely hate the DPI buttons on either side of the scroll wheel.  Using the --sms tag in lomoc disable's the DPI feature and makes them regular mouse buttons.

Ahh, did you notice the increased mouse polling?  Here's how you do it:  If you have usb.hid module built into the kernel, you need to add this in your kernel line in grub.conf: 

usbhid.mousepoll=2

or if the kernel USB support is compiled as a module:

options usbhid mousepoll=2

added to /etc/modules.d/aliases and run modules-update.

Apparently you can use for a setting the numbers 1,2,4,8; which 1 being the setting to poll the mouse the most.

So now your mouse is working: all the buttons function and the resolution and mousepolling are cranked-up.  Unfortunately, while all the mouse buttons work with xev, some don't actually do anything during normal usage.  Ideally, the window manager would support all the extra buttons, but most don't.  Luckily you can work around this with some hacks.

You need two programs, xbindkeys to capture the mouse button presses, and xvkbd to actually send the events:

#emerge xbindkeys xbkbd

Here's my settings, which should give you an idea on what you can do:

$ cat .xbindkeysrc

# Thumb buttons: Tab left and tab right

"xvkbd -text "\[Control_L]\[Page_Down]""

m:0x10 + b:6

"xvkbd -text "\[Control_L]\[Page_Up]""

m:0x10 + b:7

# Wheel buttons: Page up and Page down

"xvkbd -text "\[Page_Up]""

m:0x10 + b:9

"xvkbd -text "\[Page_Down]""

m:0x10 + b:10

# Toggle window maximization state with top button

"xvkbd -text "\[Alt_L]\[F12]""

m:0x10 + b:8

# Hide all windows and focus desktop with top button

#"xvkbd -text "\[Control_L]\[Alt_L]d""

#m:0x10 + b:8

Xbindkeys runs as a daemon and needs to be started every time you login.  In Gnome, I start it it /Desktop/Preferences/Sessions/Startup Programs.

Now, your Logitech mouse should operate to it's fullest abilities!Last edited by Doogman on Sun Nov 12, 2006 2:56 pm; edited 3 times in total

----------

## halfgaar

X.org 7.1 accepts the device name of the mouse:

```
Section "InputDevice"

    Identifier  "Mouse1"

    Driver      "evdev"

    Option      "Name" "B16_b_02 USB-PS/2 Optical Mouse"

    Option      "Buttons" "10"

EndSection
```

Do "cat /proc/bus/input/devices" to find out the device name.

If you don't have 7.1 yet, make a symlink by putting the following code (but change the device name and symlink name) in /etc/udev/rules.d/10-local.rules:

```

# My logitech mouse. 

KERNEL=="event*", SYSFS{name}=="B16_b_02 USB-PS/2 Optical Mouse", SYMLINK="input/mx500"

```

Run udevstart to let it process the rule. You can then use the line "Option "Device" "/dev/input/mx500"" in xorg.conf.

It would be nice if X.org would just autodetect any mouse and allow hotplugging of it, like a certain 8 year old MS operating system does... I believe hotplugging works now (I'm not gonna try it, though...), but autodetection would be nice too.

----------

## Doogman

Yeah, I've seen several forum posts describing how to pick a Xorg input device by name, but I just can't figure out why you would want to.  Using your example, if your mouse died for some reason and you plugged in another, you would have to edit the xorg.conf file before you could even get X to start.

----------

## halfgaar

X.org 7.1 doesn't accept the device option, so you can't even use that anymore. Using a specific eventnr is also not very reliable, because it's dependent of the order they are detected by the OS. It can very well be that the order is different, when you replug your mouse and keyboard, for example.

----------

## KevinLarson

I was trying out what you said in the first post and got to the part where you said run xev and buttons 1-5 and 8,9 work.  The button between 8 and 9 (middle thumb button), the horizontal scrolling, and the cruise buttons do not work as expected.    I continue on to run "xmodmap pp" which told me I had 9 pointer buttons defined.  I have an mx1000 and I believe I should see 12 buttons.  I was wondering if I should append my xorg.conf, or if theres something else I need.

----------

## halfgaar

I have the rule 

```
Option      "Buttons" "10"
```

in my mouse section for my MX500 mouse. It has 8 buttons, 10 including scroll up and down. To let the cruise control buttons work as individual buttons, instead of a clone of scroll-up and scroll-down, I have to use app-misc/logitech-applet (or sys-apps/lomoco, which, as I understand, is gonna be the new way of configuring Logitech mice). See start post for info on lomoco. Setting the optical sensor resolution higher is also a good idea.

----------

## KevinLarson

I tried adding

```
Option "Buttons" "12"
```

When this failed, I tried 11 and 10 as well, but regardless of what I did, xmodmap -pp only showed 9 buttons.  I have lomoco, but I read through the manual and didn't think it could solve this [/code]problem.

----------

## halfgaar

If xmodmap doesn't show the buttons, lomoco can't solve it, I would indeed guess.

I assume you use evdev as protocol, and the appropriate module is loaded? Could you paste your mouse config section?

----------

## KevinLarson

```
Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Device" "/dev/input/mx1000

    #Option "Buttons" "12"

End Section
```

----------

## halfgaar

Hmm, I don't know what could be wrong. The only suggestion I can offer at the moment, is upgrading to X.org 7.1, but it's just a guess. See my note above about X.org 7.1 not accepting /dev/ devices anymore, when you're gonna upgrade.

----------

## KevinLarson

I have 7.1

----------

## halfgaar

Then it's strange that "Option "Device" "/dev/input/mx1000" works. Try what I said about the device name in my first post in this thread.

----------

## KevinLarson

```

# cat /proc/bus/input/devices

I: Bus=0003 Vendor=0d8c Product=0006 Version=0010

N: Name="USB Audio"

P: Phys=usb-0000:03:00.0-2/input3

S: Sysfs=/class/input/input0

H: Handlers=kbd event0

B: EV=3

B: KEY=e000000000000 0

I: Bus=0003 Vendor=046d Product=c512 Version=3007

N: Name="Logitech USB Receiver"

P: Phys=usb-0000:03:00.1-1/input0

S: Sysfs=/class/input/input1

H: Handlers=kbd event1

B: EV=120003

B: KEY=1000000000007 ff800000000007ff febeffdfffefffff fffffffffffffffe

B: LED=1f

I: Bus=0003 Vendor=046d Product=c512 Version=3007

N: Name="Logitech USB Receiver"

P: Phys=usb-0000:03:00.1-1/input1

S: Sysfs=/class/input/input2

H: Handlers=kbd mouse0 event2

B: EV=7

B: KEY=7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff 0 1878d800d100 1e000000000000 0

B: REL=143

I: Bus=0003 Vendor=050d Product=0815 Version=0210

N: Name="Honey Bee  Nostromo SpeedPad2 "

P: Phys=usb-0000:03:00.1-2/input0

S: Sysfs=/class/input/input3

H: Handlers=kbd event3

B: EV=100003

B: KEY=e080ffdf01cfffff fffffffffffffffe

I: Bus=0003 Vendor=050d Product=0815 Version=0210

N: Name="Honey Bee  Nostromo SpeedPad2 "

P: Phys=usb-0000:03:00.1-2/input1

S: Sysfs=/class/input/input4

H: Handlers=mouse1 event4

B: EV=20007

B: KEY=70000 0 0 0 0

B: REL=103

B: LED=7

I: Bus=0003 Vendor=046d Product=c50e Version=2510

N: Name="Logitech USB RECEIVER"

P: Phys=usb-0000:03:00.1-3/input0

S: Sysfs=/class/input/input5

H: Handlers=mouse2 event5

B: EV=7

B: KEY=ffff0000 0 0 0 0

B: REL=143

```

Is that what you meant becase I had already symlinked it.

----------

## halfgaar

No, I meant turning this:

```

Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Device" "/dev/input/mx1000

    #Option "Buttons" "12"

End Section

```

into

```

Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Name" "whatever the name of your mouse is in the output above"

    #Option "Buttons" "12"

End Section

```

"Device" shouldn't work anymore in 7.1. It's strange that your X even starts. You should use Option "Name". 

BTW, there was a typo in your original mouse config, there is no end quote for the device name.

----------

## KevinLarson

I'm now using:

```
Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Name" "Logitech USB Receiver"

    Option "Buttons" "12"

EndSection

```

in my xorg.conf.

I still only get 9 buttons though.

----------

## purplerhino

```
Option "evBits" "+1-2"

Option "keyBits" "~272-287"

Option "relBits" "~0-2 ~6 ~8"

Option "Pass" "3"
```

What is this?  I'm tired of the cryptic configuration required to make my stinking my mouse work, and that just seems like two steps backward from the "just works" I desire.  What the heck does all that mean?  Nevermind, actually, I don't want to know.  I just don't want to have to see it.  It's horrible, just horrible.  (not blaming you Doogman, I saw you just nabbed that from the evdev man page).  It did work though, however I'm not having any problem with:

```
Section "InputDevice"

    Identifier   "MX1000"

    Driver "evdev"

    Option "Name" "Logitech USB Receiver"

EndSection

```

and it's much less ugly!

Kevin:  

If you have a MX1000, I think you said you did, I do too and that works for me, so put that in your xorg.conf and focus your energies else where.  If you're saying your Xorg 7.1 didn't break immediately with that Device line, mine sure did, maybe not all parts of it got upgraded.  I'd do an emerge --uDN world to make sure everything is good and fresh.  And make sure you have evdev in your make.conf :

```
INPUT_DEVICES="keyboard mouse evdev"
```

and of course make sure you have Event interface on in the kernel, Device Drivers -> Input Device Drivers -> Event interfaceLast edited by purplerhino on Mon Nov 06, 2006 8:30 pm; edited 1 time in total

----------

## purplerhino

oh, and my lomoco -i doesn't tell me the resolution, anyone seen that before?

```
002.003: 046d:c50e Receiver for MX1000 Laser (C-BN34) Caps: CSR SSR SMS

        Receiver type: C50E

        Mouse type: MX1000 Laser Cordless Mouse

        Connect button on mouse pressed: no

        Active RF Channel: 2

        Battery status: 7 (full)

        Cordless security ID: 0x0000

        Receiver talking: yes

        Lock Request (CONNECT button pressed): no

        Mouse Powerup (First time out of the box auto-locking): no

        Receiver Unlocked (Mouse disconnected): no

        Wait Lock (Searching for mouse): no

        Device physical shape type: 0

        SmartScroll (SMS): on

        USB Mouse Polling Interval:   2ms (default:  10ms)
```

----------

## KevinLarson

Changing it to 

```
Section "InputDevice"

    Identifier   "MX1000"

    Driver "evdev"

    Option "Name" "Logitech USB Receiver"

EndSection

```

didn't get me 12 buttons, but I'll try the emerge -uDN world

----------

## Doogman

I've just updated the HOWTO a bit, mostly around configuring option name.

Kevin, check for this in your /etc/make.conf:

INPUT_DEVICES="keyboard mouse evdev"

I'm not sure if evdev will be built into xorg if you don't specify it.  If that's your problem, this is obviously HOWTO fodder.  :Smile:   In any event, somehow evdev is almost certainly your problem as that is what handles the mouse buttons.

Purplerhino, the cryptic bit just seems to be a mask.  The nice part about it is that it seems to work with all mice, whereas the name option will have to be customized per mouse.  I've described both in the HOWTO.  On lomoco and resolution, does the MX1000 have multiple resolutions?

----------

## KevinLarson

I currently have:

INPUT_DEVICES="keyboard mouse evdev joystick"

Evdev is built in, not a module.  I've been trying to figure this out for a while.  If there are any files you would like to see (parts or the entire thing), I will happily show you them.

----------

## Doogman

Hmmmm.  This is a tough one.  :Smile: 

OK, you are using a MX1000 mouse, but what keyboard are you using?

The reason I ask is because of this from your # cat /proc/bus/input/devices output.

I: Bus=0003 Vendor=046d Product=c512 Version=3007

N: Name="Logitech USB Receiver"

P: Phys=usb-0000:03:00.1-1/input0

S: Sysfs=/class/input/input1

H: Handlers=kbd event1

B: EV=120003

B: KEY=1000000000007 ff800000000007ff febeffdfffefffff fffffffffffffffe

B: LED=1f 

From the Handler line, that looks like it's from the keyboard, but this:

I: Bus=0003 Vendor=046d Product=c50e Version=2510

N: Name="Logitech USB RECEIVER"

P: Phys=usb-0000:03:00.1-3/input0

S: Sysfs=/class/input/input5

H: Handlers=mouse2 event5

B: EV=7

B: KEY=ffff0000 0 0 0 0

B: REL=143 

looks like the mouse.  Notice the names are slightly different.  I think the name field is caps sensitive, so try it like this:

```

Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Name" "Logitech USB RECEIVER"

EndSection 

```

----------

## KevinLarson

Logitec lx500 (wireless keyboard/mouse duo).

I changed my xorg.conf to

```
Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Name" "Logitech USB RECEIVER"

EndSection

```

It seems like nothing changed and still works just like it did before.

----------

## cz0

The way I made it working:

I have a MX1000 mouse. First, it was connected to PS/2, but when I realized, that plug it to USB is match more easy then have lots of problems with it, so, I moved it to USB. In my make.conf I have:

```

blah-blah-blah

INPUT_DEVICES="keyboard mouse evdev"

blah-blah-blah

```

I have modular xorg 7.1, so, having this INPUT_DEVICES in make.conf you get support for evdev driver.

Now, xorg.conf:

```

Section "InputDevice"

    Identifier          "Mouse0"

    Driver              "evdev"

    Option              "Name"  "Logitech USB Receiver"

    Option              "Resolution"    "800"

    Option              "CorePointer"

EndSection

```

Make sure there no any Protocol and Device sections. So, X should start now and scroll should work very well.

To get all other buttons work you need xvkbd and xbindkeys (jast 'emerge xvkbd xbindkeys'). If you want to disable smartscroll (its a good idea IMHO) you need lomoco or lmctl. For example lomoco --no-sms. Now, start xev ,move pointer to the window and make sure, that all buttons work correctly and return there unique codes.

Now make .xbindkeysrc in you home dir and put this:

```

#forward and back bindings for side buttons

"/usr/bin/xvkbd -text "\[Alt_L]\[Left]""

  m:0x0 + b:8

"/usr/bin/xvkbd -text "\[Alt_L]\[Right]""

  m:0x0 + b:9

#PageUp anf PageDown bindings for cruise control

"/usr/bin/xvkbd -text "\[Page_Up]""

  m:0x0 + b:11

"/usr/bin/xvkbd -text "\[Page_Down]""

  m:0x0 + b:12

#Bindings for wheel left-right to switch tabs in opera

#and others. Configuration in programm is needed

"/usr/bin/xvkbd -text "\[Control_L]\[Page_Down]""

  m:0x0 + b:13

"/usr/bin/xvkbd -text "\[Control_L]\[Page_Up]""

#Thumb button. I use KDE, so I get window list to switch quickly

  m:0x0 + b:14

"/usr/bin/xvkbd -text "\[Alt_L]\[F5]""

  m:0x0 + b:10

```

All this should be reconfigured as you like.

Now, start xbindkeys -n -v and check how it works. If everything is OK, you can

add xbindkeys to your .xinitrc

----------

## purplerhino

 *Quote:*   

> Logitec lx500 (wireless keyboard/mouse duo). 

 

now i'm confused, do you have that or an mx1000?  because it looks like that mouse that's in that duo only has 8 or 9 buttons.

have you tried it with the weird config code up in the first post rather than the Option "Name" "Logitech USB RECEIVER" ?

 *Quote:*   

> On lomoco and resolution, does the MX1000 have multiple resolutions?

 

I dunno... it's no big whoop, I'm happy with how the mouse works right now, I was just curious.

----------

## KevinLarson

How exactly do I make sure there aren't Protocol and Device sections?  I posted my xorg.conf below because I think the problem is likely in it.  I have a mx1000 and the lx500.  I don't use the lx500 mouse.

```
# File generated by xorgconfig.

#

# Copyright 2004 The X.Org Foundation

#

# Permission is hereby granted, free of charge, to any person obtaining a

# copy of this software and associated documentation files (the "Software"),

# to deal in the Software without restriction, including without limitation

# the rights to use, copy, modify, merge, publish, distribute, sublicense,

# and/or sell copies of the Software, and to permit persons to whom the

# Software is furnished to do so, subject to the following conditions:

# 

# The above copyright notice and this permission notice shall be included in

# all copies or substantial portions of the Software.

# 

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL

# The X.Org Foundation BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF

# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

# SOFTWARE.

# 

# Except as contained in this notice, the name of The X.Org Foundation shall

# not be used in advertising or otherwise to promote the sale, use or other

# dealings in this Software without prior written authorization from

# The X.Org Foundation.

#

# **********************************************************************

# Refer to the xorg.conf(5x) man page for details about the format of 

# this file.

# **********************************************************************

# **********************************************************************

# Module section -- this  section  is used to specify

# which dynamically loadable modules to load.

# **********************************************************************

#

Section "Module"

# This loads the DBE extension module.

    Load        "dbe"     # Double buffer extension

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

    SubSection  "extmod"

      Option    "omit xfree86-dga"   # don't initialise the DGA extension

    EndSubSection

# This loads the font modules

    Load        "type1"

#    Load        "speedo"

    Load        "freetype"

#    Load        "xtt"

# This loads the GLX module

    Load       "glx"

# This loads the DRI module

#    Load       "dri"

EndSection

# **********************************************************************

# Files section.  This allows default font and rgb paths to be set

# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the

# file minus the extension (like ".txt" or ".db").  There is normally

# no need to change the default.

# Multiple FontPath entries are allowed (which are concatenated together),

# as well as specifying multiple comma-separated entries in one FontPath

# command (or a combination of both methods)

# 

# 

    FontPath   "/usr/share/fonts/misc/"

    FontPath   "/usr/share/fonts/TTF/"

    FontPath   "/usr/share/fonts/Type1/"

#    FontPath   "/usr/share/fonts/CID/"

    FontPath   "/usr/share/fonts/75dpi/"

    FontPath   "/usr/share/fonts/100dpi/"

    FontPath   "/usr/share/fonts/local/"

#    FontPath   "/usr/share/fonts/Speedo/"

#    FontPath   "/usr/share/fonts/TrueType/"

#    FontPath   "/usr/share/fonts/freefont/"

# The module search path.  The default path is shown here.

EndSection

# **********************************************************************

# Server flags section.

# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is 

# received.  This may leave the console in an unusable state, but may

# provide a better stack trace in the core dump to aid in debugging

#    Option "NoTrapSignals"

# Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence

# (where n is 1 through 12).  This allows clients to receive these key

# events.

#    Option "DontVTSwitch"

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence

# This allows clients to receive this key event.

#    Option "DontZap"

# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching

# sequences.  This allows clients to receive these key events.

#    Option "Dont Zoom"

# Uncomment this to disable tuning with the xvidtune client. With

# it the client can still run and fetch card and monitor attributes,

# but it will not be allowed to change them. If it tries it will

# receive a protocol error.

#    Option "DisableVidModeExtension"

# Uncomment this to enable the use of a non-local xvidtune client. 

#    Option "AllowNonLocalXvidtune"

# Uncomment this to disable dynamically modifying the input device

# (mouse and keyboard) settings. 

#    Option "DisableModInDev"

# Uncomment this to enable the use of a non-local client to

# change the keyboard or mouse settings (currently only xset).

#    Option "AllowNonLocalModInDev"

Option "Xinerama" "false"

EndSection

# **********************************************************************

# Input devices

# **********************************************************************

# **********************************************************************

# Core keyboard's InputDevice section

# **********************************************************************

Section "InputDevice"

    Identifier   "Keyboard1"

    Driver   "kbd"

# For most OSs the protocol can be omitted (it defaults to "Standard").

# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),

# uncomment the following line.

#    Option     "Protocol"      "Xqueue"

    Option "AutoRepeat" "500 30"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

     Option   "Xleds"      "1 2 3"

#    Option "LeftAlt"     "Meta"

#    Option "RightAlt"    "ModeShift"

# To customise the XKB settings to suit your keyboard, modify the

# lines below (which are the defaults).  For example, for a non-U.S.

# keyboard, you will probably want to use:

#    Option "XkbModel"    "pc105"

# If you have a US Microsoft Natural keyboard, you can use:

#    Option "XkbModel"    "microsoft"

#

# Then to change the language, change the Layout setting.

# For example, a german layout can be obtained with:

#    Option "XkbLayout"   "de"

# or:

#    Option "XkbLayout"   "de"

#    Option "XkbVariant"  "nodeadkeys"

#

# If you'd like to switch the positions of your capslock and

# control keys, use:

#    Option "XkbOptions"  "ctrl:swapcaps"

# These are the default XKB settings for Xorg

#    Option "XkbRules"    "xorg"

#    Option "XkbModel"    "pc105"

#    Option "XkbLayout"   "us"

#    Option "XkbVariant"  ""

#    Option "XkbOptions"  ""

#    Option "XkbDisable"

#    Option "XkbRules"   "xorg"

#    Option "XkbModel"   "pc105"

#    Option "XkbLayout"   "us"

EndSection

# **********************************************************************

# Core Pointer's InputDevice section

# **********************************************************************

Section "InputDevice"

    Identifier   "Mouse0"

    Driver "evdev"

    Option "Name" "Logitech USB RECEIVER"

EndSection 

#Section "InputDevice"

#    Identifier   "MX1000"

#    Driver "evdev"

#    Option "Name" "Logitech USB Receiver"

#EndSection 

# Section "InputDevice" 

#    Identifier  "Mouse2"

#    Driver      "mouse"

#    Option      "Protocol"      "MouseMan"

#    Option      "Device"        "/dev/mouse2"

# EndSection

#

# Section "InputDevice"

#    Identifier "spaceball"

#    Driver     "magellan"

#    Option     "Device"        "/dev/cua0"

# EndSection

#

# Section "InputDevice"

#    Identifier "spaceball2"

#    Driver     "spaceorb"

#    Option     "Device"        "/dev/cua0"

# EndSection

#

# Section "InputDevice"

#    Identifier "touchscreen0"

#    Driver     "microtouch"

#    Option     "Device"        "/dev/ttyS0"

#    Option     "MinX"          "1412"

#    Option     "MaxX"          "15184"

#    Option     "MinY"          "15372"

#    Option     "MaxY"          "1230"

#    Option     "ScreenNumber"  "0"

#    Option     "ReportingMode" "Scaled"

#    Option     "ButtonNumber"  "1"

#    Option     "SendCoreEvents"

# EndSection

#

# Section "InputDevice"

#    Identifier "touchscreen1"

#    Driver     "elo2300"

#    Option     "Device"        "/dev/ttyS0"

#    Option     "MinX"          "231"

#    Option     "MaxX"          "3868"

#    Option     "MinY"          "3858"

#    Option     "MaxY"          "272"

#    Option     "ScreenNumber"  "0"

#    Option     "ReportingMode" "Scaled"

#    Option     "ButtonThreshold"       "17"

#    Option     "ButtonNumber"  "1"

#    Option     "SendCoreEvents"

# EndSection

# **********************************************************************

# Monitor section

# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

    Identifier  "Dell"

    HorizSync   30-70

    VertRefresh 50-160

EndSection

# **********************************************************************

# Graphics device section

# **********************************************************************

# Any number of graphics device sections may be present

# Standard VGA Device:

Section "Device"

    Identifier   "Standard VGA"

    VendorName   "Unknown"

    BoardName   "Unknown"

    Driver     "vga"

EndSection

# Device configured by xorgconfig:

Section "Device"

    Identifier  "Geforce FX6800GT"

    Driver      "nvidia"

    VideoRam    262144

    Screen 0

Option     "TwinView"

    Option     "MetaModes"  "1600x1200,1280x1024: 1280x1024,1280x1024; 1280x1024; 1024x768,1024x768; 1024x768; 800x600,800x600; 800x600; 640x480,640x480; 640x480"

    Option     "TwinViewOrientation"      "RightOf"

    Option     "SecondMonitorHorizSync"      "UseEdidFreqs"

    Option     "SecondMonitorVertRefresh" "UseEdidFreqs"

#other options I recommend:

    Option     "RenderAccel"

    Option     "HWcursor"

    Option     "UseEdidFreqs" "True"

    Option     "CursorShadow"

    Option     "CursorShadowAlpha" "32"

    Option     "CursorShadowXOffset" "3"

    Option     "CursorShadowYOffset" "3"

#if you want Composite and GLX (they don't cooperate):

    Option     "AllowGLXWithComposite"

Option      "TVStandard" "NTSC-M"

Option      "TVOutFormat" "SVIDEO"

Option      "TVOverScan" "0.6"

#Option "ConnectedMonitor" "TV-0"

    

EndSection

# **********************************************************************

# Screen sections

# **********************************************************************

# Any number of screen sections may be present.  Each describes

# the configuration of a single screen.  A single specific screen section

# may be specified from the X server command line with the "-screen"

# option.

Section "Screen"

    Identifier  "Screen 1"

    Device      "Geforce FX6800GT"

    Monitor     "Dell"

    DefaultDepth 24

    Subsection "Display"

        Depth       8

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       16

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       24

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

EndSection

# **********************************************************************

# ServerLayout sections.

# **********************************************************************

# Any number of ServerLayout sections may be present.  Each describes

# the way multiple screens are organised.  A specific ServerLayout

# section may be specified from the X server command line with the

# "-layout" option.  In the absence of this, the first section is used.

# When now ServerLayout section is present, the first Screen section

# is used alone.

Section "ServerLayout"

# The Identifier line must be present

    Identifier  "Simple Layout"

# Each Screen line specifies a Screen section name, and optionally

# the relative position of other screens.  The four names after

# primary screen name are the screens to the top, bottom, left and right

# of the primary screen.  In this example, screen 2 is located to the

# right of screen 1.

    Screen 0 "Screen 1" 0 0

# Each InputDevice line specifies an InputDevice section name and

# optionally some options to specify the way the device is to be

# used.  Those options include "CorePointer", "CoreKeyboard" and

# "SendCoreEvents".

    #InputDevice "Logitech MX1000" "CorePointer"

    #InputDevice "Mouse0" "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"

EndSection

# Section "DRI"

#    Mode 0666

# EndSection

Section "Extensions"

   Option "Composite" "Enable"

EndSection

```

----------

## cz0

 *Quote:*   

> 
> 
> ```
> 
> Section "InputDevice" 
> ...

 

Looks like u are OK. What X seys?

----------

## purplerhino

yeah that's true, X giving you any errors?  grep EE /var/log/Xorg.log

----------

## KevinLarson

I still only have 9 buttons though, and don't see any EE in my log (other than the word screen).

----------

## Doogman

Now that we know what keyboard you have, the LX500, I think that your big problem is that you actually have two mice, the one that came with your keyboard and the MX1000.  I realize you are not using the mouse included with your keyboard, but it still shows up in evdev and I think that is the reason you are button-challenged with your MX1000.   I'm not sure if it's a bug in evdev or that we just can't hit on the correct configuration, but the LX500 is definitely the fly in the ointment here.

For instance, look at my setup:

doug@ghidorah ~ $ cat /proc/bus/input/devices 

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41

N: Name="AT Translated Set 2 keyboard"

P: Phys=isa0060/serio0/input0

S: Sysfs=/class/input/input0

H: Handlers=kbd event0 

B: EV=120013

B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe

B: MSC=10

B: LED=7

I: Bus=0003 Vendor=046d Product=c01e Version=2200

N: Name="Logitech USB-PS/2 Optical Mouse"

P: Phys=usb-0000:00:02.0-6/input0

S: Sysfs=/class/input/input1

H: Handlers=mouse0 event1 

B: EV=7

B: KEY=ff0000 0 0 0 0 0 0 0 0

B: REL=103

A PS/2 keyboard and a USB mouse.  Dead simple.  And it works.  :Smile:   But yours device list is much, much longer, mostly with stuff from that LX500, I guess.  If I was in your shoes, I would beg/borrow/steal a simple, non-multimedia keyboard (USB or PS/2) and try just that with your MX1000 following the setup procedure in the first post.  I would almost bet you will have no trouble getting all your mouse buttons working and THEN you can plug-in the LX500 monster again and still see if everything is working on the MX1000.

----------

## dura1198

I'd just like to stick my head in amidst the troubleshooting and say great walk through. Using an Mx518 and it is working great now. Thanks!!

----------

## purplerhino

yeah, as ugly as 

```

Section "InputDevice"

     Identifier  "Mouse0"

     Driver      "evdev"

     Option "evBits"  "+1-2"

     Option "keyBits" "~272-287"

     Option "relBits" "~0-2 ~6 ~8"

     Option "Pass"    "3"

EndSection 
```

is, it is working quite well.

----------

## twilight

hey folks,

thank u for ur hints and everything. Hopefully u can help me!!

Some of my buttons are behaving strange. The thumbbutton "back"

is working as right click, the application-switch-button is like

1st-mousebutton and stuff like that! the clone for mousewheelup is

pasting stuff in the clipboard AND is scrolling up.

So here is what i did, hopefully u have some hints for me how i can

manage my mousebuttons to work properly!

I`m using a laptop, so my touchpad AND my MX700 should work

parallel and the touchpad without the mx.

althoug cat /proc/bus/usb/devices outputs no name

```
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=046d ProdID=c506 Rev=16.00

S:  Manufacturer=Logitech

S:  Product=USB Receiver

C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 50mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

```

i can use the name as option in my xorg.conf and it works, touchpad and

mx700

```
Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "ImPS/2"

        Option      "Device" "/dev/input/mouse0"

EndSection

Section "InputDevice"

    Identifier   "Mouse1"

    Driver "evdev"

    Option "Name" "Logitech USB RECEIVER"

EndSection

```

xmodmap -pp outputs 9 useable buttons (thought i have 10?)

left, right, wheelclick, wheelup, wheeldown, scrolldown, scrollup, application-switch and the two thumb-buttons, i count 10...

```
There are 9 pointer buttons defined.

    Physical        Button

     Button          Code

        1              1

        2              2

        3              3

        4              4

        5              5

        6              6

        7              7

        8              8

        9              9

```

lomoco -i outputs 8 buttons, i think that is 10 -2 (the two clones of wheeldown and wheelup?!!)

```
noname thommy # lomoco -i

001.003: 046d:c506 Receiver for MX700 Optical Mouse (C-BF16-MSE) Caps: CSR SMS

        Receiver type: C506

        Mouse type: MX700 Cordless Optical Mouse (2ch)

        Connect button on mouse pressed: yes

        Active RF Channel: 1

        Battery status: 5 (good)

        Cordless security ID: 0x0036

        Receiver talking: yes

        Lock Request (CONNECT button pressed): no

        Mouse Powerup (First time out of the box auto-locking): no

        Receiver Unlocked (Mouse disconnected): no

        Wait Lock (Searching for mouse): no

        Device physical shape type: 1

        Device has two channels: yes

        Device supports 800 cpi: yes

        Device has horizontal roller: no

        Device has vertical roller: yes

        Number of buttons on device: 8

        SmartScroll (SMS): reporting not supported

        USB Mouse Polling Interval:  10ms

```

Any hints or tipps??

Thanks for anything!!

Your Thomas

----------

## ko-bahn

I'm having an issue with xvkbd. When it runs, the CPU goes to 100% and an error is displayed : "Warning: Missing charsets in String to FontSet conversion"

Any idea how to make it work ?

----------

## kirk427

 *twilight wrote:*   

> 
> 
> althoug cat /proc/bus/usb/devices outputs no name
> 
> 

 

you need to use

```
cat /proc/bus/input/devices
```

to find the name to use...

----------

## zajelo3

Thanks for the tutorial. I set everything up and it works great. Except when I was using

```
Section "InputDevice"

     Identifier  "Mouse0"

     Driver      "evdev"

     Option "evBits"  "+1-2"

     Option "keyBits" "~272-287"

     Option "relBits" "~0-2 ~6 ~8"

     Option "Pass"    "3"

EndSection
```

with ut2004 started and I would ping the servers, to see what maps are available for play, the cursor would freeze while the servers were being pinged. So I changed it to

```
Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "evdev"

   Option      "Name" "Logitech USB-PS/2 Optical Mouse"

EndSection 
```

since I have an mx518 also, and it works fine now. Thanks again.

----------

## Doogman

Thanks for the feedback!  Glad it helped you out a bit.

----------

## ATA

greetings,

first, thx

this howto was a great help for me.

second:

got a mx500, xev shows all buttons working so for that np.

i have sms disabled and lomoco -i shows me the settings i wanted.

but when it comes to the xbindkeysrc file i guess i made somethin wrong.

my thumbs buttons are 6 + 7 ,

my mouse wheel "press " button is 2, 

i want to have the button 2 press x

and the button 6 + 7 do page up and page down

xbindkeys -s shows me the correct cfg file.

here it is:

```

# thumbs buttons

"xvkbd -text "\[Page_Up]""

m:0x10 + b:6

"xvkbd -text "\[Page_Down]""

m:0x10 + b:7

# mousewheel button

"xvkbd -text "x""

m:0x10 + b:2

```

what happens when i press the button 2 :

the content of the clipboard gets posted (in the txt file i created for testing)

im not quite sure if its a KDE thing or from this programm.

any idea?

EDIT:::

never mind that post.

just got itself solved somehow.

its exactly working at it should.

sry for bothering.

----------

## Zero666

Hello there!

Since I made an update to Xorg 7.2, I don't get my MX1000 to work as before the update with the evdev driver.

First maybe I should say that the mouse ist part of the Cordless Desktop MX3000 with a cordless keyboard. Both is plugged via USB.

Before the update both works very well. All Buttons on the mouse and nearly all multimedia keys on the keyboard. Since the update the keyboard works nearly well as far as I tested it. But I don't get the mouse to work with the evdev driver. With the old 'mouse' driver it works, but I want to use evdev.

In my xorg.conf the InputSection for the mouse looks now like this:

```

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "evdev"

        Option      "Name" "Logitech USB Receiver"

EndSection

```

I also tested this:

```

Section "InputDevice" 

       Identifier  "Mouse0" 

       Driver      "evdev" 

       Option "evBits"  "+1-2" 

       Option "keyBits" "~272-287" 

       Option "relBits" "~0-2 ~6 ~8" 

       Option "Pass"    "3" 

EndSection

```

The output of cat /proc/bus/input/devices is like this:

```

I: Bus=0003 Vendor=046d Product=c512 Version=3007

N: Name="Logitech USB Receiver"

P: Phys=usb-0000:00:02.0-2/input0

S: Sysfs=/class/input/input0

H: Handlers=kbd event0

B: EV=120003

B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe

B: LED=1f

I: Bus=0003 Vendor=046d Product=c512 Version=3007

N: Name="Logitech USB Receiver"

P: Phys=usb-0000:00:02.0-2/input1

S: Sysfs=/class/input/input1

H: Handlers=kbd mouse0 event1

B: EV=7

B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0

B: REL=143

I: Bus=0010 Vendor=001f Product=0001 Version=0100

N: Name="PC Speaker"

P: Phys=isa0061/input0

S: Sysfs=/class/input/input2

H: Handlers=kbd event2

B: EV=40001

B: SND=6

```

After all I read the last few days this should work, but it don't.

I haven't found any errors in my Xorg.0.log but the following

```

(WW) <default pointer>: No Device specified, looking for one...

(II) <default pointer>: Setting Device option to "/dev/input/mice"

(--) <default pointer>: Device: "/dev/input/mice"

(==) <default pointer>: Protocol: "Auto"

(**) Option "AlwaysCore"

(**) <default pointer>: always reports core events

(==) <default pointer>: Emulate3Buttons, Emulate3Timeout: 50

(**) <default pointer>: ZAxisMapping: buttons 4 and 5

(**) <default pointer>: Buttons: 9

(II) XINPUT: Adding extended input device "<default pointer>" (type: MOUSE)

(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)

(II) XINPUT: Adding extended input device "Mouse0-usb-0000:00:02.0-2/input1" (type: KEYBOARD)

(II) XINPUT: Adding extended input device "Mouse0-usb-0000:00:02.0-2/input0" (type: KEYBOARD)

(II) XINPUT: Adding extended input device "evdev brain" (type: evdev brain)

(II) Mouse0-usb-0000:00:02.0-2/input0: Init

(**) Mouse0-usb-0000:00:02.0-2/input1: 4 valuators.

(**) evdev_btn.c (166): Registering 99 buttons.

(II) Mouse0-usb-0000:00:02.0-2/input1: Init

(II) evdev brain: Rescanning devices (2).

(II) Mouse0-usb-0000:00:02.0-2/input0: On

(II) Mouse0-usb-0000:00:02.0-2/input1: On

(--) <default pointer>: PnP-detected protocol: "ExplorerPS/2"

```

It looks for me that the evdev driver recognizes my mouse as a keyboard and not as a mouse. so Xorg creates a new default pointer. 

I don't know how I can solve this. I tried very much the last few days, but the result is always the same. I'm helpless.   :Sad: 

I hope anyone here can help me along.

Thx in advance

Z.

----------

## SeeksTheMoon

If you are using a Logitech G5 Mouse you may be interested in this: https://forums.gentoo.org/viewtopic-p-4228484.html#4228484

----------

