Bug 494108 - Cursor and scrolling stutters heavily after update to 6.1.5-1, only one screen.
Summary: Cursor and scrolling stutters heavily after update to 6.1.5-1, only one screen.
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.1.5
Platform: Manjaro Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-04 13:15 UTC by Michał Dybczak
Modified: 2024-11-01 14:50 UTC (History)
0 users

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


Attachments
journald log (72.94 KB, text/x-log)
2024-10-04 13:15 UTC, Michał Dybczak
Details
list of upgraded packages (16.89 KB, text/plain)
2024-10-04 13:24 UTC, Michał Dybczak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Dybczak 2024-10-04 13:15:11 UTC
Created attachment 174408 [details]
journald log

SUMMARY

Sometimes (trigger unknown) a kwin_wayland bug appears, causing every graphical action to stutter heavily, basically as if FPS on visual effects was one frame per few seconds. In between, the system is frozen. This makes the system unusable (can't use mouse, pad, or basically any visual trigger). Even using keys, the effect shows with strong delay.

STEPS TO REPRODUCE
1.  Upgrade from Plasma 6.1.4-1 -> 6.1.5-1
2. Trigger unknown, but usually happens when watching YT videos, but occasionally.
3. 

OBSERVED RESULT

The system becomes unresponsive, almost impossible to control visually with mouse, pad or keys, because every visual effect shows after few seconds, while in between everything is frozen. There is no increased CPU or memory usage.
Journald shows infinite error lines:

kwin_wayland[1897]: kwin_scene_opengl: Invalid framebuffer status:  "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"


EXPECTED RESULT

No kwin_scene_opengl: Invalid framebuffer status bug, system works normally, fluently as usual.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.11.1-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: TUXEDO
Product Name: TUXEDO Sirius 16 Gen1

ADDITIONAL INFORMATION

I noticed, that the log lines have wrong time, an hour behind of what my time is set. So instead 14:46, journald shows 13:46. I'm not sure if that have something to do with the bug, but it's worth mentioning.
Most of the time the system works fine, but since this happens irregularly after Plasma update, I can't live with. After some time, I will have to restore the system from backup, so the bug is really severe. I'm trying to wait a bit, because maybe some additional info is needed, but this is a showstopper.
Comment 1 Michał Dybczak 2024-10-04 13:18:20 UTC
This bug seems to be similar to: 491751, not sure if that is the same one thou.
Comment 2 Michał Dybczak 2024-10-04 13:24:02 UTC
Created attachment 174409 [details]
list of upgraded packages

I'm sending the list of packages that got upgraded, after which the bug appeared.
Comment 3 Michał Dybczak 2024-10-05 13:00:42 UTC
I wonder if this bug has anything to do with this framebuffer bug, because I currently got the issue, within a minute after the boot. I only started Firefox (no video) and the stuttering began. I restarted and the only thing I can see in journald is:

paź 05 14:41:0 systemd[1688]: basic.target: Job paths.target/start deleted to break ordering cycle starting with basic.target/start
paź 05 14:45:31 (sd-pam)[1691]: pam_systemd(systemd-user:session): Failed to release session: Caller does not belong to any known session.

This time, the time in journald is correct, so I'm now confused.

Will keep watching and informing when the bug happens.
Comment 4 Michał Dybczak 2024-10-08 18:59:56 UTC
I'm staring to believe that this bug has nothing to do with framebuffer status. In only happens that sometimes this bug is there, but the fact that it's never timely matched with the stuttering effect or that in last two bug events there was no such frambuffer error in journald. In fact, there is no error that would match the issue. In last journald, I had plenty of libinput bugs, and they even end when the stuttering starts, but there is no other error at that time.

Here is some fragment of the last jounrald log:

paź 08 15:52:29 Sirius16-Manjaro kwin_wayland[1754]: kwin_libinput: Libinput: event19 - PNP0C50:0b 0911:5288 Touchpad: kernel bug: Touch jump detected and discarded.
                                                      See https://wayland.freedesktop.org/libinput/doc/1.26.2/touchpad-jumping-cursors.html for details
paź 08 15:52:29 Sirius16-Manjaro kwin_wayland[1754]: kwin_libinput: Libinput: event19 - PNP0C50:0b 0911:5288 Touchpad: WARNING: log rate limit exceeded (5 msgs per 24h). Discarding future messages.
paź 08 16:15:40 Sirius16-Manjaro kwin_wayland[1754]: kwin_libinput: Libinput: event19 - PNP0C50:0b 0911:5288 Touchpad: client bug: event processing lagging behind by 21ms, your system is too slow
paź 08 20:10:02 Sirius16-Manjaro kwin_wayland[1754]: kwin_libinput: Libinput: event19 - PNP0C50:0b 0911:5288 Touchpad: client bug: event processing lagging behind by 30ms, your system is too slow
paź 08 20:17:02 Sirius16-Manjaro kwin_wayland[1754]: kwin_libinput: Libinput: event19 - PNP0C50:0b 0911:5288 Touchpad: libinput bug: invalid gesture event GESTURE_EVENT_HOLD_TIMEOUT in state GESTURE_STATE_HOLD
paź 08 20:42:15 Sirius16-Manjaro kwin_wayland[1754]: kwin_libinput: Libinput: client bug: timer event19 hold: scheduled expiry is in the past (-73ms), your system is too slow

Exactly and 20:42 the display stuttering happened. I did nothing usual, was watching some video, and it happened in the middle of it. Other time I was just browsing files in Dolphin when it happened. So there is no distinctive trigger, and it lately happens daily, in the evening, which is weird.

So how to debug it in another way, if the bug is not written in journald?
Comment 5 Michał Dybczak 2024-10-09 18:04:45 UTC
Today, it happened already 4 times, so it gets more annoying. I hope that the new Plasma 6.2 will fix it, but that will be available realistically in 2 weeks or so.
Comment 6 Michał Dybczak 2024-10-12 15:22:41 UTC
Here is what I learned about this bug lately:

1. When using multimonitors, the stuttering is limited to laptop's screen, while on secondary one, it is mostly fluent but occasionally there are some fluency drops that pass (normally, there are no such problems).
2. This is definitely not a framebuffer bug and it doesn't show in journald, so the topic of this bug is wrong. It was just coincidence to see that bug in the logs. In fact, the framebuffer issue shows no visible or practical problems.
3. After the update to Plasma 6.2 the issue still happens but the drop rate or stuttering is less severe, namely, instead 2 second no response, there is a half second or less no response. Still, the feeling is, as if the deskop was a game with a 10 FPS per second or so. Still, not anything that can be accepted.
4. When it happened during a game, I noticed, that the cursor was stuttery, but not the game graphics, which stayed fluent. This make me think that the issue is the cursor itself, but if that was the case, it wouldn't be limited to laptop's screen.
5. Closing kwin_wayland, which restarts automatically, didn't resolve the issue so, this is not a kwin's problem.
6. It is not only the cursor, but also scrolling that is affected. See the below additional info.

Because the problem was limited to the laptop's screen, there is a hardware component to this bug, but it has to be software related, because in my earlier system restore from the backup, the issue was gone and shows up again after the next update, so the update introduced it. The newest update made it less severe. Also, the fact that the game is fluent (aside the cursor), shows that there is no frame drop on the faulty screen, but the issue is somewhat limited to cursor and on one screen... On the other hand, when scrolling a site, this is also stuttery, so scrolling seems to be also affected.

I will change the topic, but this is not even clear what is happening. It gets more mysterious. Please help with debugging it, so I could report it to a proper place.
Comment 7 Michał Dybczak 2024-11-01 14:50:00 UTC
It turned out to be some kernel bug. I switched to 6.6 and the issue stopped. Stayed there for a two weeks or so and now went back to 6.11 to see if it shows up again. So far nothing, but it's not enough time to be sure.

However, because this is a kernel driver bug, it has nothing to do with KDE, so I'm closing the bug here.