[media-keys] Media keys with lag slow/delay on Gnome with "Scroll Lock" keyboards

Bug #1895486 reported by Cristiano Fraga G. Nunes
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
xkeyboard-config (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

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

2) Commented the line:

modifier_map Mod3 { Scroll_Lock };

3) 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.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: x11-xkb-utils 7.7+5
ProcVersionSignature: Ubuntu 5.4.0-47.51-generic 5.4.55
Uname: Linux 5.4.0-47-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
.proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.suspend: suspend hibernate resume
.proc.driver.nvidia.suspend_depth: default modeset uvm
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 440.100 Fri May 29 08:45:51 UTC 2020
 GCC version:
ApportVersion: 2.20.11-0ubuntu27.8
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: skip
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sun Sep 13 21:52:03 2020
DistUpgraded: Fresh install
DistroCodename: focal
DistroVariant: ubuntu
GraphicsCard:
 Subsystem: Dell UHD Graphics 630 (Desktop) [1028:0859]
 NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Dell GP107 [GeForce GTX 1050 Ti] [1028:3512]
InstallationDate: Installed on 2020-08-15 (29 days ago)
InstallationMedia: Ubuntu 20.04.1 2020.08.15 LTS "Custom Focal Fossa" (20200815)
MachineType: Dell Inc. XPS 8930
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-47-generic root=UUID=706721d5-f527-41fe-98ca-96706a36bb42 ro quiet splash
SourcePackage: x11-xkb-utils
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/01/2020
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.1.15
dmi.board.name: 0T88YD
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: Not Specified
dmi.modalias: dmi:bvnDellInc.:bvr1.1.15:bd07/01/2020:svnDellInc.:pnXPS8930:pvr1.1.15:rvnDellInc.:rn0T88YD:rvrA00:cvnDellInc.:ct3:cvrNotSpecified:
dmi.product.family: XPS
dmi.product.name: XPS 8930
dmi.product.sku: 0859
dmi.product.version: 1.1.15
dmi.sys.vendor: Dell Inc.
modified.conffile..etc.default.apport:
 # set this to 0 to disable apport, or to 1 to enable it
 # you can temporarily override this with
 # sudo service apport start force_start=1
 enabled=0
mtime.conffile..etc.default.apport: 2020-08-15T17:44:36
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.101-2
version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.8-0ubuntu1~20.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx N/A
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.20.8-2ubuntu2.4
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200226-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :
Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :

Other users has a same problem. See:

https://askubuntu.com/questions/906723/fn-media-keys-slow-delayed-on-ubuntu-gnome-17-04

This problem appears on Ubuntu 17.04, 18.04 and 20.04.

affects: x11-xkb-utils (Ubuntu) → gnome-shell (Ubuntu)
Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :
summary: - [media-keys] Fn media keys with lag slow/delay on Gnome
+ [media-keys] Fn media keys with lag slow/delay on Gnome with
+ "Scroll_Lock" keyboards
summary: - [media-keys] Fn media keys with lag slow/delay on Gnome with
- "Scroll_Lock" keyboards
+ [media-keys] Fn media keys with lag slow/delay on Gnome with "Scroll
+ Lock" keyboards
Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote : Re: [media-keys] Fn media keys with lag slow/delay on Gnome with "Scroll Lock" keyboards

For ABNT2 keyboards, I've removed the "Scroll Lock" key, see:

https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/112

It is not the right solution (I even regretted it), but it works...

Changed in gnome-shell (Ubuntu):
status: New → Fix Committed
assignee: nobody → Cristiano Nunes (cfgnunes)
status: Fix Committed → Confirmed
status: Confirmed → New
assignee: Cristiano Nunes (cfgnunes) → nobody
affects: gnome-shell (Ubuntu) → xkeyboard-config (Ubuntu)
Changed in xkeyboard-config (Ubuntu):
assignee: nobody → Cristiano Nunes (cfgnunes)
status: New → Fix Committed
tags: added: fixed-in-2.31 fixed-upstream
Revision history for this message
lucas grigolon varela (lucasgrvarela) wrote :

I can confirm the same problem and the "Scroll Lock" workaround worked here too. I'm using my system with English language but the keyboard is the BR-ABNT2. I tried with different drivers of Nvidia and with Noveau, no difference. I'm using ubuntu 20.04.1 LTS.

Revision history for this message
Gabriel Mattos Baeta Neves (gmbneves) wrote :

I'm having the same problem with both Ubuntu 18.04 and 20.04. Commenting the line

modifier_map Mod3 { Scroll_Lock };

does help but it does not solve it. My system does not freeze anymore but CPU usage still goes unusually up.

In addition, setting the brightness with the mouse by clicking and dragging on the top bar makes the brightness icon lag and causes the same odd CPU behavior.

It also only happens on xorg.

Timo Aaltonen (tjaalton)
Changed in xkeyboard-config (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-shell:
status: Unknown → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Continued in bug 1892747.

Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :

About the fix for this bug:

This fix solves the problem only for ABNT2 keyboards (used in Brazil, only).

But this bug affects all keyboards with "Scroll Lock" key.

The solution proposed in the merge request that I made in project xkeyboard-config is not a suitable solution yet. It is not a definitive solution for this problem. It was just a workaround. 😅

Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote :

As the xkeyboard-config is not the cause of that bug, the Scroll Lock key must return because many users use this key in some apps.

I've opened a Merge Request to return the Scroll Lock key:
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/555

Changed in xkeyboard-config (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Cristiano Fraga G. Nunes (cfgnunes) wrote (last edit ):
summary: - [media-keys] Fn media keys with lag slow/delay on Gnome with "Scroll
- Lock" keyboards
+ [media-keys] Media keys with lag slow/delay on Gnome with "Scroll Lock"
+ keyboards
Changed in xkeyboard-config (Ubuntu):
assignee: Cristiano Fraga G. Nunes (cfgnunes) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.