# mouse mx500/mx700 logitech issues

## nadsys

this topic is on several posts. some even saying they got it working. yet none are clear and the ones that are clear are still not working.

can someone with this kind of mouse please post every file + location for the rest of us to get this working.

i have imwheel emerged.  i took the config off another user on these forums to try to get it working but he didn't say where to put the file or what to do with it.

i run xev and all that works is the usual two buttons plus the two thumb buttons plus the press down of the wheel, scroll up or down dont work.  and the little two buttons next to wheel dont work.

please someone. past your files.  /etc/X11/xorg.conf + imwheel file if any + .xmodmap file (if your using it).

Thank You

i'll paste what i have just for info.

/etc/X11/xorg.conf:

Section "InputDevice"

# Identifier and driver

    Identifier  "Mouse1"

    Driver      "mouse"

    Option "Protocol" "ExplorerPS/2"

    Option "Device" "/dev/input/mice"

    Option "Buttons" "7"

    Option "ZAxisMapping" "6 7"

    Option "Name" "Logitech MX510"

    Option "Resolution" "800"

now following another guide he said to put this next section in the /etc/X11/xinit/xinitrc.d (no such file/folder, only xinitrc). anyway, i created file "mouse" like he said and chmod +x mouse:

contents of mouse file:

xmodmap -e "pointer = 1 2 3 6 7 4 5" &

imwheel -k -p -b "67" -f &

then i added in ~/.imwheelrc:

"(null)"

None,           Up,     Alt_L|Left              # Go back

None,           Down,   Alt_L|Right             # Go forward

Control_L,      Up,     Control_L|Page_Up       # Previous tab

Control_L,      Down,   Control_L|Page_Down     # Next tab

"^Firebird.*"

None,           Up,     Alt_L|Left              # Go back

None,           Down,   Alt_L|Right             # Go forward

Shift_L,        Up,     Control_L|Page_Up       # Previous tab

Shift_L,        Down,   Control_L|Page_Down     # Next tab

"^Firefox.*"

None,           Up,     Alt_L|Left              # Go back

None,           Down,   Alt_L|Right             # Go forward

Shift_L,        Up,     Control_L|Page_Up       # Previous tab

Shift_L,        Down,   Control_L|Page_Down     # Next tab

"^Mozilla.*"

None,           Up,     Alt_L|Left              # Go back

None,           Down,   Alt_L|Right             # Go forward

Shift_L,        Up,     Control_L|Page_Up       # Previous tab

Shift_L,        Down,   Control_L|Page_Down     # Next tab

"^Epiphany.*"

None,           Up,     Alt_L|Left              # Go back

None,           Down,   Alt_L|Right             # Go forward

Shift_L,        Up,     Control_L|Page_Up       # Previous tab

Shift_L,        Down,   Control_L|Page_Down     # Next tab

"^Dillo*"

None,           Up,     comma

None,           Down,   period

#last lines

".*"

None,           Up,     Alt_L|Left              # Go back

None,           Down,   Alt_L|Right             # Go forward

Control_L,      Up,     Control_L|Page_Up       # Previous tab

Control_L,      Down,   Control_L|Page_Down     # Next tab

----------

## firephoto

First off, forget imwheel till you get the mouse itself working, it will do nothing but screw things up till you get the basic mouse funtions set right. You need to have left, right, middle click as normal and scrolling up and down working as normal. Once that is accomplished and you get button events for the side buttons then you can map them to functions. It sounds like you are trying to get imwheel working before you get the mouse itself working. Imwheel is extra, it's one of a few programs to map your mouse buttons to different functions, it's not a mouse driver.

If you are using one of the later versions of xorg then you have evdev support, this is going to be the best way of making the most use out of your mouse and it's buttons. You need

"Device Drivers>Input Device support>*Event interface"

built in the kernel, it doesn't need to be a module.

Now you need your xorg.conf section to look similar to this for your mouse.

```

    Identifier   "Mouse1"

    Driver   "mouse"

    Option      "Protocol"      "evdev"

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

    Option      "Dev Phys"      "usb-*/input0"

    Option      "Device"        "/dev/input/event1"

    Option   "Buttons"   "8"

    Option      "ZAxisMapping"   "7 8"

    Option "Resolution"   "800"

```

Do a

```

cat /proc/bus/input/devices

```

And find the section that shows "mouse0" after "Handlers=" and put the relevant parts in the config listed above. You specifically need to set what "input#" it is and what "event#" it is and the name too.

Your xmodmap for this setup will be

```

pointer = 1 2 3 6 7 8 4 5

```

It doesn't matter where or how you set this with xmodmap but it has to be the ONLY time xmodmap is getting set. Anything you've changed or added from a default install should be removed. I have multiple xmodmap lines that need to get set so I have a ~/.Xmodmap file and I just have "xmodmap .Xmodmap" executed when my kde session starts. What I listed above is the first line in my .Xmodmap file.

That's it, the mouse will scroll and you have button events for all the buttons. Now you can use whatever method you'd like to make the extra button events perform an action. I just xvkbd and xbindkeys and the function is universal thoughout all applications and it's simple and works as expected.

