27

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.

  • 3
    linking with https://askubuntu.com/questions/837883/ubuntu-gnome-16-04-shortcuts-and-function-keys-stop-working-after-a-while-why as it's possibly related – brice rebsamen Aug 23 '17 at 21:28
  • 2
    it appears that there is a solution in https://askubuntu.com/questions/911946/terminal-appears-with-much-delay-when-shortcut-is-used – brice rebsamen Aug 23 '17 at 21:31
  • 1
    not the same problem, I tried the suggested solution but nothing changed. – Jose Valencia Aug 24 '17 at 19:27
  • 1
    Yet here we are in 2018 and this problem still exists on GNOME 3.28... Did you get to workaround it @JoseValencia? – João Vitor Verona Biazibetti Jul 15 '18 at 18:47
  • 2
    No, I couldn't figure a workaround out. Actually I started to use Windows 10 more. – Jose Valencia Jul 16 '18 at 18:09
  • 1
    I've found that, switching between typing on my laptop's internal keyboard, and on my external USB keyboard, causes that delay too. And I can also confirm that it is absolutely GNOME+x11 related, because this works fine on GNOME+Wayland and KDE+x11. Sadly I too have a NVIDIA gcard, so Wayland is not an option... – João Vitor Verona Biazibetti Jul 16 '18 at 21:48
  • 1
    I don't know if it is related, but my cpu takes heartbeats, regardless of activity. Similar to the ones you had but more consistent and I only have 4 cores, and it tends to be the first core that spikes Systemd and systemd related stuff crash every so often I couldn't figure it out, so I wiped my drive and installed arch linux, and lo and behold arch took heartbeats with nothing but X11 and Nvidia. Sometimes I can ever so slightly feel the heartbeats when using Graphic intensive applications on windows (could be unrelated). I still see the beats when I have the nvidia gpu disabled on ubuntu. – Aaahh Aug 26 '18 at 08:10

3 Answers3

31

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.

2

I had the same problem, but instead of Fn keys my problem was with the Ctrl key. Whenever I pressed Ctrl, gnome-shell CPU usage spiked!

So I figured out that my keyboard layout was set to en-GB, United Kingdom while my keyboard layout is en-US!

While the difference between the two layouts is minimal, it still somehow bugged the whole gnome-shell. So if anyone having the same problem, double check your keyboard layout from Gnome Settings!

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
1

I have reported the bug here: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1895486

I think if more people comment there, the Canonical will help us to fix the problem.

This bug appears on Ubuntu 20.04 too.

Just for better bug tracking, I've added some links.

Related bugs (maybe duplicated):

Upstream issues: