From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Apr 2 23:46:53 2008 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 6FDE0106566B; Wed, 2 Apr 2008 23:46:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Warren Block Date: Wed, 2 Apr 2008 19:46:41 -0400 User-Agent: KMail/1.6.2 References: <200804020055.m320tEKh075558@freefall.freebsd.org> <200804021717.52043.jkim@FreeBSD.org> In-Reply-To: <200804021717.52043.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_jrB9Hk4xV9N2vHd" Message-Id: <200804021946.43074.jkim@FreeBSD.org> Cc: freebsd-ports-bugs@freebsd.org, freebsd-x11@FreeBSD.org Subject: Re: ports/122363: x11-servers/xorg-server 1.4_7, 1 locks up on mouse detection X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2008 23:46:53 -0000 --Boundary-00=_jrB9Hk4xV9N2vHd Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 02 April 2008 05:17 pm, Jung-uk Kim wrote: > On Wednesday 02 April 2008 04:29 pm, Warren Block wrote: > > On Wed, 2 Apr 2008, Jung-uk Kim wrote: > > > Nothing seems obviously wrong to me. :-( In fact, I was not > > > able to replicate the problem, i.e., hal, xorg-server, USB > > > mouse, PS/2 mouse, and moused on /dev/ums0. Is moused running > > > on /dev/ums0 and/or /dev/psm0? > > > > > > ps -p `pgrep -x moused` > > > > > > If not, please add the following line in /etc/rc.conf and > > > reboot: > > > > > > moused_enable="YES" > > > > moused_enable was "NO", and enabling it fixes the problem, > > allowing xorg-server to continue startup. > > > > The new requirement for moused should be mentioned in > > /usr/ports/UPDATING. > > > > The combination of moused disabled, hald, and xorg-server 1.4_7 > > stops/locks on mouse detection and prevents keyboard console > > switching. That seems like a bug. > > > > New xorg log XINPUT section: > > > > (II) evaluating device (Keyboard0) > > (II) XINPUT: Adding extended input device "Keyboard0" (type: > > KEYBOARD) (II) evaluating device (Mouse0) > > (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE) > > (II) Mouse0: SetupAuto: hw.iftype is 4, hw.model is 0 > > (II) Mouse0: SetupAuto: protocol is SysMouse, level is 1 > > ...and continues on, unlike the earlier log. > > Good. If you still want to turn off moused on /dev/psm0, you may > try to specify mouse protocol in /etc/xorg.conf because your mouse > does not work with PS/2 protocol and auto-detection does not work > for you. Can you test the attached patch without moused? Thanks, Jung-uk Kim --Boundary-00=_jrB9Hk4xV9N2vHd Content-Type: text/x-diff; charset="iso-8859-1"; name="xorg-server.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xorg-server.diff" --- xorg-server/files/patch-Xserver-hw-xfree86-os-support-bsd-bsd_mouse.c 2008-03-28 13:49:26.000000000 -0400 +++ xorg-server/files/patch-Xserver-hw-xfree86-os-support-bsd-bsd_mouse.c 2008-04-02 19:27:08.000000000 -0400 @@ -1,5 +1,5 @@ --- hw/xfree86/os-support/bsd/bsd_mouse.c.orig 2007-08-23 15:05:48.000000000 -0400 -+++ hw/xfree86/os-support/bsd/bsd_mouse.c 2008-03-28 13:49:17.000000000 -0400 ++++ hw/xfree86/os-support/bsd/bsd_mouse.c 2008-04-02 19:27:04.000000000 -0400 @@ -1,4 +1,3 @@ - /* @@ -21,7 +21,40 @@ NULL }; #elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT) -@@ -184,6 +187,7 @@ +@@ -101,7 +104,7 @@ + #if defined(__NetBSD__) + return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO; + #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +- return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; ++ return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO | MSE_MISC; + #else + return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; + #endif +@@ -180,10 +183,30 @@ + { MOUSE_PROTO_THINK, "ThinkingMouse" }, + { MOUSE_PROTO_SYSMOUSE, "SysMouse" } + }; +- ++ ++static struct { ++ int dmodel; ++ char *name; ++} ps2proto[] = { ++ { MOUSE_MODEL_NETSCROLL, "NetScrollPS/2" }, ++ { MOUSE_MODEL_NET, "NetMousePS/2" }, ++ { MOUSE_MODEL_GLIDEPOINT, "GlidePointPS/2" }, ++ { MOUSE_MODEL_THINK, "ThinkingMousePS/2" }, ++ { MOUSE_MODEL_INTELLI, "IMPS/2" }, ++ { MOUSE_MODEL_MOUSEMANPLUS, "MouseManPlusPS/2" }, ++ { MOUSE_MODEL_VERSAPAD, "PS/2" }, ++ { MOUSE_MODEL_EXPLORER, "ExplorerPS/2" }, ++ { MOUSE_MODEL_4D, "IMPS/2" }, ++ { MOUSE_MODEL_4DPLUS, "IMPS/2" }, ++ { MOUSE_MODEL_SYNAPTICS, "PS/2" }, ++ { MOUSE_MODEL_GENERIC, "PS/2" }, ++ { MOUSE_MODEL_UNKNOWN, "PS/2" }, ++}; ++ static const char * SetupAuto(InputInfoPtr pInfo, int *protoPara) { @@ -29,7 +62,7 @@ int i; mousehw_t hw; mousemode_t mode; -@@ -192,9 +196,12 @@ +@@ -192,17 +215,20 @@ return NULL; /* set the driver operation level, if applicable */ @@ -45,18 +78,46 @@ /* interrogate the driver and get some intelligence on the device. */ hw.iftype = MOUSE_IF_UNKNOWN; hw.model = MOUSE_MODEL_GENERIC; -@@ -210,8 +217,8 @@ + ioctl(pInfo->fd, MOUSE_GETHWINFO, &hw); + xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: hw.iftype is %d, hw.model is %d\n", + pInfo->name, hw.iftype, hw.model); +- if (ioctl(pInfo->fd, MOUSE_GETMODE, &mode) == 0) { +- for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); ++i) { ++ if (ioctl(pInfo->fd, MOUSE_GETMODE, &mode) == 0) ++ for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); ++i) + if (mode.protocol == devproto[i].dproto) { + /* override some parameters */ + if (protoPara) { +@@ -210,11 +236,25 @@ protoPara[0] = mode.syncmask[0]; protoPara[1] = mode.syncmask[1]; } -- xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", ++ if (mode.protocol != MOUSE_PROTO_PS2) { ++ xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", ++ pInfo->name, devproto[i].name); ++ return devproto[i].name; ++ } ++ break; ++ } ++ ++ /* set extended PS/2 protocol */ ++ if (mode.protocol == MOUSE_PROTO_PS2) { ++ i = 2; ++ ioctl(pInfo->fd, MOUSE_SETLEVEL, &i); ++ ioctl(pInfo->fd, MOUSE_GETHWINFO, &hw); ++ for (i = 0; i < sizeof(ps2proto)/sizeof(ps2proto[0]); ++i) ++ if (hw.model == ps2proto[i].dmodel) { + xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", - pInfo->name, devproto[i].name); -+ xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s, level is %d\n", -+ pInfo->name, devproto[i].name, mode.level); - return devproto[i].name; +- return devproto[i].name; ++ pInfo->name, ps2proto[i].name); ++ return ps2proto[i].name; } - } -@@ -222,6 +229,7 @@ +- } + } + return NULL; + } +@@ -222,6 +262,7 @@ static void SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res) { @@ -64,7 +125,7 @@ mousemode_t mode; MouseDevPtr pMse; -@@ -231,11 +239,11 @@ +@@ -231,11 +272,11 @@ mode.resolution = res > 0 ? res : -1; mode.accelfactor = -1; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) @@ -79,7 +140,7 @@ * this point. */ mode.level = 1; -@@ -249,27 +257,29 @@ +@@ -249,27 +290,29 @@ #endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) @@ -122,7 +183,7 @@ } return FALSE; } -@@ -309,15 +319,12 @@ +@@ -309,15 +352,12 @@ devMouse = FALSE; } close(fd); --Boundary-00=_jrB9Hk4xV9N2vHd--