----------

## nadsys

firstly, thank you for your reply.

i did what you said, recompiled kernel with event interface included in kernel.

i then changed xorg file to look like this:

Section "InputDevice"

    Identifier  "Mouse1"

    Driver "mouse"

    Option     "Protocol"    "ExplorerPS/2"

    Option     "Dev Name"    "PS/2 Logitech MX Mouse"

    Option     "Dev Phys"    "seriol/input0"

    Option     "Device"      "/dev/input/event7"

    Option "Buttons"     "8"

    Option     "ZAxisMapping" "7 8"

    Option "Resolution" "800"

EndSection

i tried to use the evdev protocol but it gave me an error about not finding it. 

i then did cat /proc/bus/input/devices:

I: Bus=0011 Vendor=0002 Product=0001 Version=0070

N: Name="PS/2 Logitech MX Mouse"

P: Phys=isa0060/serio1/input0

H: Handlers=mouse0

B: EV=7

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

B: REL=103

cross-referenced that with what i have above, looks fine to me, i hope.

then i have a go at startx.  i get these errors:

(II) initializing extension GLX

(EE) xf86OpenSerial: cannot open device /dev/input/event7

              no such file or directory

(EE) mouse1 cannot open input device

(EE) PreInit failed for input device "Mouse1"

no core pointer

fatal server error:

failed to initialize core devices

any idea's?

----------

## nadsys

ok, progressing:

I: Bus=0011 Vendor=0002 Product=0001 Version=0070

N: Name="PS/2 Logitech MX Mouse"

P: Phys=isa0060/serio1/input0

H: Handlers=mouse0 event0

B: EV=7

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

B: REL=103

i took it out of kernel and added it as module, kernel was not loading it for some reason.  so i now have event0 and event 1 in /dev/input/.

my file looks like this now:

Section "InputDevice"

    Identifier  "Mouse1"

    Driver "mouse"

    Option     "Protocol"    "IMPS/2"

    Option     "Dev Name"    "PS/2 Logitech MX Mouse"

    Option     "Dev Phys"    "isa0060/serio1/input0"

    Option     "Device"      "/dev/input/event0"

    Option "Buttons"     "8"

    Option     "ZAxisMapping" "7 8"

    Option "Resolution" "800"

EndSection

i have tried with ExplorerPS/2, i have tried now with IMPS/2 and evdev is still not seen as a protocol.  explorerps2 and imps at least allow X to start but the mouse just goes crazy after that, no control over it.

please advise, is there something else thats important to have in the kernel to get the mouse working?

