Bug 468502

Summary: button does not work
Product: [Fedora] Fedora Reporter: acount closed by user <a1459440>
Component: xorg-x11-drv-evdevAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 9CC: xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-17 00:44:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Xorg log
none
Xorg.0.log v2
none
xorg.conf f9-original
none
thumb button is 8, instead 2 (as in fedora 8, 7, 6 ..... )
none
/proc/bus/input/devices none

Description acount closed by user 2008-10-25 11:04:20 UTC
hi,

It's a Logitech Cordless MouseMan Optical, and the thumb button(Emulate3Buttons) on the side does not work. On Fedora 8 works OK with the _same_ xorg.conf:

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "IMPS/2"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "yes"
EndSection

lsusb output: Bus 002 Device 003: ID 046d:c501 Logitech, Inc. Cordless Mouse Receiver

-thanks-

regards,

Comment 1 Peter Hutterer 2008-10-26 23:51:45 UTC
in f9, mice are picked up by the evdev driver instead of the mouse driver. evdev does have 3 button emulation so it's strange that it doesn't work.

Please provide your Xorg.log, and the output of xev when you click the side button in the xev window. Thanks.

Comment 2 acount closed by user 2008-11-03 17:42:24 UTC
done.

Fedora 8:

left   buttom = 1
wheel  buttom = 2
right  buttom = 3
thumb  buttom = 2****
left + right  = 2****

Fedora 9:

left   buttom = 1
wheel  buttom = 2
right  buttom = 3
thumb  buttom = 8****
left + right  = does not work****

**** diferent between F8 and F9


sorry, "nvidia" binary driver here. Because "nv" does _not_ work with NVIDIA GPU GeForce 7050 / NVIDIA nForce 620i (C73).

The same was happening in my old PC(now dead) with ati_9500 + xorg radeon driver.

-thanks-

Comment 3 acount closed by user 2008-11-03 17:44:22 UTC
Created attachment 322345 [details]
Xorg log

Comment 4 Peter Hutterer 2008-11-03 22:34:43 UTC
(**) Mouse0: always reports core events
(**) Mouse0: Device: "/dev/input/mice"
(EE) Grab failed. Device already configured?
(II) UnloadModule: "evdev"
(EE) PreInit returned NULL for "Mouse0"


do you have a section with evdev for mouse0? because that output doesn't look like it was generated by the xorg.conf excerpt from Comment #1. 
Please attach your full xorg.conf. you can't point the evdev driver at /dev/input/mic, it won't work.

also, please attach your full xev log, not a summary. sometimes the issues are hidden in the details.

Comment 5 acount closed by user 2008-11-04 16:21:53 UTC
Created attachment 322443 [details]
Xorg.0.log v2

Comment 6 acount closed by user 2008-11-04 16:22:51 UTC
Created attachment 322444 [details]
xorg.conf f9-original

Comment 7 Peter Hutterer 2008-11-04 23:38:33 UTC
still don't see any reason why it shouldn't work.
Please run xev and press the buttons that don't work. After that, please attach the (complete) output of xev here. If they don't show any events in xev, don't bother attaching.

And attach /proc/bus/input/devices as well please, or at least the section that includes the logitech receiver. 

Finally, try to add Option "AllowEmptyInput" "on" to the ServerLayout and see if that helps.

Comment 8 acount closed by user 2008-11-05 17:09:37 UTC
Created attachment 322614 [details]
thumb button is 8, instead 2 (as in fedora 8, 7, 6 ..... )

Comment 9 acount closed by user 2008-11-05 17:10:17 UTC
Created attachment 322615 [details]
/proc/bus/input/devices

Comment 10 acount closed by user 2008-11-05 17:16:35 UTC
now left + right  buttons = 2

but thumb button = 8

Option "AllowEmptyInput" "on" does not help.

-thanks-

Comment 11 Peter Hutterer 2008-11-10 04:31:46 UTC
argh, my fault, sorry. AllowEmptyInput "off" was what I meant, that should load the mouse driver instead of evdev.

so, kernel says mouse has LMR, Side and Extra button. Side and extra should show up as buttons 8 and 9, in theory anyway.


