Input locks frequently/high CPU usage after 18.10->19.04 upgrade

Bug #1826219 reported by Paul Natsuo Kishimoto
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I recently upgraded from 18.10 to 19.04.

What I expected to happen: same performance as before.

What happens instead:
- I experience frequent locks of input lasting from 0.5–5 seconds, during which:
  - The mouse cannot be moved or clicked.
  - Any pressed key is repeated for the duration of the lock.

Various events seem to trigger the locks:
- Typing this bug report in Google Chrome (locks for 0.5 s every ~20–30 s).
- Changing tabs in Google Chrome (locks for 0.5 s).
- Changing tabs in the Atom editor (locks for 1–5 s).
- Typing in gedit with no other applications running (locks for ~0.5s).

Accompanying symptoms:
- CPU usage for gnome-shell is high:
  - Always around 20%
  - Appears to spike to 100% for longer locks (from eyeballing htop open in gnome-terminal)

- The following appear in 'journalctl -f':

Apr 24 15:57:30 khaeru-laptop org.gnome.Shell.desktop[31679]: Key repeat discarded, Wayland compositor doesn't seem to be processing events fast enough!
Apr 24 15:57:30 khaeru-laptop org.gnome.Shell.desktop[31679]: Window manager warning: last_user_time (169670562) is greater than comparison timestamp (169670067). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...
Apr 24 15:57:30 khaeru-laptop org.gnome.Shell.desktop[31679]: Window manager warning: 0x1800001 appears to be one of the offending windows with a timestamp of 169670562. Working around...
Apr 24 15:57:30 khaeru-laptop org.gnome.Shell.desktop[31679]: Window manager warning: W1369 appears to be one of the offending windows with a timestamp of 1798201456. Working around...

- The following also appear:

Apr 24 15:59:59 khaeru-laptop org.gnome.Shell.desktop[31679]: libinput error: client bug: timer event20 debounce: offset negative (-313ms)
Apr 24 15:59:59 khaeru-laptop org.gnome.Shell.desktop[31679]: libinput error: client bug: timer event20 debounce short: offset negative (-326ms)

$ lsb_release -rd && apt-cache policy gnome-shell
Description: Ubuntu 19.04
Release: 19.04
gnome-shell:
  Installed: 3.32.0+git20190410-1ubuntu1
  Candidate: 3.32.0+git20190410-1ubuntu1
  Version table:
 *** 3.32.0+git20190410-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: gnome-shell 3.32.0+git20190410-1ubuntu1
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
Uname: Linux 5.0.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 24 15:52:32 2019
DisplayManager: gdm3
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-10-11 (559 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to disco on 2019-04-22 (2 days ago)

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
description: updated
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

The lock also occurs when using claws-mail. I pressed [Delete] in a message list, and the lock caused that keypress to be repeated, deleting about a dozen messages that I then needed to retrieve from the trash.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The log messages you mention seem to be describing symptoms of the problem but not the cause.

In order to find the cause of the problem, first please try uninstalling the 'gsconnect' extension and then reboot. Then tell us if the problem still happens.

Please also run these commands and send us the output of each:

  lspci -k

  glxinfo | grep OpenGL

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
tags: added: performance
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Thanks! My searches before filing the bug suggested that the log messages were symptoms, but I was unable to find any guideline on how to diagnose further.

I've uninstalled gsconnect (both the Gnome extension, and the accompanying Chrome extension), and fully rebooted. The locks still occur.

Some extra information:

1. In trying to pin down the cause, I…
   - Uninstalled zeitgeist
   - Disabled tracker: https://gist.github.com/vancluever/d34b41eb77e6d077887c#non-invasive-disable-cheat-sheet

Neither of these made a difference.

2. I also identified what seems to be a separate issue: https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-desktop-icons/+bug/1826604

3. Finally, I notice differences between the bug in the default 'Ubuntu' session and the 'Ubuntu on Wayland' session. The initial bug report, above, was from 'Ubuntu on Wayland'. In the default 'Ubuntu' session:
- The display and keyboard input lock, but the mouse cursor can still be moved.
- The 'Key repeat discarded' and 'libinput error' log messages do not occur.

Other symptoms (e.g. CPU usage spike for gnome-shell) are the same.

Changed in gnome-shell (Ubuntu):
status: Incomplete → New
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

More information, as this continues to occur:

- If I have audio playing (e.g. streaming music in Chrome) then the audio continues to play smoothly while the input and display lock.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel C (djcater) wrote :

Hi Paul, thanks for pointing me to this bug from https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1827791.

Is this also on a Dell XPS 13 9380?

Your comment about Wayland made me curious, as I was using the default Xorg session.

Testing with Wayland on 19.04 I also see the same problem (actually I think it's more prominent with Wayland than it was with Xorg).

I also see lines like this in journalctl -b0:

May 13 21:34:46 daniel-XPS-13-9380 org.gnome.Shell.desktop[1673]: Window manager warning: last_user_time (242191) is greater than comparison timestamp (242190). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...
May 13 21:34:46 daniel-XPS-13-9380 org.gnome.Shell.desktop[1673]: Window manager warning: W1 appears to be one of the offending windows with a timestamp of 242191. Working around...

And:

May 13 21:41:21 daniel-XPS-13-9380 org.gnome.Shell.desktop[1673]: libinput error: event5 - DELL08AF:00 06CB:76AF Touchpad: kernel bug: Touch jump detected and discarded.
May 13 21:41:21 daniel-XPS-13-9380 org.gnome.Shell.desktop[1673]: See https://wayland.freedesktop.org/libinput/doc/1.12.6/touchpad-jumping-cursors.html for details

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

@djcater this is a Dell XPS 13 9360 (not -80)—slightly older (2017 or 2018).

Also seeing this third bug which echoes some of my symptoms:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1828967

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 19.04 (disco) reached end-of-life on January 23, 2020.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in gnome-shell (Ubuntu):
status: Confirmed → Won't Fix
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.