Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2009 22:31:03 -0400
From:      Scott Spare <scuppers@gmail.com>
To:        Aragon Gouveia <aragon@phat.za.net>
Cc:        freebsd-x11@freebsd.org
Subject:   Re: X11 mouse driver and USB mouse disconnection
Message-ID:  <daaab7120903231931m3b0136baw228bce9433f5c226@mail.gmail.com>
In-Reply-To: <daaab7120903182248s5abe617cpa1d1032139ba11f8@mail.gmail.com>
References:  <daaab7120903181736n6c9287e2j5bcbfe1e103bdc0c@mail.gmail.com> <1237431246.1738.71.camel@balrog.2hip.net> <49C1D545.6030505@phat.za.net> <daaab7120903182237j5cf411e5xe2a850066229b9e7@mail.gmail.com> <daaab7120903182248s5abe617cpa1d1032139ba11f8@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Good news everyone.
The problem of high CPU on mouse disconnect after enabling dbus and hald
magically fixed itself after a portupgrade on xorg-apps (from 7.3 to 7.4 I
think).

So if you've got a KVM switch, and it's giving you headaches, including
unexplained high-CPU usage, or having to switch virtual TTYs to get it
working right, the fix might be to make sure hald and dbus are enabled, then
to make sure xorg-apps and its dependencies are updated.  In my case, it's
possible it was an old library lurking in there someplace.

By the way, I noticed there's a nice tool called xinput for troubleshooting
input issues.  More info on X hotplugging of input devices here:
http://www.x.org/wiki/XInputHotplug

And more info on the xorg-apps port here:
http://www.freshports.org/x11/xorg-apps/

Thanks once again,
Scott
http://www.scottspare.com

On Thu, Mar 19, 2009 at 1:48 AM, Scott Spare <scuppers@gmail.com> wrote:

> One interesting side effect: top reports continual high CPU usage (>65%) on
> the Xorg process for many minutes after the mouse unplug-replug event.  I
> haven't left it alone for long enough to see whether it ever dies down, but
> can confirm it sticks at around 65% for 10 minutes.  Interestingly, the CPU
> usage drops to single digits when I switch to a console virtual TTY then
> switch back to Xorg.  No other programs are running from within X.
>
> Here's a full unplug-replug event from Xorg.0.log:
>
>
> (**) USB-PS/2 Optical Mouse: Device: "/dev/ums0"
> (==) USB-PS/2 Optical Mouse: Protocol: "Auto"
> (**) USB-PS/2 Optical Mouse: always reports core events
> (**) Option "Device" "/dev/ums0"
> (==) USB-PS/2 Optical Mouse: Emulate3Buttons, Emulate3Timeout: 50
> (**) USB-PS/2 Optical Mouse: ZAxisMapping: buttons 4 and 5
> (**) USB-PS/2 Optical Mouse: Buttons: 9
> (**) USB-PS/2 Optical Mouse: Sensitivity: 1
> (II) XINPUT: Adding extended input device "USB-PS/2 Optical Mouse" (type:
> MOUSE)
> (II) USB-PS/2 Optical Mouse: SetupAuto: hw.iftype is 5, hw.model is 0
> (II) USB-PS/2 Optical Mouse: SetupAuto: protocol is SysMouse
> (WW) fcntl(24, O_ASYNC): Inappropriate ioctl for device
> (II) UnloadModule: "mouse"
>
> I'll see if I can find anything else.  Thanks once again - this is the
> closest this has been to working in quite a while.
>
> Scott
>
>
>
>
> On Thu, Mar 19, 2009 at 1:37 AM, Scott Spare <scuppers@gmail.com> wrote:
>
>> Aragon and Robert,
>> Fantastic.  Thank you.
>>
>> The fix in my case:
>> Exactly as you guys mentioned, hald needed to be enabled.
>> This system was upgraded from an older version - my guess is I missed
>> enabling hald while running mergemaster during an upgrade.
>>
>> The details:
>> I added
>> hald_enable="YES"
>> to /etc/rc.conf
>>
>> and then tried running hald by issuing this command:
>> /usr/local/etc/rc.d/hald start
>>
>> I got errors saying dbus wasn't properly configured either, so I did the
>> same for it.
>> Added
>> dbus_enable="YES"
>> to /etc/rc.conf
>> and started dbus and hald.
>>
>> Works like a champ.  Thanks!
>>
>> Scott
>> http://www.scottspare.com
>>
>>
>>
>> On Thu, Mar 19, 2009 at 1:16 AM, Aragon Gouveia <aragon@phat.za.net>wrote:
>>
>>> Robert Noland wrote:
>>>
>>>> Particularly for your situation, I would not disable AutoAddDevices or
>>>> AllowEmptyInput.  At the very least, you need AutoAddDevices at its
>>>> default value and hald running.
>>>>
>>>
>>> FWIW, I run Xorg with a static config, AutoAddDevices/AutoEnableDevices
>>> both disabled, hald enabled and moused enabled.  I unplug and replug my
>>> mouse without problems.
>>>
>>> When I unplug my mouse and moused exits, /dev/sysmouse doesn't disappear.
>>>
>>> So maybe something else is going wrong...
>>>
>>>
>>> Regards,
>>> Aragon
>>>
>>>
>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?daaab7120903231931m3b0136baw228bce9433f5c226>