Skip to content

Fix media keys lag on ABNT2 keyboard

Cristiano Fraga G. Nunes requested to merge (removed):master into master

I use Ubuntu 20.04.1. After some use, I noticed a delay when using keyboard media controls (for example: increase volume audio).

The first time I push these key Gnome hangs for a short time before display the action on the screen.

(This problem is still happening in Ubuntu 18.04 too. Even worse some times, the system crashes when using media keys.)

For some reason, my Gnome freezes when using Fn keys, or when I try to use two keyboards. A friend of mine pointed to me that it occurs when switching to a keyboard layout that has Scroll Lock enabled, so I disabled it in the X11 keyboard layout file for my language, and it solved the problem.

A workaround to solve the problem is:

  1. Opened the keyboard layout file for my language, in my case:

sudo nano /usr/share/X11/xkb/symbols/br

  1. Commented the line:

modifier_map Mod3 { Scroll_Lock };

  1. Logged out and logged in again or run command setxkbmap.

These steps are specific for the Brazilian Portuguese ABNT2 Layout and may not work for other layouts, but it can help you find a similar solution.

See reported bug for more details:
https://askubuntu.com/questions/906723/fn-media-keys-slow-delayed-on-ubuntu-gnome-17-04
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1895486

Edited by Cristiano Fraga G. Nunes

Merge request reports