Bug 505576

Summary: Random flashing white horizontal lines on Wayland
Product: [Plasma] kwin Reporter: tesfabpel
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Video recording of the issue
My monitor's EDID

Description tesfabpel 2025-06-13 18:36:20 UTC
SUMMARY
Since some weeks I'm experiencing random white horizontal lines (not spanning the entire width of the display, only ~100px I'd say). At first they were spurious (and not visible when gaming, for example) but since some update these days they are much more frequent (especially when doing something like drag-selecting a region in the desktop).

I have tried some minutes on Plasma X11 and there it was NOT happening.

I've also tried on Hyprland (so, Wayland) and there it was NOT happening.

I've tried recording the screen with OBS but the artifacts weren't visible in the final video.

Video of the problem (recorded by a phone): https://youtube.com/shorts/qYVCK4sYwzQ

STEPS TO REPRODUCE
1. Start Plasma Wayland
2. Drag-select a box in the desktop (for example)

OBSERVED RESULT
Some line glitches / artifacts appears for a moment

EXPECTED RESULT
No glitches should appear

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ArchLinux with kernel 6.15.2-arch1-1 (64 bit)
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
GPU: Radeon RX 7900 XT
glinfo:
GL_VERSION: 4.6 (Compatibility Profile) Mesa 25.1.3-arch1.3
GL_RENDERER: AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 20.1.6, DRM 3.63, 6.15.2-arch1-1)
GL_VENDOR: AMD
Comment 1 tesfabpel 2025-06-13 18:43:49 UTC
Created attachment 182251 [details]
Video recording of the issue
Comment 2 tesfabpel 2025-06-20 18:04:29 UTC
These days, I updated the system to Plasma 6.4.0 and the issue is still present. I created a new user and there KWin Wayland DID NOT present the issue. I tried to compare the files in the .config folder and I found the issue in the `~/.config/kwinoutputconfig.json` file:

The `.[0].data[0].mode.refreshRate` (in `jq` query syntax) was set to `59997` instead of `60000`. I log out, set this value to 60000 by hand and restarted Plasma and the issue was fixed.

Sadly, I tried changing the refresh rate from the settings to 59.94 Hz (no issues here, BTW it writes a different value to the json) and back to 60 Hz and the issue was present again. A look at the `kwinoutputconfig.json` file shows that it wrote back `59997` instead of the correct `60000`. 

So it seems there's an issue with the settings app that writes 60 Hz wrongly and that causes the issue I'm having.

I'm attaching my monitor EDID if someone is interested.
Comment 3 tesfabpel 2025-06-20 18:05:15 UTC
Created attachment 182436 [details]
My monitor's EDID