X11 mouse driver and USB mouse disconnection

Scott Spare scuppers at gmail.com
Wed Mar 18 22:48:34 PDT 2009


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 at 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 at 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
>>
>>
>


More information about the freebsd-x11 mailing list