[Warning] Ubuntu 21.10 Wayland issues

This is mostly a heads up for other Ubuntu users.

TL;DR: 21.10 has some interesting issues with Wayland. I was seeing hard locks lasting just shy of 1 second all the way up to 4+ seconds at least once a minute, if not as frequently as multiple times in a 10 second span.

Longer version:
I luckily have 2 identical NVMe drives, so before doing an in-place upgrade from 21.04 to 21.10 I cloned my drive. After the clone, I did a do-release-upgrade, and while everything appeared fine the TL;DR began happening pretty quickly. It’s brief enough that at first I thought it was just in my head, but eventually it was quite obvious. I thought it was just the mouse pointer, then noticed typing would hard-lock at the same time, and the clock was always freezing during the lock ups. I switched to Xorg and it was fine.

For now I’ve just stuck my original NVMe back in. I don’t have the time right now to troubleshoot in depth, but I’m guessing there is an issue with the Wayland Intel driver.

4 Likes

Yup Ubuntu 21.10 is freezing up every few seconds. I wish something in the logs would point to what’s causing this.

3 Likes

Any chance this is the dreaded PSR problem? It certainly manifests as visual stuttering, though I don’t recall the freezes lasting that long…

3 Likes

Thanks for this, I just upgraded from Kubuntu 21.04 to Ubuntu 21.10, and was wondering what was going on.

Of course, I have to get my system running again before I can try running in XOrg. Somehow I managed to break the login when installing fprintd.

1 Like

Yes I am running into the same issue too. Everything else works like a charm but the odd delay and stuttering is new.

thanks for the heads up, I was about to upgrade!

Hmm…now that I have my system running again, I have tried XOrg.

I still see some of the same issues. Possibly they are less problematic, but I am definitely still seeing stuttering and visual artifacting. I have confirmed that I am running on XOrg with echo $XDG_SESSION_TYPE.

I may be downloading the 21.04 image again.

I fixed the stuttering by doing the following:

  1. Updated /etc/default/grub by adding i915.enable_psr=0 to GRUB_CMDLINE_LINUX_DEFAULT. Example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.enable_psr=0"
  1. Ran sudo update-grub
  2. Rebooted.

This was mentioned in the Fedora 34 post related to Trackpad Cursor Lag / Vertical Screen Tearing.

12 Likes

So then this isn’t really Wayland related?

Disabling PSR seems to have worked for me.

Honestly, it might be complicated. In the last month or so Debian testing transitioned to Gnome 40. Prior to that I was running the 5.12 kernel using Gnome 3.38 with Wayland and PSR enabled and I had no issues.

I upgraded to Gnome 40 and on the same kernel the stuttering started to occur. Fortunately they subsequently moved to the 5.14 kernel and the problem went away again.

So there must be something going on in Mutter that triggers the issue.

Based on my experience and data I found, it is most likely an issue with Intel Xe support in the 5.13 kernel:

  • I have Ubuntu 21.10 installed on a separate machine that is all AMD and it is working perfectly fine.
  • I found a bug that points to this being an issue specific to the 5.13 kernel and Intel Xe. The filer appears to be using the newer kernel on an older version of Ubuntu that defaults to X11 and the user is running KDE.

But it could be a combination of things as Brett suggested. What is certain is that disabling PSR seems to be the workaround.

2 Likes

Echoing as others, using @Rob_H 's instructions above it does seem like disabling PSR has addressed the issue.

I’m guessing that the difference between Wayland and X11 some of us are seeing is less due to a difference in the drivers, but more in how Wayland and X11 “allow” the driver to let the display self refresh. X11 might be far more strict/demanding, and force the display to refresh more than Wayland does, so the issue is more prominent in Wayland.

At least a few minutes in for me and I’m not seeing any issues like I did at first. Thanks Rob! Now just to see if I have any more fun stuff to deal with :slight_smile:

2 Likes

I did find in my own setup that picom seems to refresh regions of the screen that are updated even if the updated window is covered by other opaque windows. I had a widget that was refreshing at a ridiculous rate, so even when it was covered I wasn’t getting into PSR (i.e. I was never getting to pc9 or pc10 in powertop) unless I killed picom. Then I found picom’s --monitor-repaint option and was able to see that widget constantly repainting.

I have no idea about Gnome, but maybe in X11 its compositor is doing something similar, preventing PSR from activating.

Can you confirm that the PSR fix addresses this issue. Everything seems to be running well except the fingerprint reader.

Nixingit

Can you confirm that the PSR fix addresses this issue. Everything seems to be running well except the fingerprint reader.

Sorry, just checking if this is a typo or something. Did you mean “Can confirm that the PSR fix addresses the issue.” Or “Can you confirm that the PSR fix addresses this issue?” It reads like the former, but not certain.

If the latter, I’ve now been using 21.10 since Friday afternoon with the PSR disabled fix and it’s been good for me.

Disabling PSR in the grub config solves the problem

Upgrading to Kernel 5.14 corrected the issue without the need to disable PSR which lead to power management issues in 5.13. Haven’t completely vetted the Kernel yet since I just YOLO’d it and went straight to 5.14.13, I may have opened the door to other issues but more to follow.

1 Like

Best to run some tests with Bluetooth after a warm reboot. There’s a number of threads about Bluetooth issues with the AX210 on anything other than the 21.04 5.10 kernel or the 5.12 series (neither of which contain the PSR fix).

@Brett_Kosinski I’ve seen the same however so far so good on Bluetooth, still vetting though.