# yet another mouse wheel problem

## mayday147

I know that this subject has been discussed like a million times before, but i didn't solved mine: I have a A4tech wheel mouse, who's wheel doesn't want to work. Although i solved it before, with "ZAxisMapping" "4 5" in my XF86Config file, now (after i did a rc-update add xdm default) it doesn't work again. 

   My XF86Config looks like this:

```

Identifier   "Mouse1"

    Driver   "mouse"

    Option "Protocol"    "IMPS/2"

    Option "Device"      "/dev/psaux"

    Option "ZAxisMapping" "4 5"

# Mouse-speed setting for PS/2 mouse.

```

I tried with different protocols and devices (psaux, mouse, input/mice) but nothing...

P.S. How can i get my touchpad know about tap or double-tap?

----------

## Jefklak

Working version:

```
Section "InputDevice"

   Identifier "USBMouse"

   Driver "mouse"

   Option "Protocol" "IMPS/2"

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

   Option "ZAxisMapping" "4 5" #scroll enablen

EndSection
```

Are you on udev?

Check :dev/input/mousex where x = 0 ~ 9 ?

If that also doesn't work, maybe it's the USB drivers? What kernel?

----------

## dtor

 *mayday147 wrote:*   

> 
> 
> P.S. How can i get my touchpad know about tap or double-tap?

 

