Bug 474725 - Screen randomly freezes for a second
Summary: Screen randomly freezes for a second
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 5.27.8
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, regression
Depends on:
Blocks:
 
Reported: 2023-09-20 08:50 UTC by Vlad Zahorodnii
Modified: 2024-02-09 03:31 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2023-09-20 08:50:33 UTC
When moving the cursor, the screen randomly freezes.

As far as I can tell, the issue appeared since https://invent.kde.org/plasma/kwin/-/commit/76c3e57bef56e46c75e010bdd43a595b80e927ed
Comment 1 Nate Graham 2023-09-20 15:55:33 UTC
I have not encountered this myself with a 10th gen Intel iGPU, FWIW.
Comment 2 Pawel 2023-09-20 16:48:19 UTC
I get this on 5.27.9 on Arch.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Comment 3 Marcus Seyfarth 2023-10-01 07:17:35 UTC
FWIW, I also get random screen freezes with 5.27.8 on CachyOS. Once they are there, the desktop becomes next to unusable and have to re-start the system.
Comment 4 Vlad Zahorodnii 2023-10-05 10:16:33 UTC
(In reply to Marcus Seyfarth from comment #3)
> FWIW, I also get random screen freezes with 5.27.8 on CachyOS. Once they are
> there, the desktop becomes next to unusable and have to re-start the system.

Are you a laptop user?
Comment 5 Marcus Seyfarth 2023-10-05 10:31:53 UTC
(In reply to Vlad Zahorodnii from comment #4)
> (In reply to Marcus Seyfarth from comment #3)
> > FWIW, I also get random screen freezes with 5.27.8 on CachyOS. Once they are
> > there, the desktop becomes next to unusable and have to re-start the system.
> 
> Are you a laptop user?

No. But my screen freezes were likely something else as I could also repro it with 5.27.7 on my system which was fine some weeks ago. I since re-compiled a couple of other patches on the system and haven't seen it since.
Comment 6 Nate Graham 2023-10-07 02:45:03 UTC
Lowering priority since we're only using HI and VHI priorities for bugs in released software, not things that are master-only right now. Raising severity to compensate.
Comment 7 Alex Barrero 2023-10-09 08:13:32 UTC
Hi, I'm a Kde Neon user on a AMD CPU desktop PC using the wayland session. I have suffered also this freezes for almost a month I think. FWIW, I have a Intel laptop also with KDE Neon wayland and without issues so far.

Yesterday I tried on desktop the X11 session without any issue.

Any additional information that can be added and how to get it after the crash?
Comment 8 Zamundaaa 2023-10-09 12:04:01 UTC
This bug report is not about the screen freezing and not recovering, and not about any crashes, it's about brief temporary freezes that are specifically a regression on git master.
Please make separate bug reports about those other issues
Comment 9 Marc 2023-10-20 11:49:19 UTC
On my latop a Lenovo ThinkPad X1 Carbon Gen 10 this is a huge problem. These stutters occur every couple of minutes, sometimes even multiple times per minute and the complete system hangs for some 100ms or sometimes some seconds.

When the stutter occurs it is often the case that the keypress is repeated tens to hundred of times. So I type, the stutter occurs and my input looks like thiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis.

It's beyond annoying and makes the laptop hardly usable on the STABLE KDE VERSION 5.27.8. So this is definitely not only a master issue for Plasma 6. So it's also affecting Qt5 (5.15.11 in my case).

To me it seems like an issue in the graphics stack. Either the Intel driver itself or Qt. I have an Intel i7-1265U with Intel Graphics.

I assume this issue is much more common than this bug reports suggests so far. I wasn't sure where the stutter comes from and didn't know where to report the bug to until I stumbled on this report.

Maybe Arch users are particularly affected because they typically use the most up to date packages and kernels. So it could indeed be a regression in some area of the software stack.
Comment 10 Podagric 2023-12-01 01:32:21 UTC
I've just upgraded to plasma 6 and I'm having this problem too. It happened to me about three times in the current section, right at the beginning, but I've been using it for a while now and it hasn't happened again.

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.5.7-273-tkg-linux-tkg-bmq-generic_v3 (64-bit)
Graphics Platform: X11
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
Comment 11 Jonathan Isom 2023-12-04 14:17:53 UTC
I am getting this on 6.0 Beta 1. I regularly see this by (un)maximizing a window such as Firefox, but not always.

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.4-273-tkg-linux-tkg (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4080/PCIe/SSE2
Product Name: X570M Pro4
Comment 12 fanzhuyifan 2023-12-05 00:24:28 UTC
For me this only seems to happen when my cursor is on an external monitor.
At least in my case, this might be related to https://bugs.kde.org/show_bug.cgi?id=452219

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i9-13900H
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® Graphics (intel iGPU, nvidia dGPU)
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Zephyrus G16 GU603VV_GU603VV
System Version: 1.0
Comment 13 Podagric 2023-12-15 21:35:03 UTC
I've been using an AMD GPU for some time and haven't had this problem since. When I had this problem before, I was using the integrated graphics of the Intel CPU.
Comment 14 Bug Janitor Service 2024-01-09 09:42:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4858
Comment 15 Vlad Zahorodnii 2024-01-09 18:18:44 UTC
Git commit b214251f81cbacacf3ef483081a7cef15343fa7f by Vlad Zahorodnii.
Committed on 09/01/2024 at 19:03.
Pushed by vladz into branch 'master'.

Force software cursor on Intel devices

kwin randomly freezes for a second when calling glFlush or glFenceSync.
In principle, this should not happen.

M  +5    -2    src/compositor_wayland.cpp

https://invent.kde.org/plasma/kwin/-/commit/b214251f81cbacacf3ef483081a7cef15343fa7f
Comment 16 Marc 2024-01-29 19:41:09 UTC
For me the issue has almost disappeared somewhere at the end of december/beginning of january. The last two weeks the screen only very rarely froze. Maybe once every other day or so, whereas before it occurred very frequently.
Comment 17 Rean 2024-02-09 03:31:47 UTC
I thought this issue didn't affect me before, even though I was indeed getting freezes. I realized it when the patch to disable hardware cursors stopped the freezes on Plasma 6, so I left it disabled, but lately I decided to enable hardware cursors again using the env veriable and noticed the freezing not happening anymore. I don't know what it is; it could be a MESA update or something in Plasma 6 RC2. I don't know what changed, but the freezing issue with HW cursors is suddenly gone. I'm really glad that I don't have to use software cursors anymore because I notice the slowness of the mouse movement under heavy load, and that does not feel nice at all. Hopefully the next thing that gets fixed is the fact that the entire plasma desktop's slows down from a single graphical program running slowly i tested with compositor-killer.