5

I use a laptop with Xubuntu. I upgraded from 17.04 to 17.10 recently. Since the upgrade, the repeat keys functionality doesn't work.

By repeated keys I mean: when pressing one key and holding it down, I expect that the letter associated with the key will appear again and again on screen until I stop pressing the key.

However, the witnessed behaviour is the following: when pressing one key and holding it down, the letter is printed between 1 and 4 times and then it stops.

Things I have done without any positive result:

  • Searched here and in other websites for other instances of this same problem.
  • Ensured that the Repeat keys checkbox is enabled in Settings > Keyboard > Behaviour.
  • Disabled and enabled again the Repeat keys checkbox.
  • Experimented with different values of Repeat delay and Repeat speed on the same configuration screen.
  • Tried another keyboard connected by USB.
  • Used xkbset repeatkeys to disable and enable the repeat keys.
  • Used evtest to see the events of the keyboard and saw nothing unusual.

Any ideas on what could be the problem, and hopefully how to fix it?

EDIT 1:

I have edited the original text to clarify that the letter is repeated between 1 and 4 times and then it stops.

As requested in the comments, output of a couple of commands:

$ gsettings get org.gnome.desktop.peripherals.keyboard repeat
true
$
$
$ xset q r
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000002
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:      off
    06: Suspend:     off    07: Mute:        off    08: Misc:       off
    09: Mail:        off    10: Charging:    off    11: Shift Lock: off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  467    repeat rate:  29
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  900    cycle:  0
Colors:
  default colormap:  0x40    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Disabled

And another weird thing that I have found since writing this, which may or may not be related to the above problem:

When pressing an accent key just once, if I don't press any other key immediately a weird letter appears by itself. For example, if I press the key ´ (0xB4) once and don't press anything else immediately the character ΰ (0x3B0) appears by itself. It happens also with other accents like ` and ^.

EDIT 2:

The issue happens with any keyboard: either the builtin keyboard of the laptop, or a USB keyboard. In the case of the USB keyboard, I tried different ports and cables and the result is the same.

EDIT 3:

Two more tests:

  • Changed to another tty (e.g. Ctrl+Alt+F5) and there I could see that ^@ was constantly being printed without pressing any key. This is one of the representations of the NULL character.
  • Booted from old live USBs containing Xubuntu 17.04 and 16.04 (latest LTS) and the problem did not manifest there: repeat keys worked perfectly

EDIT 4:

Final test:

  • Booted from live USB containing Xubuntu 17.10 and the problem shows up again.
10
  • 1
    Can you please post the output of these commands xset q r and gsettings get org.gnome.desktop.peripherals.keyboard repeat?
    – darksky
    Nov 10, 2017 at 19:43
  • 1
    Thanks. Looks like Ubuntu's keyword configuration is fine. This sounds to me like an electronic problem than software. For example, your USB cable might be bad one or the USB port might be faulty. Can you try a different cable and port?
    – darksky
    Nov 10, 2017 at 20:27
  • 1
    Oh, so it's a laptop. Now I'm certain it's a problem with your laptop's keyboard. Since this keyboard is not removable, even if you plug in a new keyboard, the old one still fires. It's possible some liquid got spilled in it or something, and that ruined the electronics of the keyboard, so it sends out random signals to the motherboard. I bet that even if you boot up another operating system like Windows or a live Ubuntu, you will get the same effect.
    – darksky
    Nov 10, 2017 at 21:58
  • 1
    If you are familiar with electronics and are comfortable opening up the laptop, you can carefully remove the keyboard from the laptop and boot up the OS. And if that happens to be the culprit, a replacement keyboard can be bought online. Otherwise, I'd recommend to send it to some technician who can replace the laptop's keyboard for you.
    – darksky
    Nov 10, 2017 at 22:00
  • 2
    please, post output of lsmod | grep wmi, I suspect a driver problem Nov 11, 2017 at 1:59

1 Answer 1

6

You said: ^@ was constantly being printed withou pressing any key, this suggests driver problem.

lsmod | grep wmi

If peaq_wmi is present do with sudo:

modprobe -rv peaq_wmi

If it works properly become permanent by adding to blacklist:

nano /etc/modprobe.d/blacklist.conf

blacklist peaq_wmi

4
  • 1
    Thanks a lot, this solved the issue. From what I've read, this module is fairly new and still has some problems. There have been other reports of the same issue since it was released: [1] bugzilla.redhat.com/show_bug.cgi?id=1497861 [2] bugs.launchpad.net/ubuntu/+source/linux/+bug/1720219 [3] unix.stackexchange.com/questions/395535/… Nov 11, 2017 at 12:24
  • I'm surprised that a bad driver can cause issues that are this severe. You wouldn't think a bad keyboard driver would randomly generate events. Crazy to think about.
    – darksky
    Nov 12, 2017 at 9:57
  • Ty, that solved my problem as well. In my case I was convinced it wasn't a hardware problem because running windows in the same laptop didn't have this issue. What is peaq_wmi for anyway? Is there any disadvantage when disabling it? Dec 23, 2017 at 9:42
  • Thank you so much @Druida Obelix. It not only fixed the key repetition issue but also fixed the frustrating touch pad click issue for Lenovo Flex--3-1570 on Ubuntu 16.04!
    – Khuram
    Mar 21, 2018 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .