Bug 506814

Summary: Waking up after suspend shows completely glitched out screen
Product: [Plasma] kwin Reporter: Riccardo Robecchi <sephiroth_pk>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdedev, nate, rajeeshknambiar, xaver.hugl
Priority: NOR Keywords: wayland-only
Version First Reported In: 6.4.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Picture of the issue

Description Riccardo Robecchi 2025-07-09 16:59:55 UTC
SUMMARY
On an iMac (mid-2011, Core i5, AMD Radeon HD 6770), the "suspend" feature is completely broken under Wayland. Waking up the device shows a completely glitched out screen which cannot be interacted with. Using a different TTY works and restarting KWin from there makes the screen go back to normal, too. X11 works without issues.

STEPS TO REPRODUCE
1. Put the computer to sleep
2. Wake it up

OBSERVED RESULT
The screen is completely glitched out and the system is unusable.

EXPECTED RESULT
The system resumes normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Endeavour OS (Arch Linux)
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Comment 1 Riccardo Robecchi 2025-07-09 17:09:29 UTC
Created attachment 183095 [details]
Picture of the issue
Comment 2 TraceyC 2025-07-10 20:51:27 UTC
Can you copy and paste the output of

kscreen-doctor -o

into a comment in this report? Thanks.
Comment 3 Riccardo Robecchi 2025-07-11 09:39:28 UTC
Here it is:
Output: 1 eDP-1 9762dac2-ac40-4490-80ac-ba8e1bf4245d
        enabled
        connected
        priority 1
        Panel
        replication source:0
        Modes:  1:1920x1080@60*!  2:1280x1024@60  3:1024x768@60  4:1280x800@60  5:1600x900@60  6:1368x768@60  7:1280x720@60 
        Geometry: 0,0 1920x1080
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 15% and dimming to 100%
        Color resolution: unknown
        Allow EDR: always
Comment 4 Rajeesh K V 2025-11-27 05:24:36 UTC
I hit the same problem with plasma 6.5.3, Intel Alder Lake UHD 770 graphics, connected via displayport to a Samsung Galaxy Viewfinity S8 4K monitor, after enabling HDR. The screen can be recovered by turning off HDR (and then reverting the config) also works, until system goes to sleep next time.

In the system log, I could see the following:

```
Nov 27 10:09:45 brussels kscreenlocker_greet[16677]: Failed to write to the pipe: Bad file descriptor.
Nov 27 10:09:45 brussels kscreenlocker_greet[16677]: Could not create EGL surface (EGL error 0x3000)
Nov 27 10:09:45 brussels kwin_wayland_wrapper[16677]:   wp_presentation#37 still attached
Nov 27 10:09:45 brussels kwin_wayland_wrapper[16677]: warning: queue "mesa egl surface queue" 0x7f8bb4caadf0 destroyed while proxies still attached:
Nov 27 10:09:45 brussels audit[16915]: AUDIT1100 pid=16915 uid=1000 auid=1000 ses=3 subj=kernel msg='op=PAM:unix_chkpwd acct="rajeesh" exe="/usr/bin/unix_chkpwd" hostname=?>
Nov 27 10:09:42 brussels audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" host>
Nov 27 10:09:42 brussels systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [ 16906] (dw_recheck_displays_func) Recheck interval: Sleeping for 200 milliseconds
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [  2240] Unquiescing libddcutil API...
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [  2240] Display redetection finished.
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [  2240] libddcutil watch thread 0x557594cf33d0 started
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [  2240] libddcutil recheck thread 0x557594c2b8e0 started
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [  2240]                                          extra_stabilization_millisec: 0,  stabilization_poll_millisec: 100
Nov 27 10:09:42 brussels org_kde_powerdevil[2240]: [  2240] Watching for display connection changes, resolved watch mode = Watch_Mode_Xevent, poll loop interval = 100 milli>
Nov 27 10:09:42 brussels systemd[1]: Starting fprintd.service - Fingerprint Authentication Daemon...
Nov 27 10:09:42 brussels audit: BPF prog-id=128 op=LOAD
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [  2240] Watch thread terminated.
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16797] recheck thread terminating because watch thread terminated
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [  2240] Display redetection starting.
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [  2240] Quiesce libddcutil API complete
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [  2240] Quiescing libddcutil API...
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16897] Callback function 0x7f9e3e581690 for event DDCA_Display_Status_Event[5613.942:  DDCA_EVENT_DISPLAY_CONNECTED, ca>
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16897] Invoking callback function 0x7f9e3e581690 for event DDCA_Display_Status_Event[5613.942:  DDCA_EVENT_DISPLAY_CONN>
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16798] Started 1 event callback thread(s)
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16798] libddcutil callback thread 0x7f9e00002990 started
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16798] Starting 1 callback threads
Nov 27 10:09:41 brussels org_kde_powerdevil[2240]: [ 16798] Emitting DDCA_Display_Status_Event[5613.942:  DDCA_EVENT_DISPLAY_CONNECTED, card1-DP-1, dref: DDCA_Display_Ref[6>
Nov 27 10:09:40 brussels org_kde_powerdevil[2240]: [ 16798] Adding connected display with bus 9
```
Comment 5 Rajeesh K V 2025-11-27 05:26:17 UTC
(In reply to Rajeesh K V from comment #4)
> I hit the same problem with plasma 6.5.3, Intel Alder Lake UHD 770 graphics,
> connected via displayport to a Samsung Galaxy Viewfinity S8 4K monitor,
> after enabling HDR. The screen can be recovered by turning off HDR (and then
> reverting the config) also works, until system goes to sleep next time.

Output of `kscreen-doctor -o`:

Output: 1 DP-1 b8cf4ded-9e82-42cb-b217-41922641bd7e
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  1:3840x2160@60.00*!  2:3840x2160@30.00  3:3840x2160@30.00  4:3840x2160@29.97  5:2560x1440@59.95  6:1920x1080@60.00  7:1920x1080@60.00  8:1920x1080@59.94  9:1920x1080@50.00  10:1680x1050@59.95  11:1600x900@60.00  12:1280x1024@60.02  13:1440x900@59.89  14:1280x800@59.81  15:1280x720@60.00  16:1280x720@60.00  17:1280x720@59.94  18:1280x720@50.00  19:1024x768@60.00  20:800x600@60.32  21:720x576@50.00  22:720x480@60.00  23:720x480@59.94  24:640x480@60.00  25:640x480@59.94 
        Geometry: 0,0 2845x1600
        Scale: 1.35
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: enabled
                SDR brightness: 330 nits
                SDR gamut wideness: 0%
                Peak brightness: 330 nits, overridden with: 330 nits
                Max average brightness: 351 nits
                Min brightness: 0 nits
        Wide Color Gamut: enabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 65% and dimming to 100%
        DDC/CI: disallowed
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: unsupported
        Sharpness control: unsupported
Comment 6 Zamundaaa 2025-11-27 13:58:55 UTC
Both of these issues are driver bugs. We worked around such driver bugs for legacy modesetting, as they're relatively common and old drivers are unlikely to be fixed.

About the problem with HDR on Intel, please report that at https://gitlab.freedesktop.org/drm/i915/kernel/-/issues

*** This bug has been marked as a duplicate of bug 505607 ***