Bug 6134

Summary: x11-drivers/xf86-input-mouse-1.0.4 weird behaviour of middle button click
Product: xorg Reporter: Marcel Lilienthal <marcel.lilienthal>
Component: Input/MouseAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: dberkholz, erik.andren
Version: 7.0.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
experimental ebuild to download evdev cvs none

Description Marcel Lilienthal 2006-03-05 11:43:41 UTC
under new modular X my usbmouse and my trackpoint behave weird, when switching
from X to console and back. 
when i start X the middle button of both devices produce normal double-click
events. when i switch to console and back to X, they produce double-click event
twice. this happens even when i disable the trackpoint.
after restarting X the behaviour is normal again.

this is a problem, because i have to switch to console to suspend to ram and
back to X when resuming. but it seems not to be a suspend2 problem, because the
weird behaviour is even there when switching to console and back to X without
suspending.

(the linux distribution i use is gentoo,so i filed the bug there first ...
http://bugs.gentoo.org/show_bug.cgi?id=124943)


--parts of my xorg.conf
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Mouse1" "SendCoreEvents"
        InputDevice    "Keyboard0" "CoreKeyboard"
        Option "BlankTime" "0"
        Option "StandbyTime" "0"
        Option "SuspendTime" "0"
        Option "OffTime" "5"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "PS/2"
        Option      "Device" "/dev/input/mice"
        Option      "EmulateWheel" "on"
        Option      "EmulateWheelButton" "2"
        Option      "ZAxisMapping" "4 5"
#        Option      "XAxisMapping" "6 7"
#        Option      "Emulate3Buttons" "off"
EndSection

Section "InputDevice"
        Identifier  "Mouse1"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
#        Option      "Emulate3Buttons" "off"
EndSection


--diff of Xorg.0.log before and after switching to console and back
(WW) I810(0): Successfully set original devices
> (II) I810(0): xf86UnbindGARTMemory: unbind key 7
> (II) I810(0): xf86UnbindGARTMemory: unbind key 0
> (II) I810(0): xf86UnbindGARTMemory: unbind key 1
> (II) I810(0): xf86UnbindGARTMemory: unbind key 3
> (II) I810(0): xf86UnbindGARTMemory: unbind key 2
> (II) I810(0): xf86UnbindGARTMemory: unbind key 4
> (II) I810(0): xf86UnbindGARTMemory: unbind key 5
> (II) I810(0): xf86UnbindGARTMemory: unbind key 6
> (WW) I810(0): Successfully set original devices (2)
> (II) I810(0): xf86BindGARTMemory: bind key 7 at 0x007df000 (pgoffset 2015)
> (II) I810(0): xf86BindGARTMemory: bind key 0 at 0x07fff000 (pgoffset 32767)
> (II) I810(0): xf86BindGARTMemory: bind key 1 at 0x07ffb000 (pgoffset 32763)
> (II) I810(0): xf86BindGARTMemory: bind key 3 at 0x07fea000 (pgoffset 32746)
> (II) I810(0): xf86BindGARTMemory: bind key 2 at 0x07ffa000 (pgoffset 32762)
> (II) I810(0): xf86BindGARTMemory: bind key 4 at 0x07c00000 (pgoffset 31744)
> (II) I810(0): xf86BindGARTMemory: bind key 5 at 0x07a00000 (pgoffset 31232)
> (II) I810(0): xf86BindGARTMemory: bind key 6 at 0x079f8000 (pgoffset 31224)
> (II) Loading sub module "ddc"
> (II) LoadModule: "ddc"
> (II) Reloading /usr/lib/xorg/modules/libddc.so
> (II) I810(0): VESA VBE DDC supported
> (II) I810(0): VESA VBE DDC Level none
> (II) I810(0): VESA VBE DDC transfer in appr. 0 sec.
> (II) I810(0): VESA VBE DDC read failed
> (II) I810(0): Display plane A is disabled and connected to Pipe A.
> (II) I810(0): Display plane B is enabled and connected to Pipe B.
> (II) I810(0): Enabling plane B.
> (II) I810(0): Display plane A is now disabled and connected to Pipe A.
> (II) I810(0): Display plane B is now enabled and connected to Pipe B.
> (II) I810(0): PIPEACONF is 0x80000000
> (II) I810(0): PIPEBCONF is 0x80000000
> (II) I810(0): Mode bandwidth is 47 Mpixel/s
> (II) I810(0): maxBandwidth is 1152 Mbyte/s, pipe bandwidths are 126 Mbyte/s, 0
Mbyte/s
> (II) I810(0): [drm] dma control initialized, using IRQ 11
> (II) Mouse1: ps2EnableDataReporting: succeeded
> (II) Mouse0: ps2EnableDataReporting: succeeded
Comment 1 Erik Andren 2006-03-09 08:23:52 UTC
Since /dev/input/mice is a hack anyway, try to set up your mouse and trackball
as separate devices and report back the results. 
Comment 2 Marcel Lilienthal 2006-03-09 21:02:47 UTC
ok, the bug only appears if one of both devices uses /dev/input/mice. 
when i use /dev/psaux for the trackpoint and
/dev/input/mouse1 for the usbmouse... its solved.

but if i start xserver without usbmouse and attach the usbmouse later, the
usbmouse doesnt work, because /dev/input/mouse1 doesnt exist at start of the
xserver.

is there another possibility to configure the usbmouse, that it doesnt have to be
attached at startup of X?
Comment 3 Erik Andren 2006-03-09 21:41:46 UTC
You can try and play with the evdev driver. Preferably the cvs version of it.
I belive it supports some basic hotplugging. 
 
Comment 4 Marcel Lilienthal 2006-03-09 21:44:26 UTC
forget comment#2

using /dev/psaux for trackpoint works. 
using /dev/input/mouse1 or /dev/input/mice for the usbmouse causes weird behaviour.
Comment 5 Marcel Lilienthal 2006-03-10 00:52:44 UTC
using the evdev driver for the usbmouse solves problem...

but a new problem arise:
AllowMouseOpenFail in ServerFlags has no function if i use evdev driver.
so the mouse has to be plugged when starting X.
i dont know if this is a gentoo bug. i use the gentoo xorg-x11 7.0 packages.
can't try cvs version of evdev with these packages, i think.

anyway, i leave the bug as resolved
Comment 6 Erik Andren 2006-03-10 04:19:23 UTC
Created attachment 4873 [details] [review]
experimental ebuild to download evdev cvs

This is an experimental ebuild I use to download and install the latest cvs
version of the evdev driver. YMMV!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.