#2198 BLOC Untriag: X grabs input devices, doesn't let HAL grab them instead
Zarro Boogs per Child
bugtracker at laptop.org
Sun Jul 15 19:43:20 EDT 2007
#2198: X grabs input devices, doesn't let HAL grab them instead
-----------------------------+----------------------------------------------
Reporter: cjb | Owner: cjb
Type: defect | Status: new
Priority: blocker | Milestone: Untriaged
Component: x window system | Version: Development build as of this date
Keywords: | Verified: 0
-----------------------------+----------------------------------------------
I modified HAL to perform the grab ioctl, so that X doesn't exclusively
grab the power management input device out from under it. I added this
code (line 381):
{{{
if (g_ascii_strncasecmp("/dev/input/event0", device_file, 17) ==
0)
{
HAL_DEBUG (("grabbing event0\n"));
if (ioctl(g_io_channel_unix_get_fd(channel), EVIOCGRAB,
(void *)1) < 0)
HAL_DEBUG (("ioctl EVIOCGRAB failed"));
}
}}}
But, when I do this, X fails to start up:
{{{
(II) evdev brain: Rescanning devices (4).
(**) Option "AlwaysCore"
(**) Keyboard-olpc_pm/input0: always reports core events
(II) Keyboard-olpc_pm/input0: Unable to grab device (Device or resource
busy).
Cowardly refusing to check use as keyboard.
(EE) Keyboard-olpc_pm/input0: Don't know how to use device.
(II) UnloadModule: "evdev"
(EE) PreInit failed for input device "Keyboard"
}}}
It seems X can't handle the device being missing, even though it isn't the
main keyboard. Zephaniah says this will be fixed with the
respeclaration/X 1.4 work, eventually. In the meantime, he's given me an
"evil" xorg.conf to use instead, attached.
We need the HAL patch (which I'm still working on) and xorg.conf change in
our build before we can get OHM to properly handle button presses while X
is active.
--
Ticket URL: <http://dev.laptop.org/ticket/2198>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list