Ubuntu 20.04 occasionally disables key repetition

Viewed 1763

I don't know how or why, sometimes, suddenly, for no apparent reason, key repetition is disabled.
If I run this command:

 xset r on

or if I wait half an hour, the key repetition starts working again but after a few days the problem suddenly returns.
I think it's because xorg or another system program suddenly crashes, but that's just a guess.

I have no idea of the cause of the problem, so I ask whoever has the same problem, if they have been able to diagnose it.

I use Ubuntu 20.04 LTS Desktop 64-bit freshly installed.

There is a similar problem in Ubuntu 8.04 LTS, if it matches my problem, it would mean the bug hasn't been fixed for 12 years!:

https://bugs.launchpad.net/ubuntu/+bug/272293?comments=all

2 Answers

Manage repeated key presses

By default, when you hold down a key on your keyboard, the letter or symbol will be repeated until you release the key. If you have difficulty picking your finger back up quickly enough, you can disable this feature, or change how long it takes before key presses start repeating, or how quickly key presses repeat.

  1. Open the Activities overview and start typing Settings.
  2. Click on Settings.
  3. Click Accessibility in the sidebar to open the panel.
  4. Press Repeat Keys in the Typing section.
  5. Switch the Repeat Keys switch to off.

Alternatively, adjust the Delay slider to control how long you have to hold a key down to begin repeating it, and adjust the Speed slider to control how quickly key presses repeat.

Go to system settings >> keyboard and make sure that repeat and speed are set correctly.

when this doesn't work, it sometimes helps to disable repeat keys and enable it again.

Reference:

https://help.ubuntu.com/stable/ubuntu-help/keyboard-repeat-keys.html.en

https://askubuntu.com/questions/81296/repeat-key-functionality-doesnt-work

Also read these articles:

https://itectec.com/ubuntu/ubuntu-key-stops-repeating-randomly/

Reset keyboard settings to default

First do a dump of any keyboard settings that differ from default

dconf dump /org/gnome/desktop/peripherals/keyboard/

# => [org/gnome/desktop/peripherals/keyboard]
# => delay=uint32 188
# => numlock-state=true
# => repeat=true
# => repeat-interval=uint32 0

Then reset them back to defaults

dconf reset -f /org/gnome/desktop/peripherals/keyboard/

Danger proceed with care (you probably don't need to do anything beyond here)

Dump all changes

dconf dump /

Reset all settings back to default

dconf reset -f /
Related