On both Ubuntu 21.10 and Ubuntu 20.04 LTS, display update pauses for 2 seconds multiple times per minute.
I've been experiencing what appears to be the same issue as this question, first on Ubuntu 20.04 LTS, and now again on Ubuntu 21.10. The issue occurs very frequently and I find it so frustrating that it makes the computer almost unusable.
Ubuntu 21.10
In troubleshooting on Ubuntu 21.10, I suspect this issue is related to the Xorg
process and is specific to kernel Linux 5.13.0-21-generic
. This combination is the default after installing and upgrading Ubuntu 21.10. It does not appear to occur when selecting the previous kernel Linux 5.13.0-20-generic
or when using Wayland, rather than Xorg.
In my case, the pauses occur only while moving the cursor or upon typing on the keyboard. Each pause is approximately 2 seconds and pauses all display updates, including the cursor movement in the Ubuntu GUI, typing entry, video playback, etc. When it is happening, the pause happens multiple times every minute. The issue does not appear related to recovering from idle input: It does not occur every time that I resume cursor or keyboard input, and does occur randomly after I have already been providing input for some time. Sometimes the computer can go for longer periods without this issue occurring and it is not clear why.
On a recent (last weekend) fresh install of Ubuntu 21.10, this behavior appeared to start only after upgrading Ubuntu via sudo apt dist-upgrade
. The issue had previously occurred on Ubuntu 20.04 LTS and recurred after a reinstall of Ubuntu 20.04 LTS.
In troubleshooting on Ubuntu 21.10, I have identified that each pause is consistently matched with a spike in CPU activity for the Xorg
process, as seen in top. Xorg
CPU is normally low between the pauses: 0% to 0.3% with occasional spikes to 4%. Upon each pause, and only upon a pause Xorg
spikes to 30% to 60% CPU. Xorg
VIRT
is around 24.8g
as shown in top
. No other process is using as much CPU. free
shows 57Gi
Mem
available and 2Gi
Swap
free
.
The issue occurs even with no user applications open, with Bluetooth and Wi-Fi off, and no peripherals connected, and occurs both when connected to power and when on battery.
My computer is a Lenovo Thinkpad X1 Extreme Gen 2, Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 64GB RAM, NVIDIA GeForce GTX 1650 Mobile. Swap is set at the default 2GB, but remains completely free and unused while this issue occurs. Kernel is Linux 5.13.0-21-generic
.
It took me several weeks to find this related issue (vs many issues about more persistent freezes of the GUI), so including some keywords I had searched: pausing cursor and keyboard, pointer stopping, display stuttering.
The issue appears to require the combination of kernel Linux 5.13.0-21-generic
and Xorg
:
- After booting with
Advanced options for Ubuntu
and selecting the previous kernel Linux 5.13.0.20-generic
and keeping the default Ubuntu
(not Ubuntu on Xorg
), this issue did not recur (over some limited use), but my external display is no longer recognized over USB-C. In this configuration, Xorg
is not active as seen in top
.
- After booting to the default kernel
Linux 5.13.0.21-generic
, but selecting Ubuntu on Wayland
in the settings of the login screen, this issue did not recur (over some limited use), but the Ubuntu GUI crashes upon plugging in my external display over USB-C. In this configuration, Xorg
is not active as seen in top
.
- After booting with
Advanced options for Ubuntu
and selecting the previous kernel Linux 5.13.0.20-generic
and selecting Ubuntu on Xorg
, this issue did not recur (over some limited use).
Looking back at the combination with the issue (booting with kernel Linux 5.13.0-21-generic
and Xorg
), dmesg
consistently shows several entries [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
around 24 seconds. These entries are not present on dmesg
during the other 3 combinations of kernel and Xorg/Wayland. These entries occur even when the pausing symptom has not yet occurred, and it is unclear if the entries are related to the pausing issue.
Ubuntu 20.04 LTS
This issue also occurs on Ubuntu 20.04 TLS which has the Xorg
process and kernel Linux 5.11.0-38-generic
by default after installing and upgrading. The Wayland option does not appear to be available during logon.
I appreciate any suggestions for further troubleshooting.