Fn Media keys slow/delayed on ubuntu gnome 17.04

I just installed Ubuntu 17.04 on my Asus ROG GL752VW laptop and I decided to install gnome-shell and then install ubuntu-gnome-desktop.

After some use, I noticed a delay when using Fn + F5or F6 as media controls.

The first time I push these key combination Gnome hangs for a short time, and the next Fn + F-key pushes work without any delay until you push any other key-combination, like Alt + Tab which does not use the Fn key. I think it could be an ACPI related issue.

Update:

Each time gnome hangs there is a short peak of CPU usage and this is logged.

gnome-shell[10821]: pushModal: invocation of begin_modal failed
gnome-shell[10821]: pushModal: invocation of begin_modal failed
/usr/lib/gdm3/gdm-x-session[10635]: (II) NVIDIA(0):     cd/play CDPLAY 00000080 00000000 K
/usr/lib/gdm3/gdm-x-session[10635]: (II) NVIDIA(0): ACPI: received event:  PNP0C14:01 000000ff 00000000
/usr/lib/gdm3/gdm-x-session[10635]: (II) NVIDIA(0):     cd/play CDPLAY 00000080 00000000 K
/usr/lib/gdm3/gdm-x-session[10635]: (II) NVIDIA(0): ACPI: received event:  PNP0C14:01 000000ff 00000000

I tried reinstalling ubuntu-gnome-desktop but it didn’t work.

Update:

I found this post which may be related.

I started getting sporadic freezes on my T460s. These freezes tended to occasionally manifest when pressing Mod4, or other modifier or media keys.

…This hinted to me that this issue might be a race condition in some process that talks to systemd-logind.

Update:

I started to think it is not an ACPI related problem, as I just installed the media keys gnome plugin and when I try to use it happens the same thing as if I were using Fn keys, the problem must be with gnome.

Update:

I just reinstalled ubuntu Gnome, and it does not happens on wayland so it is xorg related. Looking for a way to make gnome-wayland work with Nvidia drivers.

Update:

I just installed budgie-desktop and the problem is still happening.

Update:

Same problem happening in ubuntu 17.10 after some use. It’s so annoying…

Update:

Problem still happening in ubuntu 18.04. Even worse some times the system crashes when using media keys.

Answer

For some reason my Gnome freezes when using Fn keys, or when I try to use 2 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.

The steps I followed are:

  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.

Attribution
Source : Link , Question Author : Jose Valencia , Answer Author : Juliano Zatta

Leave a Comment