Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 2014 00:54:52 +0000 (UTC)
From:      Christian Weisgerber <naddy@mips.inka.de>
To:        freebsd-x11@freebsd.org
Subject:   xorg-server: What's the point of the devd backend?
Message-ID:  <slrnm9c6is.1rja.naddy@lorvorc.mips.inka.de>

next in thread | raw e-mail | index | archive | help
I hope I don't come across as combative, but I have to ask:
What *is* the point of the new devd backend for the X.org server?

I understand the basic idea: The server automatically handles input
devices getting connected to or disconnected from the machine.

Except that on a default FreeBSD setup, it doesn't happen this way.
At least not for keyboards and mice.  Keyboards attach to the
kbdmux(4) multiplexer.  The devd backend skips them and just reads
from kbdmux(4).  For each mouse that you plug in, devd(8) spawns a
moused(8) process that feeds the mouse events into sysmouse(4).
Again, the X.org devd backend skips the actual mouse device and
just reads from sysmouse(4).  You can add and remove keyboards and
mice at will but this is all handled by kbdmux and sysmouse.  The
corresponding devd backend functionality isn't used at all.

With a default setup, all that the X.org devd backend does is add
a kbdmux and a sysmouse input device.  But for that you wouldn't
need the devd backend at all; disabling the AutoAddDevices option
will result in the server picking up kbdmux and sysmouse just the
same.  In order to even use the functionality the devd backend is
supposed to provide, you have to disable kbdmux and tweak devd.conf(5).
Which then gets you essentially the same functionality you already
had before you messed with kbdmux and devd.conf.

Yes, I understand that for the very few people who want to connect
several keyboards with different layouts the devd backend is required.
Those setups already require enough configuration tweaks that having
to expressly enable the devd backend wouldn't be a burden.  Meanwhile
the vast majority of users would be served just as well by dropping
this extra bit of complexity and turning off AutoAddDevices by
default.  And config/devd.c would become simpler if it didn't have
to fight with kbdmux and sysmouse.

I could understand the direction if kbdmux and sysmouse were on
their way out, but I'm pretty sure this won't happen, because people
who use the plain console would be up in arms over it.  So we are
stuck with this silly situation of two competing auto-attachment
layers, both enabled by default, one preempting the other.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrnm9c6is.1rja.naddy>