Date: Sat, 8 Feb 2014 15:54:04 +0200 From: Alex Kozlov <spam@rm-rf.kiev.ua> To: Robert Millan <rmh@freebsd.org> Cc: freebsd-x11@freebsd.org Subject: Re: [PATCH] do not feed keyboard device path in X devd backend Message-ID: <20140208135404.GA75736@ravenloft.kiev.ua> In-Reply-To: <52F61969.2060503@freebsd.org> References: <52EFA9A9.2040901@freebsd.org> <52F61969.2060503@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 08, 2014 at 11:47:53AM +0000, Robert Millan wrote: > On 03/02/2014 14:37, Robert Millan wrote: > > > > When feeding the keyboard device path (e.g. /dev/ukbd0) to X server, > > it will attempt to open it. This is incorrect because X doesn't want > > _all_ the input from keyboard but rather just the one typed in its > > VT (usually /dev/ttyv7). > > > > Plus, attempting to open /dev/ukbd0 usually fails with EBUSY as the > > keyboard is already being used by syscons. > > > > This patch adjusts devd.c to follow the same approach as HAL: detect > > the keyboard but feed it a zero-length device path. The result is > > that X detects the presence of a keyboard, and therefore loads the > > kbd_drv module, but doesn't attempt to open it directly (which is > > unnecessary since /dev/ttyv7 is already open). > > Unfortunately this didn't completely fix the problem. Testing by Debian > developers revealed that attaching a second keyboard and then detaching > it disabled keyboard handling in X somehow: > > https://lists.debian.org/debian-bsd/2014/02/msg00074.html > > I investigated and found that HAL avoids this by ignoring keyboard events > completely. Instead, it generates a fake "AT Keyboard" event during > initialization (with empty device path too), which makes X load the kbd > driver just once. > > Here's a patch that implements the same behaviour with devd. I've verified > that attaching/detaching a second keyboard no longer causes this ill effect. Can you please check if devd patch from xorg-dev work for you? http://trillian.chruetertee.ch/ports/browser/trunk/x11-servers/xorg-server/files/extra-devd -- Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140208135404.GA75736>