[PATCH weston 1/3] evdev/libinput: sync the leds of keyboards with the xkb state

Daniel Stone daniel at fooishbar.org
Thu Aug 21 05:06:02 PDT 2014


Hi,

On 21 August 2014 08:58, Giulio Camuffo <giuliocamuffo at gmail.com> wrote:

> 2014-08-21 10:34 GMT+03:00 Daniel Stone <daniel at fooishbar.org>:
> > Ugh. If you've your own kernel to hand, I'd hack it to WARN_ON(1) on LED
> > updates, so you can track where the rogue update is coming from. My
> guess is
> > that switching VT breaks it, so it might work if you instead trigger an
> > update of all LED state on every VT enter?
>
> Switching VT is another matter, because all the keyboard devices are
> removed so the xkb state is lost, so when returning to weston's vt we
> don't know anymore which leds are supposed to be on.
>

Sure we do: the usual way is to release all keys on VT leave, resetting
latches but leaving locks as they are. So when they came back, just apply
the state that occurred as a result of that, rather than trying to maintain
a totally unknown state from whilst you were switched away, or reset it
completely.


> This patch just fixes keyboard hotplugging, besides turning the leds
> off at startup.
>

Sure. I really, really don't like that timer though ... I'd rather just sit
this one out whilst we work out the correct thing to do though. If you've
got some time on your hands, looking at the VT-enter path would be good I
think; even if it doesn't make the first release, I think it'd make a good
stable-branch candidate.

Cheers,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140821/ef56878d/attachment.html>


More information about the wayland-devel mailing list