Date: Sat, 24 Jan 2009 17:31:34 +0100 From: Lucius Windschuh <lwindschuh@googlemail.com> To: x11@freebsd.org Subject: Xorg 7.4 freezes when not moving the mouse Message-ID: <90a5caac0901240831j2367a69eo3a6dfd82f8e3c200@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90a5caac0901240831j2367a69eo3a6dfd82f8e3c200>