libinput says "your system is too slow"

Bug #1870597 reported by Seija K.
176
This bug affects 48 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
Linux
Confirmed
Medium
libinput
Fix Released
Unknown
libinput (Ubuntu)
Fix Committed
Wishlist
Unassigned
linux (Ubuntu)
Confirmed
Low
Unassigned
mutter (Ubuntu)
Triaged
Low
Unassigned
xorg-server (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

During the freeze, the output of the install had a message from "gdm-x-session" saying "your system is too slow".

To reproduce:
1. Launch the Ubuntu installer
2. Begin the installation process
3. When the installation process begins, move the cursor around
4. Notice how the PC freezes and drops mouse events

Description: Ubuntu Focal Fossa (development branch)
Release: 20.04

gnome-shell:
  Installed: 3.36.0-2ubuntu2
  Candidate: 3.36.0-2ubuntu2
  Version table:
 *** 3.36.0-2ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-shell 3.36.0-2ubuntu2
ProcVersionSignature: Ubuntu 5.4.0-21.25-generic 5.4.27
Uname: Linux 5.4.0-21-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu21
Architecture: amd64
CasperVersion: 1.442
Date: Fri Apr 3 14:24:21 2020
DisplayManager: gdm3
GsettingsChanges:

LiveMediaBuild: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200401)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: mutter-common 3.36.0-2ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Xorg log: scheduled expiry is in the past... your system is too slow

Sounds like another libinput message, which is actually a mutter issue. See also bug 1588009 and bug 1856553

summary: - Gnome slows down and stutters when I move the mouse while the installer
- is installing ubuntu 20.04
+ Xorg log: scheduled expiry is in the past... your system is too slow
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although Xorg is a different process. So this is in the same family of issues, but Xorg and not Mutter.

affects: gnome-shell (Ubuntu) → xorg-server (Ubuntu)
Seija K. (rose128)
tags: added: apport-collected ubuntu
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Xorg log: scheduled expiry is in the past... your system is too slow

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

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
summary: - Xorg log: scheduled expiry is in the past... your system is too slow
+ scheduled expiry is in the past... your system is too slow
summary: - scheduled expiry is in the past... your system is too slow
+ libinput says: scheduled expiry is in the past... your system is too
+ slow
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: libinput says: scheduled expiry is in the past... your system is too slow

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

Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
Michel Mougey (mike2034) wrote :

My system randomly freeze with these kind of messages attached.
I'm streaming music from this computer (samoa) and everything works fine, the streaming continue without problem. But I can't login locally. I can login remotely from another computer and kill many processeson samoa, but I am unable to perform a shutdown! I had to do a hard reset...

Changed in xserver-xorg-input-libinput (Ubuntu):
status: New → Confirmed
tags: added: performance
Revision history for this message
In , dor.askayo (dor.askayo-linux-kernel-bugs) wrote :
Download full text (3.3 KiB)

Issue description

Distinct input events can incorrectly share the same timestamp, even though they were actually generated a few milliseconds (or even seconds) apart and a "SYN_REPORT" event occurred between them. See example output below.

...
Event: time 1616757853.303892, -------------- SYN_REPORT ------------
Event: time 1616757853.337911, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 2
Event: time 1616757853.337911, -------------- SYN_REPORT ------------
Event: time 1616757853.372886, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 2
Event: time 1616757853.372886, -------------- SYN_REPORT ------------
Event: time 1616757853.406914, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 2
Event: time 1616757853.406914, -------------- SYN_REPORT ------------
Event: time 1616757853.440892, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 2
Event: time 1616757853.440892, -------------- SYN_REPORT ------------
Event: time 1616757853.474907, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 2
Event: time 1616757853.474907, -------------- SYN_REPORT ------------
Event: time 1616757853.508886, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 2
Event: time 1616757853.508886, -------------- SYN_REPORT ------------
Event: time 1616757853.508886, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e4
Event: time 1616757853.508886, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 0
Event: time 1616757853.508886, -------------- SYN_REPORT ------------

Reproduction steps

To reproduce the above:
1. Run evtest and select a device that supports emulated repeat events. (such as a keyboard)
2. Press and hold a key for a few seconds and then release.
3. Notice that the "release" event (value 2) incorrectly shares the same timestamp as the last repeat event "value 0".

Prior work

* A similar issue was fixed in 6c7e54bd5fda ("Input: reset device timestamp on sync") by making sure the timestamp is reset after a "SYN_REPORT" event is generated, forcing a new timestamp to be created for following events. However, it only handled the case of events that were sent to the input_handle_event() function, and didn't cover "SYN_REPORT" events that were generated internally in the input core, such as emulated repeat events.
* Another similar issue was fixed by cb5a89cdbaec ("Input: fix stale timestamp on key autorepeat events") which made sure that each repeat event got an updated timestamp. However, it didn't prevent those timestamps from becoming stale and used by following events.

Proposed fix