psmouse.proto=bare or psmouse.proto=imps kernel options should enable tapping (or you could install synaptics driver from http://w1.894.telia.com/~u89404340/touchpad/ - I assume you have a synaptics touchpad).

----------

## mayday147

 *Jefklak wrote:*   

> Are you on udev?
> 
> Check :dev/input/mousex where x = 0 ~ 9 ?
> 
> If that also doesn't work, maybe it's the USB drivers? What kernel?

 

1. What's "udev"? 

1.I have /dev/input/mice and /dev/input/mouse0

3.It's not an USB mouse, it is a cheap PS/2 one (A4tech)

----------

## amborle

 *Jefklak wrote:*   

> Working version:
> 
> ```
> Section "InputDevice"
> 
> ...

 

That solved my problem! Thank you very much!

----------

## mayday147

you lucky one!  :Razz: 

Anyway, my wheel still doesn't work, but i discovered something:

if i do 

```
 rc-update del xdm 
```

and then 

```
reboot-> login root-> kdm
```

 my wheel works perfectly.

But if i add xdm as default and it starts in X then my wheel stops scrolling (it acts like a button though)

----------

## reasonant

I don't know if this will help, but I initially had that xdm/kdm problem. However now everything works - I can't say if this was the solution to the kdm/xdm issue as I changed rather a lot along the way - anyway this is my working solution.

```

Section "InputDevice" 

   Identifier  "USBMouse"

   Driver      "mouse"

   Option      "Protocol"      "IMPS/2"

   Option      "Device"        "/dev/psaux"

   Option      "Buttons"       "5"

   Option      "ZAxisMapping"  "4 5"

EndSection

Section "InputDevice"

    Identifier   "TouchPad"

    Driver   "mouse"

    Option "Protocol"    "PS/2"

    Option "Device"      "/dev/psaux"

EndSection

```

The most important part is this as it seems to let the touchpad and the USB mouse be friends and the touchpad still works when the usb mouse is gone:

```

    InputDevice "TouchPad" "CorePointer"

    InputDevice "USBMouse" "SendCoreEvents"

```

Incidently I also got the touchpad clicking and usb scrolling to work together by following the instructions at the site mentioned above by dtor. But I didn't like it so i don't use it. If you are interested this is what I used after installing the synaptics driver to do that.

```

#Section "InputDevice"

#  Driver     "synaptics"

#  Identifier     "TouchPad"

#  Option    "Device"     "/dev/psaux"

#  Option   "Protocol"   "auto-dev"

#  Option   "LeftEdge"      "1900"

#  Option   "RightEdge"     "5400"

#  Option   "TopEdge"       "1900"

#  Option   "BottomEdge"    "4000"

#  Option   "FingerLow"   "25"

#  Option   "FingerHigh"   "30"

#  Option   "MaxTapTime"   "180"

#  Option   "MaxTapMove"   "220"

#  Option   "VertScrollDelta" "100"

#  Option   "MinSpeed"   "0.02"

#  Option   "MaxSpeed"   "0.18"

#  Option   "AccelFactor" "0.0010"

#  Option   "SHMConfig"   "on"

#  Option   "Repeater"   "/dev/ps2mouse"

#EndSection

```

Hope that helps.

----------

## dtor

 *reasonant wrote:*   

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

 

I would not recommend doing the above as it will cause all events to be reported twice to the X (/dev/psaux is a synonym for /dev/iput/mice - cooked device that multiplexes events from all mouse-like input devices in the system - speaking of 2.6 of course).

Just drop the TouchPad entry, change device to "/dev/iput/mice" in USBmouse and mark it as core pointer in ServerLayout section. Do not worry about /dev/input/mice device disappearing when you unplug your USB mouse - it will stay there.

----------

## reasonant

Thanks - you are right that works - I originally I used that solution to be able to have touchpad tapping and usbmouse scrolling. Do you know how can I get that to work without reporting all the events twice?

Cheers

----------

## dtor

Since you did not like the native synaptics driver for XFree just pass psmouse.proto=bare to the kernel when booting. (Or pass proto=bare to the modprobe if psmouse is built as a module). It will only affect 'true' PS/2 devices and not your USB mouse. 

On the userspace side /dev/input/mice can produce either one of 3 protocols (PS/2, IMPS/2 or EXPS/2), depending on what apllication requests. The protcol is cooked and is not dependendent on underlying hardware. In other words, unless you are using special driver, like synaptics, always set protocol to IMPS/2 or ExplorerPS/2 in XF86Config.

----------

## reasonant

Thanks,

I am sorry - but I don't know how to pass an argument to the kernel - i guessed and  tried adding psmouse.proto=bare to the end of the kernel line in grub.conf - but that did nothing. Or do I need to change something XF86Config as well to get tapping to work?

Incidently if I did go back to the synaptics driver would adding the ZAxisMapping option to the Mouse section keep my usb mouse scroll wheel active?

----------

## mayday147

Indeed, that's how you pass a kernel boot argument, but try to write psmouse.proto=imps. It worked for me

----------

## dtor

 *reasonant wrote:*   

> ... I guessed and  tried adding psmouse.proto=bare to the end of the kernel line in grub.conf - but that did nothing.

 

That is the correct way of passing option to the kernel - assuming that psmouse is built in. Is it? If psmouse is a module you will need to add something like "option psmouse proto=bare" to your /etc/modprobe.conf

 *reasonant wrote:*   

> Incidently if I did go back to the synaptics driver would adding the ZAxisMapping option to the Mouse section keep my usb mouse scroll wheel active?

 

Yes it will. Leave the option in USBMouse section, uncomment the synaptics config section and add 

```
InputDevice "TouchPad" "SendCoreEvents"
```

 to the ServerLayout section.

----------

## reasonant

Thanks for all the help.

Yes psmouse is built in (assuming it comes from device drivers->input devices->PS/2 mouse in the 2.6 kernel setup) - unfortunately I tried both psmouse.proto=bare and psmouse.proto=imps and I could not get the mouse to 'click' when I tapped the touchpad. Maybe I was confused and you were only giving instructions on how to activate the touchpad not make it click upon tapping?

Anyway I decided give the synaptics drivers another try (I tried using the ~x86 version in portage and compling them from the source myself) and I got this error

```

(II) Loading /usr/X11R6/lib/modules/drivers/synaptics_drv.o

Elf_RelocateEntry() Unsupported relocation type 9

```

the error occurred many times in the XFree log and then it was followed by a whole lot of unreferenced symbols. Do you know what i did wrong? I have the 2.6.3 gentoo-dev-sources kernel, XFree-4.3.0-r5. I complied the evdev driver into the kernel and in XF86Config I just uncommented the code above for a synaptics driver and commented out the USBMouse.

Incidently, what is the difference between your solution for using the USB mouse and synaptics driver and the initial one I posted that caused all the events to be reported twice? The only differences I can see are that I called the TouchPad as the CorePointer and used SendCoreEvents for the USBMouse and you did the opposite. Or is the important difference that in your setup the touchpad will call the synaptics driver and the USBmouse will call the 'mouse' driver?

Thanks again

----------

## dtor

psmouse.proto parameter should enable tapping, I wonder why it does not. There were some patches in 2.6.5-rc2 that address tapping issue when using psmouse.proto=imps. Alternatively you can grab patches against 2.6.4 from http://www.geocities.com/dt_or/input/2_6_4/

Let me know if you have any luck with these.

As far as synaptics_drv failure to load I do not know what happened. Did you build it from the vanilla source or emerged it?

Finally, the differences between my setup and yours:

1. Devices are handled by 2 different drivers (synaptics and mouse)

2. Native Synaptics driver "grabs" the touchpad making sure that it does not transmit cooked PS/2 data through /dev/input/mice (aka /dev/psaux)

3. The synaptics driver cheats when using protocol "auto-dev". Instead of using device specified in config file it scans /dev/input/eventX looking for device corresponding to the touchpad.

Hope this helps.

----------

## reasonant

Thanks very much,

I upgraded my kernel to the gentoo-dev-sources-2.6.4-r1 kernel and I applied the all the patches for the 2.6.4 kernel from you website and passed psmouse.proto=imps to the kernel at boot time and now I have touchpad tapping. Thanks very much.

I tried to emerge synaptics and compile it from the vanilla sources - but I am giving up on that (I actually tried to used the straight vanilla kernel sources to see if the problem was with the gentoo-dev-sources and synaptics, but I screwed up something the bootsplash settings and I lost my entire display X and I had to fix the problem completely blind - no fun at all).

Thanks also for explaining correct setup - I will remember that next time I try the synaptics drivers.

Chris

----------

## kongit

with kernel 2.6.4 you don't need two different mouse drivers for synaptic touchpad and usb scroll mouse.  just set the dev to /dev/input/mice set the zaxisscrolling and set the protocol as imps/2 and the kernel can handle both the touchpad and the usb mouse with scrolling.  In other words you can get rid of one of the drivers.  I have a synaptic touchpad and this is one way to make it work with kernel 2.6.x.  However this way won't work with 2.4 kernel and either your touchpad or your mouse will work.  but once you go 2.6 you won't go backe  :Smile: 

----------

## dtor

 *kongit wrote:*   

> with kernel 2.6.4 you don't need two different mouse drivers for synaptic touchpad and usb scroll mouse.

 

Well, not exactly. Although events from almost every mouse-like device in 2.6 is available through /dev/input/mice it only provides data that can be encoded in ExplorerPS/2 protocol. Advanced driver, like synaptics, provide user with advanced features, such as:

- vertical and horizontal scrolling when moving finger alongside right or bottom edge of the touchpad;

- corner taps mapped to a certan button - like tapping in lower-right corner is equivalent of pressing right buttion;

- multi-finger taps - again tapping with 2 fingers at once is mapped to right click.

So saying that no other drivers is needed is not correct. it's just a matter of one's preference.

And other plus is that correctly configured setup with synaptics and standard mouse drivers is compatible with 2.4  :Smile: 

----------

