Bug 422415 - White horizontal lines when watching video
Summary: White horizontal lines when watching video
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.18.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-03 12:38 UTC by Konstantin
Modified: 2023-09-06 10:38 UTC (History)
0 users

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


Attachments
Visualization of the issue. (247.42 KB, image/jpeg)
2020-06-03 12:51 UTC, Konstantin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin 2020-06-03 12:38:40 UTC
SUMMARY


STEPS TO REPRODUCE
1. Make sure compositor is enabled with OpenGL 2.1 and vsync set to auto.
2. Watch video on Firefox or start chat app with video support like Skype.

OBSERVED RESULT
Over some time one can see small white horizontal lines on the screen (with around 4-5 mm in width). I have tried different vsync options in composer section but the only thing that made the lines to go away is to set vsync off (with side affect that tearing appeared).

EXPECTED RESULT
No white lines should appear.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 20/x64 (had the same issue with Ubuntu 18.04)
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) Iris(R) Pro Graphics P5200 (HSW GT3)
    GL_VERSION:    3.0 Mesa 20.0.4
Comment 1 Konstantin 2020-06-03 12:51:17 UTC
Created attachment 129024 [details]
Visualization of the issue.
Comment 2 Konstantin 2020-06-03 12:54:03 UTC
Additionally the white lines show briefly and go away very fast. They are noticeable when you play video with black background.
Comment 3 Vlad Zahorodnii 2020-06-05 08:30:04 UTC
> 1. Make sure compositor is enabled with OpenGL 2.1 and vsync set to auto.

If you switch to another render backend, e.g. XRender, or disable compositing altogether, are you still able to see the visual artifacts from time to time?
Comment 4 Konstantin 2020-06-05 16:58:20 UTC
(In reply to Vlad Zahorodnii from comment #3)
> > 1. Make sure compositor is enabled with OpenGL 2.1 and vsync set to auto.
> 
> If you switch to another render backend, e.g. XRender, or disable
> compositing altogether, are you still able to see the visual artifacts from
> time to time?

I think only OpenGL but not sure. I will try with xrender.
Comment 5 Konstantin 2020-06-05 17:00:26 UTC
I remember now - I am not using xrender since tearing is very bad (with all possible vsync options).
Comment 6 Konstantin 2020-06-05 17:08:36 UTC
I have also tried to disable all effects and that did not help. When I do dd if=/dev/sda of=/dev/null problem is more prominent. 

What should I try next?
Comment 7 Konstantin 2020-06-11 12:15:31 UTC
Here are more findings - I definitely could see the problem when I execute update-grub. I see this only when video is playing in background (firefox). If I use Xrander there are no issues. If I disable the vsync no issues for all. So to sum up to reproduce:

1. Start firefox and start video on youtube.
2. Execute update-grub

Result: The whole screen is flashing with white lines.
Comment 8 Konstantin 2020-06-12 10:01:58 UTC
And in a twist of the events it turned out I can reliably reproduce with this command:

dd if=/dev/random of=/dev/null bs=4096 count=1000000 oflag=sync
Comment 9 Konstantin 2020-06-12 12:46:10 UTC
I have disabled haveged and things are much much better. I rarely see the lines. It seems the issue is with the kernel since I also test this with compton as well.
Comment 10 Konstantin 2020-06-25 07:54:26 UTC
Unfortunately that was just mitigation - lines are there. The only way to fix this for me was to compile this mr https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/24/ which has TearFree code and turn off compositor vsync.
Comment 11 David Edmundson 2023-09-06 10:38:34 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.