Bug 477741 - kwin sometimes renders a previous frame on wayland
Summary: kwin sometimes renders a previous frame on wayland
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.90.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-30 00:04 UTC by mooodyhunter@outlook.com
Modified: 2023-12-03 00:43 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
uwu: Wayland+
uwu: NVIDIA+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mooodyhunter@outlook.com 2023-11-30 00:04:14 UTC
SUMMARY
On some cases kwin re-renders a previous frame in some unknown cases.

A link to a recorded video is attached below, in the video I repeatedly run `vim /etc/pacman.conf` and :q, you can see in 
konsole's window there're sometimes glitches. 

https://vimeo.com/889705276

STEPS TO REPRODUCE
1. use plasma 6 beta 1 (alpha also has this bug)
2. do something (e.g. open a konsole window, run some command that'll output something)
3. observe the glitch

OBSERVED RESULT

vim's output flashes in konsole

EXPECTED RESULT

nothing

SOFTWARE/OS VERSIONS 
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.3-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 62.6 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: LENOVO
Product Name: 82WK
System Version: Legion Y9000P IRX8

ADDITIONAL INFORMATION
kwin_wayland is indeed using my NVIDIA gpu but idk why it's reporting "llvmpipe"
Comment 1 mooodyhunter@outlook.com 2023-11-30 00:07:35 UTC
ok after rebooting kinfocenter reports the correct senario:

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.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 62.6 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 82WK
System Version: Legion Y9000P IRX8

---
but misrendering still exists
Comment 2 mooodyhunter@outlook.com 2023-11-30 00:16:10 UTC
Output from KInfoCenter:

Window Manager: https://pastebin.com/LTd0FaQy
Wayland: https://pastebin.com/NdPRd1NQ
Vulkan: https://pastebin.com/380GuVnV
Comment 3 Qiu Yuluo 2023-11-30 10:30:49 UTC
I can reproduce the problem in another way.  

Steps to produce:  
1. Leave PC alone until it got into sleep mode.  
2. Touch keyboard to wake it up.  
3. See the lock screen more than one minute.  
4. I found the screen is black but a time number, and the new time number was draw before the old one.  

Information of my machine:
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.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 46.8 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2
Manufacturer: COLORFUL
Product Name: X15 AT 23
Comment 4 Nate Graham 2023-11-30 19:24:04 UTC
This should be fixed in the Beta 1 release. But feel free to re-open if you find that it's not. Thanks!
Comment 5 mooodyhunter@outlook.com 2023-11-30 19:37:12 UTC
Hi, I *am* using Beta 1, and I'm experiencing the bug :)

```
~ > kwin_wayland --version
kwin 5.90.0
```
Comment 6 Nate Graham 2023-11-30 20:07:38 UTC
Hah, oops.

From #kwin chat, apparently this is an issue with the NVIDIA driver. So please report it to the NVIDIA folks, either by sending an email to linux-bugs@nvidia.com or making a post at https://forums.developer.nvidia.com/c/gpu-graphics/linux. It would be helpful to the NVIDIA developers if you could run nvidia-bug-report.sh and attach the resulting file in your report. Thanks!
Comment 7 Oliver Beard 2023-12-01 03:45:10 UTC
See also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317

There's work being done to resolve it, albeit slowly.
Comment 8 Oliver Beard 2023-12-01 03:47:52 UTC
Actually, this probably isn't the xwayland issue, as Konsole shouldn't be using it. Might be a different issue I'm not aware of.
Comment 9 Nate Graham 2023-12-01 21:09:34 UTC
Possibly Bug 477199, which I also can't reproduce.
Comment 10 mooodyhunter@outlook.com 2023-12-02 16:45:08 UTC
given the problem doesn't occurs in kwin 5.*, is there any relevant changes/MRs/commits in kwin 6 that I can reference?
Comment 11 mooodyhunter@outlook.com 2023-12-02 20:58:12 UTC
I still suspect this is a kwin issue. because (at least) it's not experienced on GNOME (from my 10-min test flight)