X pausing until mouse move (collecting commonalities)
Jung-uk Kim
jkim at FreeBSD.org
Wed Mar 26 13:54:18 PDT 2008
On Wednesday 26 March 2008 12:50 pm, Joe Marcus Clarke wrote:
> I'm trying to get a list of commonalities to better focus my
> troubleshooting. So far, my two machines that are affected have
> the following in common:
>
> GNOME 2.22 (with hald)
> nVidia graphics card (though different drivers)
> PS/2 mouse
> dual core
> ULE scheduler
>
> My one machine that is not affected differs from this in that it
> has an Intel graphics card, USB mouse, and is not dual core (but
> HTT).
>
> It looks like Coleman has a PS/2 mouse as well. It's starting to
> look like the mouse technology might have something to do with
> this. Anyone seeing this problem with a USB mouse?
I think I know why. Build xorg-server without HAL support option and
the attached patch. With HAL support (default) and hald running,
xorg-server auto-detects individual ports with input.mouse capability
even without configuration lines in xorg.conf. If moused is enabled
and USB mouse is used, /dev/ums0 is directly used because there is a
problem in MD code (see attached patch). If moused is enabled and
PS/2 mouse is used, you end up with two input devices
via /dev/sysmouse and /dev/psm0. I couldn't find a cleaner way to
fix this problem, though. :-(
Jung-uk Kim
-------------- next part --------------
--- 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-26 16:02:07.000000000 -0400
@@ -250,7 +250,7 @@ SetSysMouseRes(InputInfoPtr pInfo, const
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#define MOUSED_PID_FILE "/var/run/moused.pid"
+#define MOUSED_PID_FILE "/var/run/moused"
/*
* Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without
@@ -262,7 +262,7 @@ MousedRunning(void)
FILE *f = NULL;
unsigned int pid;
- if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) {
+ if ((f = fopen(MOUSED_PID_FILE ".pid", "r")) != NULL) {
if (fscanf(f, "%u", &pid) == 1 && pid > 0) {
if (kill(pid, 0) == 0) {
fclose(f);
@@ -271,6 +271,18 @@ MousedRunning(void)
}
fclose(f);
}
+#if defined(__FreeBSD__)
+ /* XXX /etc/rc.d/moused may create ums[0-9]+ via devd.conf. */
+ if ((f = fopen(MOUSED_PID_FILE ".ums0.pid", "r")) != NULL) {
+ if (fscanf(f, "%u", &pid) == 1 && pid > 0) {
+ if (kill(pid, 0) == 0) {
+ fclose(f);
+ return TRUE;
+ }
+ }
+ fclose(f);
+ }
+#endif
return FALSE;
}
More information about the freebsd-x11
mailing list