The attached patch resets the timestamp similarly to 6c7e54bd5fda ("Input: reset device timestamp on sync"), but does so in every case a "SYN_REPORT" event is generated by the input core. The idea being that the next event sequence would then be forced to get a new timestamp.

Related issues

* https://bugzilla.kernel.org/show_bug.cgi?id=206929 - The original bug report where this issue was reported, which was only partially fixed by cb5a89cdbaec ("Input: fix stale timestamp on key autorepeat events"). While "repeat" events had their timestamps update correctly, the "release" event did not.
* https://gitlab.freedesktop.org/libinput/libinput/-/issues/571#note_855553 - An issue about errors...

Read more...

Revision history for this message
In , dor.askayo (dor.askayo-linux-kernel-bugs) wrote :

Created attachment 296099
0001-Input-reset-timestamp-after-SYN_REPORT-events.patch

tags: added: hirsute
Revision history for this message
Ian Douglas (ixd704) wrote :

I have the same sort of issue... Ubuntu 20.04 (Ubuntu Studio spin).

From Xorg.0.log
[ 13886.780] (EE) client bug: timer event4 debounce short: scheduled expiry is in the past (-9ms), your system is too slow
[ 13926.080] (EE) client bug: timer event4 debounce: scheduled expiry is in the past (-15ms), your system is too slow

