Bug 468502 - button does not work
button does not work
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-evdev (Show other bugs)
9
All Linux
medium Severity low
: ---
: ---
Assigned To: Peter Hutterer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-25 07:04 EDT by acount closed by user
Modified: 2008-11-16 19:44 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-16 19:44:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Xorg log (10.12 KB, text/plain)
2008-11-03 12:44 EST, acount closed by user
no flags Details
Xorg.0.log v2 (10.76 KB, text/plain)
2008-11-04 11:21 EST, acount closed by user
no flags Details
xorg.conf f9-original (741 bytes, text/plain)
2008-11-04 11:22 EST, acount closed by user
no flags Details
thumb button is 8, instead 2 (as in fedora 8, 7, 6 ..... ) (12.00 KB, text/plain)
2008-11-05 12:09 EST, acount closed by user
no flags Details
/proc/bus/input/devices (1.45 KB, text/plain)
2008-11-05 12:10 EST, acount closed by user
no flags Details

  None (edit)
Description acount closed by user 2008-10-25 07:04:20 EDT
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 19:51:45 EDT
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 12:42:24 EST
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 12:44:22 EST
Created attachment 322345 [details]
Xorg log
Comment 4 Peter Hutterer 2008-11-03 17:34:43 EST
(**) 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 11:21:53 EST
Created attachment 322443 [details]
Xorg.0.log v2
Comment 6 acount closed by user 2008-11-04 11:22:51 EST
Created attachment 322444 [details]
xorg.conf f9-original
Comment 7 Peter Hutterer 2008-11-04 18:38:33 EST
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 12:09:37 EST
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 12:10:17 EST
Created attachment 322615 [details]
/proc/bus/input/devices
Comment 10 acount closed by user 2008-11-05 12:16:35 EST
now left + right  buttons = 2

but thumb button = 8

Option "AllowEmptyInput" "on" does not help.

-thanks-
Comment 11 Peter Hutterer 2008-11-09 23:31:46 EST
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 11:57:06 EST
# 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 12:12:01 EST
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-10 19:21:14 EST
(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 06:33:59 EST
(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 17:46:42 EST
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-16 19:44:05 EST
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-

Note You need to log in before you can comment on or make changes to this bug.