From owner-freebsd-x11@FreeBSD.ORG Tue Mar 24 02:31:06 2009 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 533CD106564A; Tue, 24 Mar 2009 02:31:06 +0000 (UTC) (envelope-from scuppers@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id E6F0A8FC08; Tue, 24 Mar 2009 02:31:05 +0000 (UTC) (envelope-from scuppers@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so1463897ywh.13 for ; Mon, 23 Mar 2009 19:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=TMW3GYFVoUachiuHSp00cZ0myhZiCwcDge+R9z7QKJ4=; b=lSN9ejs2HtbeJ4ekGbYDYcZn4limmwtDebXSsCgQuSOLkVbbT7e+osOo9F45OrS7j2 25iIn5JedxME4mpJBVe9NaG2zTN4ELnIv5kE9fsWJOA1Mr2auF5ulHtRZvyln2rYnmBj mOhS3M0eqiOFTnBUErt1rxTzS9NwbGBRfqlWE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gAYEbjJ1HxxZF9MVrA/Nf2Hej/c6z0tJHVDG3E/hwf9MvwayU6AmohJddCTESObWQw oSs85dx/romA4o4yZ3CREt8mb2roKSQuCCZP/NpNp2MjxNzZdv7mcOtnqrYHeBAi0l4O sq8h5EUnoXvDvKLXvyWaU1jY3bpILPx2CQb6k= MIME-Version: 1.0 Received: by 10.231.15.130 with SMTP id k2mr2024931iba.3.1237861864175; Mon, 23 Mar 2009 19:31:04 -0700 (PDT) In-Reply-To: References: <1237431246.1738.71.camel@balrog.2hip.net> <49C1D545.6030505@phat.za.net> Date: Mon, 23 Mar 2009 22:31:03 -0400 Message-ID: From: Scott Spare To: Aragon Gouveia Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-x11@freebsd.org Subject: Re: X11 mouse driver and USB mouse disconnection X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2009 02:31:06 -0000 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 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 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 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 >>> >>> >> >