Video freezes, external display will go black or the system will crash (I expect it is only X that crashes because if I am editing audio in Audacity, the audio will continue to play, yet I will have to hard reset my machine to regain control. Keyboard and mouse input are dead as part of X system. I have not tried remoting in to it from another machine yet.

Running a MacBook Pro retina mid 2012 with 8GB RAM and the i7 processor with GeForce GT 650M Mac Edition graphics chip at 4K@30Hz output. If I have the system running powersave, I get the hard crashes, with ondemand governor I get the timeouts. Going to performance causes the fans to run all the time which is loud.

Revision history for this message
In , michel (michel-linux-kernel-bugs) wrote :

I suspect you need to just submit the patch by e-mail according to the kernel development process. Running

 scripts/get_maintainer.pl 0001-Input-reset-timestamp-after-SYN_REPORT-events.patch

in a kernel tree prints the maintainers and lists where the patch should be sent to.

Revision history for this message
P.Constantine (pconstantine) wrote :

Looks like the incarnation of "intel gdm" bug to me, where pressing Alt would unfreeze everything.
But that time it's for NV and pressing Alt doesn't help at all.
The scenarios are the same though for me: any hard work done by JetBrains Idea and it freezes for some time.

Revision history for this message
Song Yangyu (flyfy1) wrote :

Encountered similiar issue. I have: CPU - AMD 3700X; GPU - GeForce RTX 2060

Here're the related logs:

Aug 15 14:34:12 desktop kernel: NVRM: GPU at PCI:0000:07:00: GPU-fdd266b8-85b0-372c-6113-8dff8957ba75
Aug 15 14:34:12 desktop kernel: NVRM: Xid (PCI:0000:07:00): 8, pid=1350, Channel 00000010
Aug 15 14:34:21 desktop /usr/lib/gdm3/gdm-x-session[1084]: (II) event6 - USB Optical Mouse: SYN_DROPPED event - some input events have been lost.
Aug 15 14:34:21 desktop /usr/lib/gdm3/gdm-x-session[1084]: (EE) client bug: timer event6 debounce: scheduled expiry is in the past (-1227ms), your system is too slow
Aug 15 14:34:21 desktop /usr/lib/gdm3/gdm-x-session[1084]: (EE) client bug: timer event6 debounce short: scheduled expiry is in the past (-1240ms), your system is too slow
Aug 15 14:34:22 desktop google-chrome.desktop[2901]: [0815/143422.499770:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
Aug 15 14:34:22 desktop google-chrome.desktop[2901]: [2893:2923:0815/143422.525266:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
Aug 15 14:34:23 desktop kernel: sched: RT throttling activated
Aug 15 14:34:24 desktop /usr/lib/gdm3/gdm-x-session[1084]: (EE) NVIDIA(GPU-0): WAIT (2, 8, 0x8000, 0x0000a2d0, 0x0000df98)
Aug 15 14:34:31 desktop /usr/lib/gdm3/gdm-x-session[1084]: (EE) NVIDIA(GPU-0): WAIT (1, 8, 0x8000, 0x0000a2d0, 0x0000df98)

Revision history for this message
Song Yangyu (flyfy1) wrote :

note that when I encountered the issue, I was just browsing webpage with my Chrome. Nothing CPU/GPU intensitve task is running.

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

> scheduled expiry is in the past (-1227ms), your system is too slow

That's a stutter of over a second between frames which is higher than usual. Please make sure you are not using any GNOME extensions that didn't come with Ubuntu.

Revision history for this message
Aakarsh (akss13) wrote :

I am encountering a similar issue. My system completely shuts down without any warning while doing nothing resource-intensive. The log just before shutting down is as follows:

/usr/lib/gdm-x-session[1011]: (EE) client bug: timer event20 debounce: scheduled expiry is in the past (-0ms), your system is too slow
/usr/lib/gdm-x-session[1011]: (EE) client bug: timer event20 debounce short: scheduled expiry is in the past (-13ms), your system is too slow

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

To be fair, "your system is too slow" really means the architecture of Mutter (used in gnome-shell) is too slow. Not the hardware.

This problem is being improved in newer versions of Mutter using some threading, but generally it's not an issue anyone should be concerned about.

Changed in mutter (Ubuntu):
importance: Undecided → Low
no longer affects: xorg-server (Ubuntu)
no longer affects: xserver-xorg-input-libinput (Ubuntu)
Changed in mutter (Ubuntu):
status: Confirmed → Triaged
Changed in xorg-server (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
summary: - libinput says: scheduled expiry is in the past... your system is too
- slow
+ libinput says "your system is too slow"
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There is a kernel regression that causes some of the problem:

  https://bugzilla.kernel.org/show_bug.cgi?id=212461

But other than that it should be mostly fixed, not entirely, in GNOME 40.

Changed in linux (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , alexey (alexey-linux-kernel-bugs) wrote :

Was this patch sent to the maintainers? If so, was it applied?

tags: removed: hirsute
Revision history for this message
Angel D. Segarra (angel-segarra) wrote :

I'm getting spammed by libinput messages about the system being slow. A couple of patches in libinput were merged to master about month ago that rate limits some messages that previously were not, and should at least stop the spamming of messages, if you use a wireless mouse for example the journal gets flooded if you're doing a lot of mouse movements.

Please consider backporting these.

https://gitlab.freedesktop.org/libinput/libinput/-/commit/a1e9150210abda0d3dd41127330cd7985d29957d
https://gitlab.freedesktop.org/libinput/libinput/-/commit/64a49d18b948a5b8ac88da9207689af356a081cf

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

I see the messages with higher numbers than 20ms in some bug reports so the above change won't really solve it, just reduce the number of people who see the message.

Luckily, gnome-shell 40 in Ubuntu 21.10 and gnome-shell 41/42 in Ubuntu 22.04 changes the input system to fix more cases. Maybe not 100% still...

The kernel bug also sounds very relevant: https://bugzilla.kernel.org/show_bug.cgi?id=212461

Changed in libinput (Ubuntu):
importance: Undecided → Wishlist
status: New → Fix Committed
tags: added: fixed-in-libinput-1.20
Changed in libinput:
status: Unknown → Fix Released
Seija K. (rose128)
description: updated
information type: Public → Private
description: updated
information type: Private → Public
Revision history for this message
LittleBigBrain (braingateway) wrote :

The problem come back again after recent updates in ubuntu 20.04. System is stuttering when moving mouse and typing on keyboard:
mutter 3.36.9-0ubuntu0.20.04.2
xserver-xorg-input-libinput 0.29.0-1
libinput10:amd64 1.15.5-1ubuntu0.3
GNOME Shell 3.36.9
xorg-server 2:1.20.13-1ubuntu1~20.04.3
5.15.0-46-generic

Lot of errors like following in journald:
```
/usr/lib/gdm3/gdm-x-session[4273]: (EE) client bug: timer event16 debounce short: scheduled expiry is in the past (-2ms), your system is too slow
/usr/lib/gdm3/gdm-x-session[4273]: (EE) client bug: timer event16 debounce: scheduled expiry is in the past (-1ms), your system is too slow

```

Other DE does not have this issue.

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

Please try Ubuntu 22.04 when you can because it is much faster:

https://ubuntu.com/download/desktop

tags: added: logspam
Changed in gnome-shell:
status: Unknown → Fix Released
Revision history for this message
beadon (bryant-eadon) wrote :

I am seeing this issue in Ubuntu 22.10 , specifically for a Razer Deathadder mouse :

Jan 17 17:59:28 semiauto /usr/libexec/gdm-x-session[2147]: (EE) event20 - Razer Razer DeathAdder: client bug: event processing lagging behind by 24ms, your system is too slow

Which information do you need to troubleshoot further ?

Revision history for this message
Tuomas Jaakola (iqqmut) wrote :

I have two laptops with Ubuntu 22.04 and only one laptop has random freezes with this syslog:

Aug 29 15:20:23 pulse /usr/libexec/gdm-x-session[1287]: (II) event6 - Logitech M705: SYN_DROPPED event - some input events have been lost.
Aug 29 15:20:23 pulse /usr/libexec/gdm-x-session[1287]: (EE) client bug: timer event6 debounce: scheduled expiry is in the past (-1246ms), your system is too slow
Aug 29 15:20:23 pulse /usr/libexec/gdm-x-session[1287]: (EE) client bug: timer event6 debounce short: scheduled expiry is in the past (-1259ms), your system is too slow

$ uname -a
Linux pulse 6.2.0-31-generic #31~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Aug 16 13:45:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Once X got frozen permanently and I had to login via SSH to restart the X system.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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