I'm a bit unsure now what exact problem we are chasing up? It reads to me that you want the thumb button (currently button 8) to work as middle mouse button? Is that correct? If so, you can just do that by running xmodmap -e "pointer=1 0 3 0 0 0 0 2"

If that's not the issue, please rephrase the problem. It might also be good to  get http://people.freedesktop.org/~whot/evtest.c, compile it up and run it against /dev/input/event4 (this should be the Logitech usb receiver). Please attach the output here when you press the extra button.

Note: you must VT switch away from X, otherwise it won't work.

Comment 12 acount closed by user 2008-11-10 16:57:06 UTC
# xmodmap -e "pointer = 1 2 3 4 5 6 7 8" is OK but:
# xmodmap -e "pointer=1 0 3 0 0 0 0 2"
xmodmap:  unknown command on line commandline:1
xmodmap:  1 error encountered, aborting.

xmodmap does not likes "0"

Comment 13 acount closed by user 2008-11-10 17:12:01 UTC
the bug or 'new' feature is that in Fedora 9 thumb button is "8" but in Fedora 8 and 7 and 6..... it was "2"

Fedora 8:
wheel  button = 2 and
thumb button = 2

Fedora 9:
wheel  button = 2 and
thumb button = 8

I do want: xmodmap -e "pointer = 1 2 3 4 5 6 7 2" 

The "wheel" and "thumb" buttons = 2 as always.

-thanks-

Comment 14 Peter Hutterer 2008-11-11 00:21:14 UTC
(In reply to comment #13)
> I do want: xmodmap -e "pointer = 1 2 3 4 5 6 7 2" 

Unfortunately, the core protocol doesn't allow that. Two buttons can't be mapped to the same button number, so you have to do 1 8 3 4 5 6 7 2 (this means your current middle button gets mapped to button 8) or unset the other button.

(In reply to comment #12)
> xmodmap does not likes "0"

yeah, I just looked at the source and it thinks that 0 is followed by an octal number. xmodmap -e "pointer = 1 00 3 4 5 6 7 2" gets you there. Does that work for you?

Comment 15 acount closed by user 2008-11-16 11:33:59 UTC
(In reply to comment #14)

> Unfortunately, the core protocol doesn't allow that. Two buttons can't be
> mapped to the same button number, so you have to do 1 8 3 4 5 6 7 2 (this means
> your current middle button gets mapped to button 8) or unset the other button.

I changed, in Fedora 9, to mouse_drv.so, instead evdev_drv.so, and still it does not configure the buttons as before.

How is possible that in Fedora 8 and older distributions with mouse_drv.so it was working ? 

The diff between f9-mouse_drv and f8-mouse_drv source code is *minimal*

> yeah, I just looked at the source and it thinks that 0 is followed by an octal
> number. xmodmap -e "pointer = 1 00 3 4 5 6 7 2" gets you there. Does that work
> for you?

Yes, 00 is valid.

-thanks-

Comment 16 Peter Hutterer 2008-11-16 22:46:42 UTC
F9 still loads the evdev driver even if you configure the mouse driver. You have to pass option AutoAddDevices "off" to the ServerLayout to avoid this.

There's two different places to do button mapping: you can do it in the driver (i.e. through options in your config) or in the server. If you map options in the driver, you can rearrange buttons but the server (and clients) still think it's the original mapping. You can't change this at runtime either.
evdev 2.0 doesn't have this button mapping option, evdev 2.1 does though and will be available soon (prob as zero-day update).

Button mapping in the server (through protocol requests, e.g. xmodmap) can be changed at runtime but has the restriction that you can't have two physical buttons mapped to the same logical button.

Comment 17 acount closed by user 2008-11-17 00:44:05 UTC
Option "AutoAddDevices" "off" fixed it.

Now the "thumb" button is 2, and also the "wheel" button. It works as always(Fedora 8, 7, 6....)

If evdev_drv is unable to work as mouse_drv did it (asign two phisical buttons to one virtual) is _broken_ and it should be fixed or removed.

-thanks-