From owner-freebsd-x11@FreeBSD.ORG Sat Jan 24 16:57:49 2009 Return-Path: Delivered-To: x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C5851065677 for ; Sat, 24 Jan 2009 16:57:49 +0000 (UTC) (envelope-from lwindschuh@googlemail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.231]) by mx1.freebsd.org (Postfix) with ESMTP id 33DC38FC23 for ; Sat, 24 Jan 2009 16:57:49 +0000 (UTC) (envelope-from lwindschuh@googlemail.com) Received: by rv-out-0506.google.com with SMTP id b25so5322154rvf.43 for ; Sat, 24 Jan 2009 08:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=zMBFWnGyOrZFgFagGLOnYF2cHNf1jdah1llhObl9CBk=; b=REUQn+Uh1MmbM0MEHsnVKzhd+NiqZHehzKgHatnE34MoEE9R0YNcGjOFCYL2f1WNsK kELYrU5wus3kV0yNv5D7WkJrsH1GSI7OR71Hl3NRLyGMaSikz4cWXbfUJ3j2sdC7xdMx uf13Jm+CcizBrHfeJcNVLYOKdZGedaGiDzRbY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=ALW2Ty1eC92xIQNRffMyCcKxSdkyvvIREK/W1UBJ8JqhSRdAcy4N0HuecQ2yiKBuYc LTJul32sSAc6OHKf3x71bOzLXpNV7dvE6hXDiYLBGaM2cudWgZsN0P0LSHRaSf+CtFJf 8yZFgph5bRFDmzgHSenVj3rxedURHvjlhBkvE= MIME-Version: 1.0 Received: by 10.141.5.17 with SMTP id h17mr1019022rvi.165.1232814694454; Sat, 24 Jan 2009 08:31:34 -0800 (PST) Date: Sat, 24 Jan 2009 17:31:34 +0100 Message-ID: <90a5caac0901240831j2367a69eo3a6dfd82f8e3c200@mail.gmail.com> From: Lucius Windschuh To: x11@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Xorg 7.4 freezes when not moving the mouse 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: Sat, 24 Jan 2009 16:57:51 -0000 Hi guys. I updated yesterday to the new Xorg 7.4 on my laptop. After rebuilding many of my ports due to the libxcb dependency, I stumbled upon a this error: The X server stops responding: nothing on the screen changes. Until I move the mouse cursor. Then, everything is normal for some time. And when I stop moving the mouse, it freezes again after a short time. Literally, this is a show-stopper. ;-) Some investigation with ktrace showed that my mouse is responsible: My configuration uses /dev/sysmouse as mouse device. It is opened by xf86OpenSerial() (xorg-server: hw/xfree86/os-support/shared/posix_tty.c). After some ioctls, this function clears the O_NONBLOCK flag on the associated file descriptor. So that's why X waits with blocking I/O for me to move the mouse, which lets moused generate output on /dev/sysmouse. Clearing O_NONBLOCK seems a bit strange to me, but I did not look further into the xf86OpenSerial()-Code. Instead, I patched xf86-input-mouse to set O_NONBLOCK again. I am not sure if this is the right point to correct the error. I would patch out the part around "i &= ~O_NONBLOCK" in xf86OpenSerial, but this could have consequences for other devices that assume that their device I/O blocks. You can find the dmesg, xorg.conf and Xorg.1.log and the patch on my site: http://sites.google.com/site/lwfreebsd/Home/files The patch itself is quite simple ( http://sites.google.com/site/lwfreebsd/Home/files/xf86-input-mouse-O_NONBLOCK.diff.txt ). Other thoughts? I wonder why nobody has complained before. Is nobody using moused these days? ;-) Lucius