[PATCH] xfree86: if AllowEmptyInput is true, enable RAW mode on the console.
Julien Cristau
jcristau at debian.org
Mon Oct 20 06:30:23 PDT 2008
On Wed, Oct 15, 2008 at 12:55:30 +1030, Peter Hutterer wrote:
> Usually, the console is set to RAW in the kbd driver. If we hotplug all input
> devices (i.e. the evdev driver for keyboards), the console is left as-is.
> As a result, the evdev driver must put an EVIOCGRAB on the device to avoid
> characters leaking onto the console. This again breaks many things, amongst
> them lirc, in-kernel mouse button emulation and HAL.
>
> This patch sets the console to RAW if AllowEmptyInput is on.
>
> Use-cases:
> 1. AEI is off
> 1.1. Only kbd driver is used - behaviour as-is.
> 1.2. kbd and evdev driver is used: if evdev does not grab the device,
> duplicate events are generated.
> 2. AEI is on
> 2.1. Only evdev driver is used - behaviour as-is, but evdev does not need
> to grab the device anymore.
> 2.2. evdev and kbd are used: duplicate key events are generated if evdev
> does not grab the device.
>
> 1.2 is a marginal use-case that can be fixed by adding a "grab" option to the
> evdev driver (update of xorg.conf is needed).
>
> 2.2 is an issue. If we have no ServerLayout section, AEI is on, but devices
> specified in the xorg.conf are still added [1], resulting in duplicate events.
> This is a common configuration and needs sorting out.
>
> [1] 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d
Hi Peter,
Is whatever's in the ServerLayout section really relevant here? Sounds
to me that if you have input devices configured in xorg.conf (as you
used to need before i-h), you upgrade your X server and get i-h enabled,
then suddenly all your input events will be duplicated.
It really seems like we need a way to prevent events from getting to
/dev/input/mice and the console if evdev deals with them... I don't
want to mess with people's xorg.confs more than I have to, and right now
I don't see any better option than turning Auto{Add,Enable}Devices off
on upgrade, and that sucks (or forcefully uninstalling kbd and mouse.
ugh). Am I missing something obvious? I'd be glad to know how the
upgrade from F9 to F10 deals with this, if at all; maybe I can steal
some ideas. :)
Cheers,
Julien
More information about the xorg
mailing list