Date: Thu, 20 May 1999 22:49:19 +1000 From: David Dawes <dawes@rf900.physics.usyd.edu.au> To: Matthew Thyer <thyerm@camtech.com.au> Cc: current@FreeBSD.ORG Subject: Re: XFree86 xsetpointer causes silo overflows (Was: Re: Fixed my MAMEd sio problem.) Message-ID: <19990520224919.B4105@rf900.physics.usyd.edu.au> In-Reply-To: <3742C5B7.5E85F408@camtech.com.au>; from Matthew Thyer on Wed, May 19, 1999 at 11:37:51PM %2B0930 References: <199905170127.LAA04147@godzilla.zeta.org.au> <37418C29.DEECA1AC@camtech.com.au> <19990519182237.H29455@rf900.physics.usyd.edu.au> <3742C5B7.5E85F408@camtech.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 19, 1999 at 11:37:51PM +0930, Matthew Thyer wrote: >The big problem is that the silo overflows continue after I have >returned the pointer to the mouse (with "xsetpointer pointer"). > >This should close the joystick device shouldn't it ? No. I've had a look through some of the XInput code, and it seems that it isn't unusual for an Xserver to open all devices at server startup, and not close them until server exit. There are provisions for delaying the open until the device is referenced, and for closing it before the server exits. The XFree86-specific XInput code does the former, but not the latter. Here are some comments from the Xserver/Xi code (which is not XFree86-specific): * Caller: ProcXOpenDevice * * This is the implementation-dependent routine to open an input device. * Some implementations open all input devices when the server is first * initialized, and never close them. Other implementations open only * the X pointer and keyboard devices during server initialization, * and only open other input devices when some client makes an * XOpenDevice request. This entry point is for the latter type of * implementation. * * If the physical device is not already open, do it here. In this case, * you need to keep track of the fact that one or more clients has the * device open, and physically close it when the last client that has * it open does an XCloseDevice. * * The default implementation is to do nothing (assume all input devices * are opened during X server initialization and kept open). * Caller: ProcXCloseDevice * * Take care of implementation-dependent details of closing a device. * Some implementations may actually close the device, others may just * remove this clients interest in that device. * * The default implementation is to do nothing (assume all input devices * are initialized during X server initialization and kept open). There is one aspect of XFree86's XInput support that I do consider a bug, and that is that it doesn't close the extended input devices when VT switching away from the server. We'll probably fix that in 4.0. >If it doesn't then there is a problem with either the X server >or FreeBSD. > >Bruce has already indicated that there is a problem with the >FreeBSD joystick driver but he thought it should stop when the >joystick device is closed but I see that the problem continues >until I restart the X server so that would seem to indicate a >problem with the X server. IMHO the problem is in the joystick driver and in your assumptions. By configuring the joystick in your Xserver config file, you're giving the server exclusive use of the device for the lifetime of the X server process. Implementing more agressive closing might solve your particular problem, but it doesn't deal with the real problem of the joystick driver causing the silo overflows. David To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990520224919.B4105>