Arch Linux – Resolving ^@ Spam in TTY

arch linuxi3keyboardtty

I recently noticed some weird behavior on my GNU/Linux machine. I've been trying to narrow it down but I am unsure where to go next. My setup uses the following:

  • i3
  • gdm
  • arch
  • systemd
  • grub2
  • pulseaudio
  • 4.13.3-1-ARCH

Here is how it manifests iself:

  • when trying to resize panes in i3 (alt+right click and hold) the action will be randomly canceled (happens on key presses)
  • alt+dragging windows meets a similar fate
  • booting to tty periodically adds ^@s to the login prompt, I'd estimate them to be ~0.5s intervals
  • in tty I can see those being passed to vim when I open the command bar (:)
  • using a pager like less in tty mode and searching with / will result in (?) being spammed
  • htop's search (/) is instantly canceled by the periodic keypress
  • holding a key and trying to have it be repeated (such as holding space) will stop the other occurrences from happening (e.g. only one or two happen)
  • any tooltip (such as chrome tooltips) get instantly closed because of key presses

Here is what I have tried:

  • tried switching DE temporarily (gnome, cinnamon, xfce)
  • tried killing programs one by one until I was left with a tty session and essentially systemd services + pulseaudio
  • tried booting on an arch livecd – problem does not manifest
  • overriding grub2 with init=/bin/bash drops me into a shell where the problem does not manifest
  • I have tried pressing all keys to verify it wasn't a hardware problem, however previous steps point to it not being hardware
  • I have made a diff of dmesg, from the init=/bin/bash and the regular boot – the main difference seems to be systemd being started in the regular boot
  • Made a diff of lsmod from init=/bin/bash and regular boot, tried to rmmod modules that seemed related

My system is up to date, I'm not quite sure what other steps I can do to track this down. Any other debugging tips?

Best Answer

In 4.13, +CONFIG_PEAQ_WMI=m was added to the vanilla kernel, a dependency of CONFIG_INPUT_POLLDEV. This has resulted in regressions for various types of systems, including the console spamming you experienced. It appears to have been introduced with this commit.

Blacklisting input_polldev is the current workaround.

Related Question