In drm mode while switching vt, open input fds get accumulated in weston-launch process. This may lead to hang, when number of open fds hit system limit. How to reproduce: - Run weston in drm mode using weston-launch - Switch vt a couple of times - Observe open input devices in /proc/<weston-launch-pid/fd
Created attachment 88089 [details] [review] weston-launch: close input fds in deactivate request This proposed fix tracks open input fds, and close them on deactivate request. One drawback I observed with this, is that it takes some time to reopen all input devices, so weston is unresponsive for like one second, after switching back to it.
I went with a slightly simpler fix, but also added support for the EVIOCREVOKE ioctl. Also applied to 1.3. commit 0eee0a28ba24dae62767bc5576c1e1b5dfe33869 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Oct 25 13:34:58 2013 -0700 weston-launch: Revoke and close input fds when we vt switch away We used to leak the input fds, as weston would reopen all fds on vt enter. We could just close them after sending the open fd through the socket, but this patch also adds support for the new EVIOCREVOKE evdev ioctl, that revokes the fd in question (including the copy that we sent to the compositor). https://bugs.freedesktop.org/show_bug.cgi?id=70849
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.