[Xgl/Xegl] Input Devices

Jon Smirl jonsmirl at gmail.com
Wed Jul 27 09:06:47 PDT 2005


On 7/27/05, Ely Levy <elylevy-xserver at cs.huji.ac.il> wrote:
> > 2) Use HAL over other hardware detection mechanisms?
> >       Advantages:
> >       Disadvantages:
> 
> While hal is pretty standard on linux machines I'm not aware of any other
> OS which hal is fully functional on.
> If we can make it work on all OS I think its best advantage would be the
> fact that X wont need to have hardware detection code.
> Anyhow I think still someone else would need to be done for handheld
> devices as probebly they don't run hal:)

Making core X work on all platforms has gotten us in trouble on Linux
with the PCI handing. My new philosophy is that X should make full use
of the capabilities provided by the platform that it is running on.

That doesn't mean that X stops being cross platform. For example, we
can take the current input detection code and push it into a library.
This will let Linux use HAL while other platforms have a thin layer
that simply calls into the existing library.

> > 3) Use EVDEV as primary input driver interface? My preliminary research
> > of EVDEV leads me to believe this is a powerful and useful mechanism.
> >       Advantages:
> >       Disadvantages:
> 
> Linux specific, depends on kernel guys, I'm also not sure how debugged it
> is. But is very powerfull and nice interface.

This is the preferred input mechanism on Linux now. Use of evdev is
isolated to input drivers so this has no cross platform impact.

> ....snip....
> First is where the configuration should sit. I think xhotplug should
> elimate the need for the input device section almost completly.
> I think per user configuration should be kept in some Xresource file by
> the user. (Things like mouse speed acceleration tapping and so on).
> There is however the problem of supporting 2 Xservers on the same computer
> I saw that initial support was added to next release it would be an
> intersting problem to decide which X should take over the new device
> entered. Maybe one should be primary and one secondary? it would also be
> nice if the servers could communicate enough to allow passing of devices
> between them (Yea I know few security problems there).

This hasn't been written yet, but I believe that plan on Linux is to
use a combo of udev and PAM to assign device ownership. Fixed items
like graphics device, keyboard, mouse, usb hub will be combined into a
console group. At login PAM will assign ownership of the console group
to the logged in UID. So to find what devices you own just look for
the ones that match your UID. Note that you can own a USB hub/port.
Any futher devices plugged into the USB port will be assigned to you.
HAL will notify of their arrival.

Linux has multiple users of the console group. It doesn't work to
build a mechanism like this into X since X's solution won't be visible
to the other users of the console group. Also note that the plan for
Xegl is to not run it as root, instead it runs as your logged in UID.

> Second, I think we should redo the mouse wheel support and get rid of the
> horrible button mapping. We should have zaxis instead. That I think would
> simplfy things for both users and programs which now guess 4/5 buttons are
> wheel.

evdev supports this as a low level. X will need to decide how to expose it.

 > One last not so important issue would we want to support multiple mouse
> cursors on the same X?

They will have to be software cursors but I don't see any fundamental
problems with this. There is no API for doing this currently.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the xorg mailing list