[RFC] XInput hotplugger daemon

Daniel Stone daniel at fooishbar.org
Sun Mar 16 06:07:29 PDT 2008

Hi Magnus,

On Thu, Mar 13, 2008 at 09:53:37PM +0100, Magnus Vigerlöf wrote:
> So I've realised that there is a need for another way of hotpluging the 
> connected devices than through the internal HAL-support in the Xserver, an 
> external hotplugger daemon. This has been mentioned as a possible way to 
> solve hotplugging in some posts here, but my searches for someone making a 
> program like this has turned up empty.

Well, at the moment, this is the case.  But, bear with me ...

I've been thinking about this for a little while.  Basically, at the
moment, the only real way we have of expressing anything is through a
combination of DeviceIntRec, and DeviceInfoRec/et al in XFree86.  We
create fake devices, pass them around, and everything has to always be
on inputInfo.devices.

What if we dropped that? Ideally, we'd be able to punt an fd (or, if we
depend on it everywhere, a HAL UDI) to a driver and say 'hey, do you
know anything about this?'.  From there, it's free to create as many
devices of as varied description as it likes.  Ideally, we'd also
flatten the input infrastructure at the same time, and basically punt
everything that we do for input now in the DDX down to the DIX, as it's
more or less identical.  This would make things like NIDR/DIDR semantics
a lot easier, as we can have simple policy callouts, rather than
irritating abstractions we can't see through.

So, with this, the Wacom driver would take an fdi, device name,
whatever, and open it up, see that it's a Wacom tablet, and add all
three devices.  Does this seem sensible?

> So what do you think? I need something that solves the hotplugging issue with 
> my tablet, and I think this is one way to solve it.

The daemon needs to be done anyway, basically just for settings.  The
FDI needs to set everything basic up with the systemwide preferences,
but then there's bits like 'oh yes, Dave uses the trackball
left-handed', which you really want to be per-user.
gnome-settings-daemon already does this today with keyboard layouts, so
it's pretty trivial to just have all these settings and whathaveyou
remembered in the desktop environment.

So yes, I think the idea's completely sound.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080316/0c4e95d8/attachment.pgp>

More information about the xorg mailing list