Xorg Input Hotplugging
Bernardo Innocenti
bernie at codewiz.org
Sun Oct 14 20:59:37 PDT 2007
On 10/14/07 21:46, Ben Gamari wrote:
> Some investigation revealed that the evdev driver had taken the liberty
> of claiming my keyboard and track stick in addition to the newly
> hotplugged usb mouse.
The mapping between HAL capabilities and X drivers is in the
x11-input.fdi policy file (not installed by default).
On Linux, evdev is used by default because it's supposed to
be more flexible and a better design than using the old mouse
and keyboard drivers which rely on PS/2 protocol emulation.
> After deleting my old InputDevice section (using
> the kbd driver), I restarted xorg and found that my keyboard issues
> continued. Looking through the manpage of the evdev driver produced that
> most QWERTY keyboard users will need to pass "evBits," "keyBits", and
> "Pass" options to the evdev driver.
At this time, I'm afraid there's no way to pass configuration
options to evdev through hal. But I had no need to set any
of these on the OLPC.
The documentation you've read is probably outdated. These days,
evdev_drv 1.2 is pretty good at autodetecting these things
directly from the /dev/input/eventX device.
I believe we should strive to avoid hardcoding things such as
the keyboard layout, repeat rate and in hal. A simple solution
would be to autoconfigure things with basic but mostly working
defaults (pc105 us layout for the keyboard, medium mouse
acceleration...).
At login time, the desktop will send Xi and XKB requests to
override these defaults with per-user preferences.
> After trying to add a new
> InputDevice section using the evdev driver and the required options,
> restarting xorg failed with:
>
> expected keysym, got XF86KbdLightOnOff: line 70 of pc
> expected keysym, got XF86KbdBrightnessDown: line 71 of pc
> expected keysym, got XF86KbdBrightnessUp: line 72 of pc
I believe you have an outdated libX11. They added a few
new keysyms recently.
> (EE) AlpsPS/2 ALPS GlidePoint-isa0060/serio1/input0: Button: 74.
> (EE) AlpsPS/2 ALPS GlidePoint-isa0060/serio1/input0: state->btn: 0x8322d10.
> (EE) AT Translated Set 2 keyboard-isa0060/serio0/input0: Don't know how to use device.
> (EE) PreInit failed for input device "AT Translated Set 2 keyboard"
This doesn't happen to me... could you please post the output
of lshal? (just for the keyboard and tablet, not all of it!)
> Does xorg infer the evdev options when hal notifies it of a new keyboard
> device? Additionally, it looks like evdev attempts to take over my
> synaptics touchpad as well. Should the driver be checking whether
> devices are already in use before it claims them for itself? Thanks a
evdev does not claim them. It's hal telling the X server to do
that. Or so I believe...
--
\___/
|___| Bernardo Innocenti - http://www.codewiz.org/
\___\ One Laptop Per Child - http://www.laptop.org/
More information about the hal
mailing list