5

My keyboard repeat & delay settings are occasionaly reverted to slow (apparently default) values under Xorg in Ubuntu 18.04.

In this situation, the actual values (as obtained by xset q) are

auto repeat delay:  500    repeat rate:  30

whereas gsettings get org.gnome.desktop.peripherals.keyboard delay returns:

uint32 250

If I afterwards run gsettings set org.gnome.desktop.peripherals.keyboard delay 250, the keyboard delay / repeat settings are correctly set (xset q then returns auto repeat delay: 250).

There seem to be several triggers for the behavior, one reproducibly being a suspend & wakeup cycle; I wasn't able to reproduce others yet.

My system is a rather freshly installed Ubuntu 18.04 on an A10-5800K with an A78M-E35 board in BIOS (non EFI) mode.

Any hints would be highly appreciated.

  • 1
    I'm having the same problem. So annoying, definitely not the only place Ubuntu does crap like this. Adding a bounty if anyone has any idea. – Jimmy He Jul 5 '19 at 0:44
  • I have a possibly related problem whereby my mouse settings get reverted to some default (too fast for me), but I'm using Kubuntu, it's very random but seems sometimes to coincide with closing fullscreen apps (csgo in particular). This sounds like a bug you should probably report. – pbhj Jul 8 '19 at 22:34
2
+50

You can create a script to automatically reset keyboard repeat rate during resume:

#!/bin/bash

# NAME: keyrepeat
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically
# DATE: July 4, 2019.

# NOTE: https://askubuntu.com/questions/1086780/keyboard-repeat-delay-is-reset-occasionally-in-ubuntu-18-04

case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
        ;;
  post/*)
    echo "$0: Waking up from $2..."
    gsettings set org.gnome.desktop.peripherals.keyboard delay 250
        ;;
esac

Place the script in /lib/systemd/system-sleep.

Make it executable with:

chmod a+x /lib/systemd/system-sleep/keyrepeat

Reboot and then every resume after suspend the command:

gsettings set org.gnome.desktop.peripherals.keyboard delay 250

is automatically run.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.