Stuttering after running DE for a while (Xorg)

Any and all windows can start stuttering and just not stop. Sometimes its just one instance, sometimes it cascades to other windows from other applications. This is usually fixed by just closing the window and opening it again (discord/telegram) or restarting the program (firefox, as i can’t transfer all my tabs at once, esp. with a stutter).

This seems to be an issue related to wayland as it has only started in the last 1 or 2 months.

Any info I can provide, I will gladly, just ask for it and explain how to get it.

relevant neofetch info:

OS: EndeavourOS Linux x86_64
Kernel: 5.18.8-arch1-1 
Uptime: 3 days, 9 hours, 44 mins
Packages: 1416 (pacman), 6 (flatpak)
DE: Plasma 5.25.2 
WM: KWin

Two questions:

  • What do you mean by stuttering?
  • Why do you believe it is related to wayland?

Lets say i start a video, it starts repeating the same video clip every 3 seconds, even as I can hear the audio continue on normally. Selecting a different tab is impossible, without alt-tabbing twice, opening a new tab same issue, etc. Basically it gets stuck in a loop showing the same thing and while clicks obviously do something (as i can close a tab, hear the video stop playing, yet visually nothing has changed) One way I found to still see a somewhat low framerate video is to just alt tab constantly. For whatever reason, focusing elsewhere and back allows it to redraw whatever it was missing.

I believe it is wayland because wayland is the big new thing which has been added somewhat recently to pretty much every program and things worked fine just a few months ago. And because the issue seems to not be related to any specific program, as it seems to affect any random number of programs. I notice it by firefox the most, but I had it cascade down towards discord, and in rare instances go from discord and appear on firefox. At one point I noticed sysmonitor being affected as well. I know that firefox runs wayland, as I checked about:support and ctrl-f for “wayland” and found several results. If you have another way to check other programs, I am willing to check elsewhere as well.

Maybe uptime is the issue, as it tends to happen more often the longer the machine is running the same session (i update and restart once a week).

What is the hardware? Post the link.

inxi -Faz | eos-sendlog

I am not sure if it is the same issue or not but I see nearly the exact same behaviour as you on my machine. It starts after the machine has been up and running for some period of time(days). Impacts applications seemingly randomly. It doesn’t seem to be related to actual application performance, purely the way that they are drawn on the screen. The result is that either blink, loop back and forth or somply don’t redraw at all unless I trigger a redraw by switching desktops back and forth or taking some other action which triggers a redraw.

I see this behavior on both X11 and wayland. I am not sure if it is the same thing you are seeing but I have never heard of anyone else but me with those symptoms before.

here: https://clbin.com/pkWP1

As for the similarities that you, dalto, are pointing out, i hope it’s not xorg related as well. Because then finding the cause of the issue becomes much harder. But it does sound similar.

I see it’s ryzen with amd. You shouldn’t be having any issues especially on x11. I run plasma on Ryzen and amd on x11 and i don’t have these kind of issues you describe. My guess would be flatpak.

It is an easy test, just flip back to X11 from your display manager and see if it happens there as well.

Although, it looks like you are running X11 already. Are you sure you are using Wayland at all @Avald?


This and WebGL 2 Driver WSI info has the same thing show up, when i use about:support.

That doesn’t mean you are running wayland.

Your inxi info shows you are running X11.

You can also check by running env | grep -i wayland.

I think you are right, found only one variable pointing towards it, except it’s from a previous attempt at getting firefox to stop having this issue.

Changed title at the top to reflect this.

1 Like

I don’t think you should be having any issues on the ryzen hardware with amd on KDE. Have you checked for any UEFI Bios updates? I’m still leaning towards it’s related to flatpak though.

So turns out that the latest BIOS update was about “Fix AMD fTPM issue causes random stuttering.” While i have flashed the bios with the new update (hadn’t needed to for the last 3 years), i somehow doubt that memory writing stutters would only affect the drawing of specific programs. But who knows, it might help.

I guess now we just have to wait and see. How much uptime do you typically need before you start seeing the behaviour?

2-3 days, sometimes quicker, sometimes longer. We’ll see, if i make it to day 4, i will consider it tentatively fixed and by day 7, i will see no reason to consider it an issue anymore.

That is more or less exactly how it works for me. It seems more and more likely we are seeing the same issue.

Update: Just happened to discord with me, seems the bios update didn’t fix things :frowning: . Started a video, got near the end and it started repeating the same few frames. Minimized video and alt-tabbed from and back to discord and now all of discord is having the same loop issue.

The only similarities I see between our systems are:

  • ASUS motherboards
  • AMD CPUs of roughly the same age
  • AMD GPUs
  • plasma
System:
  Host: hostname Kernel: 5.18.9-arch1-1 arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.25.2 Distro: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX X399-E GAMING v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 1205
    date: 05/12/2020
CPU:
  Info: 8-core model: AMD Ryzen Threadripper 2950X bits: 64 type: MT MCP MCM
    cache: L2: 8 MiB
  Speed (MHz): avg: 2068 min/max: 2200/3500 cores: 1: 2602 2: 1711 3: 1930
    4: 1714 5: 1888 6: 2053 7: 1886 8: 1891 9: 2140 10: 2099 11: 1887 12: 2531
    13: 2125 14: 1902 15: 2179 16: 1858 17: 3928 18: 1954 19: 2075 20: 1854
    21: 1888 22: 1908 23: 1890 24: 1889 25: 1907 26: 1888 27: 1754 28: 2784
    29: 2080 30: 2173 31: 1933 32: 1887
Graphics:
  Device-1: AMD Vega 10 XL/XT [Radeon RX 56/64] driver: amdgpu v: kernel
  Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.2 driver: X:
    loaded: amdgpu unloaded: modesetting gpu: amdgpu resolution: 1: 2560x1440
    2: N/A 3: 2560x1440
  OpenGL:
    renderer: AMD Radeon RX Vega (vega10 LLVM 14.0.6 DRM 3.46 5.18.9-arch1-1)
    v: 4.6 Mesa 22.1.3
Info:
  Processes: 1006 Uptime: 1d 20h 28m Memory: 62.65 GiB
  used: 23.12 GiB (36.9%) Shell: Zsh inxi: 3.3.19

What could (ever) be wrong with sudo shutdown now ?

The loss of all the jobs running?