https://bugs.kde.org/show_bug.cgi?id=523237

            Bug ID: 523237
           Summary: Colors flicker in browser on kwin_wayland, caused by
                    overlay planes?
    Classification: Plasma
           Product: kwin
      Version First 6.7.3
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 194430
  --> https://bugs.kde.org/attachment.cgi?id=194430&action=edit
Video footage of a flicker in VS Code dark theme, recorded using a HDMI capture
card on another computer

DESCRIPTION
After updating to Plasma 6.7, I'm getting color flickering on Firefox and
Electron apps.

STEPS TO REPRODUCE
1. Open Firefox, Obsidian, Vesktop, VS Code, etc.
2. Use the apps.

OBSERVED RESULT
Occasionally the background color will flicker between lighter and darker
shades of dark gray or white, which can be quite distracting on some monitors.

I have strong reason (but not proof from source-level debugging) that this
flickering is caused by Plasma's usage of overlay planes.

- The issue appeared when I upgraded from Fedora 43 to 44. I suspect this also
shipped Plasma 6.7, though checking
https://packages.fedoraproject.org/pkgs/kwin/kwin/ it seems 43 now also ships
kwin 6.7 too. I've since switched this computer to boot an Arch install, but it
has the same flicker problem.
- This is consistent with
https://invent.kde.org/plasma/kwin/-/merge_requests/8699 and Phoronix saying
that KWin 6.7 enabled overlay planes on Intel GPUs.
- I tried recording the flicker in gpu-screen-recorder to see if it would show.
I noticed that whenever I see a color flicker on screen, the recorded video is
cropped to the browser alone without the system panels. This suggests that the
GPU is rendering a sub-framebuffer with only a single foreground window
present, or in other words, KWin is rendering the window in an overlay plane.
  - zamundaaaa said (link below) in the KWin matrix that the cropping could
result from "anything more complicated than legacy modesetting", which is
consistent with overlay planes. He did not specifically say that was the case,
and claimed that "(kmsgrab) should never be used." However I merely used it as
an *indicator* for when KWin was switching between composited and overlay-plane
scanout.
  - I'm reporting a bug here because browser windows are *changing color* at
random or when I type/scroll around (as mentioned, I think due to switching to
overlay planes).
- I do think the flickering is more noticeable on my BenQ monitor than other
(better-quality) monitors, but it's still worth fixing?

I'm not sure which component to report this under.

EXPECTED RESULT
Colors do not flicker.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.7.3
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 7.1.3-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8559U CPU @ 2.70GHz
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: Intel® Iris® Plus Graphics 655
Manufacturer: Intel(R) Client Systems
Product Name: NUC8i7BEH
System Version: J72992-303
- Monitor: BenQ GL2760H (it's a VA panel with poor color fidelity when moving
your head vertically, hence making slight full-screen color shifts more
obvious); AMA motion overdrive is turned off due to discontinuities when fading
out color gradients.
- RGB range: Full (defaults to Limited, but I forced the monitor and KDE to
full range color)
- Color accuracy: Prefer efficiency
- Limit color resolution to: Automatic  (10 bits per color) <- this looks like
a string formatting error causing kcm_kscreen to show two spaces?

ADDITIONAL INFORMATION
https://invent.kde.org/plasma/kwin/-/merge_requests/8699
https://matrix.to/#/!XOAbrjXKfOMhBYGSji:kde.org/$J67oOWUcu3bFrnGAI2Yt2G056gvUCCt9ZxJ6w2lOvgk?via=matrix.org&via=im.kde.org&via=kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to