Hal and Xorg output devices
Jon Smirl
jonsmirl at gmail.com
Fri Feb 25 08:11:08 PST 2005
On Fri, 25 Feb 2005 14:30:23 +0200 (IST), Ely Levy
<elylevy-xserver at cs.huji.ac.il> wrote:
> So we agree on the model just that you say hal should use sysfs on linux
> to see what the modes are instead of libddc?
> I just don't see why that code needs to be in the kernel, after all you
> don't need to be in kernel mode to access that information, and with linux
> moving device handling to user level with hotplug and udev it only makes
> sense to get the info in that way.
> as for pci info libpci is done by kernel people and probebly already knows
> how to find all that informaiton, I think kernel drivers should be kept as
> simple as possible as they are very not portable and a lot harder to
> debug.
Doing these things in user space requires root priv. The XGL server is
being designed to run without needing to be root. The basic idea is to
minimize the code that needs to be inspected for security holes. It is
much easier to inspect device drivers than the entire X server.
On monitor change these events happen:
1) a hardware interrupt is generated.
2) device driver turns this into a hotplug event
3) hotplug event runs a tiny user space app at root priv that reads
the DDC and generates the mode list. This app can use a file in /etc
to supress modes or add new ones to compensate for broken EDID.
4) The valid mode list is set back into the driver at root priv
5) A dbus event is generated
At user priv:
dbus event is received
mode list is read and a new mode is set
In this scheme the X server process does not need to run with root priv.
Parallel arguements exist for why X should not enumerate the PCI bus
from user space. The kernel instead provides a hotplug safe way to
find devices via sysfs that doesn't need root priv.
--
Jon Smirl
jonsmirl at gmail.com
More information about the xorg
mailing list