From owner-freebsd-x11@FreeBSD.ORG Tue May 15 14:28:23 2012 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 DB3011065676 for ; Tue, 15 May 2012 14:28:23 +0000 (UTC) (envelope-from rflynn@acsalaska.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id A143C8FC08 for ; Tue, 15 May 2012 14:28:23 +0000 (UTC) Received: from [127.0.0.1] (squeeze.lan.rachie.is-a-geek.net [192.168.2.30]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 32B7F7E88E; Tue, 15 May 2012 06:28:21 -0800 (AKDT) Message-ID: <4FB26802.7090505@acsalaska.net> Date: Tue, 15 May 2012 16:28:18 +0200 From: Mel Flynn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Kevin Oberman References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-x11@freebsd.org Subject: Re: Odd mouse issue with new xorg-server 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, 15 May 2012 14:28:23 -0000 On 26-4-2012 4:30, Kevin Oberman wrote: > I hit a weird one with the new xorg-server. I have previously been > running the xorg-devel from about 4or 5 months ago, so it's something > that has happened since then. > > After updating to the new xorg, my mouse was dead. I looked at the log > and found: > (II) config/hal: Adding input device PS/2 Mouse > (II) LoadModule: "mouse" > (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so > (II) Module mouse: vendor="X.Org Foundation" > compiled for 1.7.7, module version = 1.7.1 > Module class: X.Org XInput Driver > ABI class: X.Org XInput driver, version 7.0 > (WW) PS/2 Mouse: No Device specified, looking for one... > (II) PS/2 Mouse: Setting Device option to "/dev/psm0" > (--) PS/2 Mouse: Device: "/dev/psm0" > (==) PS/2 Mouse: Protocol: "Auto" > (**) PS/2 Mouse: always reports core events > (**) Option "Device" "/dev/psm0" > (EE) xf86OpenSerial: Cannot open device /dev/psm0 > Device busy. > (EE) PS/2 Mouse: cannot open input device > (II) UnloadModule: "mouse" > (EE) PreInit returned NULL for "PS/2 Mouse" > (EE) config/hal: NewInputDeviceRequest failed (8) > > But I have the following in xorg.conf: > Section "InputDevice" > Identifier "Mouse0" > Driver "mouse" > Option "Protocol" "auto" > Option "Device" "/dev/sysmouse" > Option "ZAxisMapping" "4 5 6 7" > EndSection > > If I simply remove my xorg.conf, it works fine. I tried 'Xorg > -configure', but that failed to write an output file. > > Any idea what is going on? It is OK on this system as it is fine with > no config file, but my two-headed work system is likely to require a > config, so I am worried about hitting it there. +Me too and analysis: hald provides the mouse, however the mouse_drv.so randomly probes protocols. There's no way to hint at the protocol in the xorg.conf (bug!) because the entire input sections are skipped when AutoAddDevices (hald) is in effect. I'm saying random, cause there's really no set order in which protocols are tried and I may have to startx several times for the driver to settle on sysmouse. Disabling moused mitigates the issue, since the device node won't be busy. Real solution is to alter mouse_drv's scanning order on FreeBSD to be sysmouse first, ps/2 second, then the rest and serial last. This should do the right thing for most of the installations. Secondly, there needs to be a way to give protocol hints in xorg.conf in the cases that aforementioned logic does not work. Thirdly mousedrv should take a look at hald's advice. Opening a serial mouse driver on something classified as 'info.product = PS/2 Mouse' does not strike me as logical. Also, the input.device = /dev/sysmouse, should trigger SysMouse protocol. -- Mel