Sporadic keyboard stalls and repeats with libinput in Xorg

Peter Hutterer peter.hutterer at who-t.net
Mon Jun 25 03:40:58 UTC 2018


On Sun, Jun 24, 2018 at 10:07:23PM +0100, Ken Moffat wrote:
> This is weird - *most* of the time libinput (Beyond
> Linuxfromscratch, recent builds) works fine on my (desktop, running
> Xorg, usually icewm) machines.  And then from time to time - like
> this evening, after I awakened this machine from suspend - I starts
> stalling.  Usually characters will disappear while I am editing in a
> term, and then eventually appear if I wait.  Sometimes characters
> seem to get totally lost.  Other times, the last character repeats
> many times.

check the journal if you get any "timer offset is negative" warnings. If so,
the problem is the xserver not polling events quickly enough. but unless you
have tapping or something else that's timer-sensitive enabled, you may not
see this message, so absence of it is not a signal that everything is fine..

> I've seen this in 1.10.7, 1.10.8 on two machines, but those were
> running early -rc kernels so I assumed it might be a kernel problem.
> But the current machine is now running linux-4.17.2 (it was running
> 4.17.1 when I built the system).  In 4.17.1 it happened at least
> twice, and tonight it has happened again.  This is with 1.11.0.
> 
> I found a suggestion to run libinput-debug-events, but I never have
> that running when the problem hits, and I'm not sure what I should
> be passing to it (if I mouse to it during a stall, its display fills
> up with mouse moves and scrolls out of view).  And I've forgotten
> how to determine which /dev/input/event device the keyboard is
> using.

the libinput debug-events output has the event node number prefixed for
every event. But generally you don't need to pass anything other than
--verbose unless you have e.g. tapping enabled (--enable-tap, see the man
page for other options).

I recommend piping the output to a file, that way at least you don't lose
the data. The verbose output will have various states included such as when
disable-while-typing enables/disables, it may be useful to track things down
further.

Cheers,
   Peter


More information about the xorg mailing list