Bug 464395 - Screen flashes between all white and what should be displayed after return from Screen Energy Saving
Summary: Screen flashes between all white and what should be displayed after return fr...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://gitlab.freedesktop.org/drm/am...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-17 01:30 UTC by Cameron Tanner
Modified: 2023-08-27 17:38 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Tanner 2023-01-17 01:30:16 UTC
SUMMARY
***
Screen flashes between all white and the actual display contents after returning from "Screen Energy Saving".
***


STEPS TO REPRODUCE
1. Turn on "Screen Energy Saving" within the Power Management tab of the plasma Desktop Configure app.  This is the default.
2. Let the computer sit idle until Screen Energy Saving is activated.
3. Start using the computer again.

OBSERVED RESULT
Screen flashes between all white and what it should display.  Pointer movements seem to correlate with the flashing.  Leaving the mouse motionless can give either an all white or normal result.  Flashing begins again if the pointer is moved. Repeating the process will eventually lead to a screen that is all white all the time. 

EXPECTED RESULT
Computer returns to normal display after return from Screen Energy Saving mode.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: OpenSuSE TW, Kernel 6.1.4
(available in About System)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.101
Qt Version: 5.15

ADDITIONAL INFORMATION
This appears to be hardware specific.
The computer that displays the bug is an HP Elitebook 845 G9 with an AMD Ryzen 7 processor and integrated gpu.
The bug is not present on an older HP Elitebook 820 G2 with an Intel Broadwell Core i7.
There are no errors in dmesg.
I do not see any errors in journalctl.
The bug is not activated by opening and closing the laptop lid which also turns off the display.
The computer never crashes when the bug is provoked.
The bug does not seem to be provoked by kscreenlocker.
It is possible to switch to a VT console.
A normal screen is recovered by killing X and allowing it to restart.
It is not clear that this is a plasma/kde bug.
The computer has been "live" for days now and MS windows runs fine and seemingly rule out a hardware malfunction.
Comment 1 Nate Graham 2023-01-17 21:39:21 UTC
I would suspect a graphics driver bug, but I'm moving this to KWin to see if the KWin devs have any ideas.
Comment 2 Cameron Tanner 2023-01-28 11:49:37 UTC
(In reply to Nate Graham from comment #1)
> I would suspect a graphics driver bug, but I'm moving this to KWin to see if
> the KWin devs have any ideas.

There is some new information to report on symptoms.
* Flickering between White and the regular display contents is also provoked by connecting the laptop to an external monitor using the HDMI connector.  The primary display goes blank regardless of the the lid being open or closed.  Plasma only detects the external monitor once the hdmi cable is connected. There are no options to extend or replicate the display contents between the laptop and external monitor.  I am wondering if the white screen flickering is repetitive probing of the display in an attempt to identify. 
* The bug does happen in lx-qt.  The laptop primary and external monitor work fine.
Comment 3 Cameron Tanner 2023-01-28 12:47:34 UTC
The bug at least seems related to a driver.  The bug can be made to go away by turning off glamor 2D acceleration.
Comment 4 Cameron Tanner 2023-01-28 14:58:52 UTC
May be related to https://gitlab.freedesktop.org/drm/amd/-/issues/2354.
Comment 5 Nate Graham 2023-02-02 20:28:52 UTC
Mos def
Comment 6 Cameron Tanner 2023-02-03 11:17:06 UTC
Correction from above post:

* The bug does NOT happen in lx-qt.  The laptop primary and external monitor work fine.
Comment 7 Cameron Tanner 2023-02-11 22:44:12 UTC
kwin environment variables influences this bug.  Setting KWIN_COMPOSE=O2 or X makes the bug go away.
The combination of KWIN_COMPOSE=O2ES and KWIN_OPENGL_INTERFACE=EGL makes the bug active.
Comment 8 Cameron Tanner 2023-08-27 17:38:20 UTC
White screen flashing is reported by others, see https://wiki.archlinux.org/title/Laptop/HP#EliteBook_U82_family_(835_G9/845_G9/865_G9/845_G10).  The recommendation to disable scatter-gather with the kernel boot parameter amdgpu.sg_display=0 addresses the issue for me on the most recent opensuse tumbleweed.

Recommendation: Close, upstream bug https://gitlab.freedesktop.org/drm/amd/-/issues/2354#note_1829617.