(i dont know if this matters but i use a KVM(keyboard video mouse) for the two pc's.  it only accept PS2 style input so my usb mouse has a little adapter on it to go into the KVM. doubt it makes a diff but im not 100%)

----------

## nlightn

Maybe this will help.  I was pulling my hair out over the same thing, and found ditching imwheel was the best way to go.

----------

## nadsys

ok schbond, i followed your instructions to the letter, i think.

here is what i have:

Section "InputDevice"

# Identifier and driver

    Identifier  "Mouse1"

    Driver      "mouse"

    Option "Protocol" "ExplorerPS/2"

    Option "Device" "/dev/input/mice"

    Option "Buttons" "7"

    Option "ZAxisMapping" "6 7"

    Option "Name" "PS/2 Logitech MX Mouse"

    Option "Resolution" "800"

EndSection

roman@roman roman $ pwd

/home/roman

roman@roman roman $ ls -al

-rw-------   1 roman sshd  150 Sep 23 11:13 .Xauthority

-rw-r--r--   1 roman sshd    0 Sep 23 11:05 .Xmodmap

-rw-r--r--   1 root  root  122 Sep 23 10:53 .xbindkeysrc

-rw-r--r--   1 root  root   28 Sep 23 11:06 .xinitrc

(edited slightly for easier reading)

roman@roman X11 $ pwd

/etc/X11

roman@roman X11 $ ls -al

-rw-r--r--   1 root root    62 Sep 23 10:49 Xmodmap

drwxr-xr-x   2 root root  4096 Sep 22 18:08 xinit

-rw-r--r--   1 root root 14652 Sep 23 11:12 xorg.conf

(edited for easier reading)

contents of /etc/X11/Xmodmap:

pointer = 1 2 3 6 7 4 5

clear mod4

add mod4 = Super_L Super_R

contents of /home/roman/.xinitrc:

gnome-session

xmodmap /etc/X11/Xmodmap &

~/.xbindkeysrc. i CREATED that file but how does Xserver know to

execute it? did you run a one time command to fire it up? or is it

automatically detected by emerging those two xbind packages?

im no further back or forward from where i was.  still got main two

buttons working correctly. two thumb buttons working like mouse

button 1 and same for press down of mouse wheel.

any idea's?

----------

## nlightn

what method do you use to start X?  GDM, KDM, qingy, startx?  I think .xinitrc is only used if you type startx.

----------

## firephoto

 *nadsys wrote:*   

> 
> 
> I: Bus=0011 Vendor=0002 Product=0001 Version=0070
> 
> N: Name="PS/2 Logitech MX Mouse"
> ...

 

Sounds like your rebuilt the kernel but didn't copy your bzImage to /boot but it works as a module. Also this isn't going to work with your mouse plugged into the ps/2 port. You have to use USB, no USB>ps/2 adapters. That list above shows you are using a serial interface ?????

This is wrong, comments in the quote....

 *Quote:*   

> 
> 
> my file looks like this now:
> 
> ```
> ...

 

 *Quote:*   

> 
> 
> (i dont know if this matters but i use a KVM(keyboard video mouse) for the two pc's.  it only accept PS2 style input so my usb mouse has a little adapter on it to go into the KVM. doubt it makes a diff but im not 100%)

 

Yes this is the problem mentioned above, USB will be the only reliable method of making the mouse funtion like you want.

----------

## dtor

 *firephoto wrote:*   

> 
> 
> Sounds like your rebuilt the kernel but didn't copy your bzImage to /boot but it works as a module. Also this isn't going to work with your mouse plugged into the ps/2 port. You have to use USB, no USB>ps/2 adapters. That list above shows you are using a serial interface ????? 
> 
> 

 

Yes, serial. Not in /dev/ttyS01 sense tough. In 2.6 PS/2 ports are connected via so-called serio ports.

 *firephoto wrote:*   

> 
> 
> Yes this is the problem mentioned above, USB will be the only reliable method of making the mouse funtion like you want.

 

Ok, this is incorrect. As long as X uses evdev protocol and reads from /dev/input/eventX there should be no difference whether the mouse actually connected to USB or PS/2 port. See drivers/input/mouse/logips2pp.c - it supposed to handle PS2++ externded protocol just fine.

Now, the KVM switch - that's a different topic as it may simply not support anything byt Intellimouse protocol, so I'd recommend setting up the mouse without for starters.

----------

## dtor

 *nadsys wrote:*   

> ok, progressing:
> 
> I: Bus=0011 Vendor=0002 Product=0001 Version=0070
> 
> N: Name="PS/2 Logitech MX Mouse"
> ...

 

Good, the kernel is properly set up now.

 *nadsys wrote:*   

> 
> 
> Section "InputDevice"
> 
>     Identifier  "Mouse1"
> ...

 

If device specified in the config file is "/dev/input/eventX' then the only valid protocol is "evdev". The problem is that "evdev" protocol is somewhat recent addition to the X server (I don't see it in vanilla X.org 6.8.1) so you want to make sure that you have the latest one emerged (Gentoo's one pacthed with evdev support as far as I can see).

----------

## firephoto

I know that the ps2++ thingy exits but my understanding is that it's seperate from evdev, it's own driver of sorts and when I've asked before no one seems to know how to enable it's use.  :Wink: 

----------

## dtor

Ok, I guess i am somewhat familiar with the input layer so I'll try to explain how it all supposed to work. I am too lazy to draw a pictute, so here it goes...

In 2.6 there is a notion of serio ports - serial IO interface. There are drivers that implement serio interface, such as i8042 (standard PCkeyboard controller - PS/2 ports), serport (attaches to standard setial - tty - ports), pcips2 (PS/2 port found in one docking station), etc. You can see all of them in drivers/input/serio.

There are also drivers for devices that are attached to serio ports, such as atkbd (standard AT keyboard), xtkbd (XT keyboard), psmouse (PS/2 mouse, various flavors), sermouse (serial mouse attached to a serial port). When such driver binds to a serio port it creates and registers input device.

The same goes for USB host controller, ports and devices - when USB HID driver binds to an USB port it also registers an input device.

There are also input handlers - input handler converts events generated by input devices into some protocol. Currently following input handlers are implemented:

- keyboard - well, standard keyboadr driver that existed for ages

- mousedev - PS/2 protocol emulator - produces /dev/input/mouseX and /dev/input/mice. Input events from all compatible devices (mice, touchpads, trackpads, tablets, touchscreens, etc. etc) are converted to either bare PS/2 protocol, ImPS/2 protocol or ExplorerPS/2 protocol (depending on what application requests). Up to 5 buttons. This is nterface with legacy applications. Note that even serial mice data is presented as PS/2 when accessed through /dev/input/mouseX.

- tsdev - special protocol for touchscreens (/dev/input/tsX)

- joydev - legacy joystick protocol (dev/input/jsX)

- evdev - native 2.6 protocol. Access via /dev/input/eventX. Every enput event is transferred unmangled to the userspace for consumption therefore application knows all the details about input device state.

As you can see there is no difference for userspace when event comes from a PS/2 mouse or an USB one.

As far as PS++ protocol goes - it is provided by psmouse module, together with Synaptics, Expolorer, Intellimouse, netmouse and suun ALPS and Kensington protocols. These protocols are auto-probed so if a mouse supports particular protocol it will be selected, not special activation needed.

Hiope that helps.

----------

