Bug 504732 - Second screen still considered to be active even after disconnect after wake up
Summary: Second screen still considered to be active even after disconnect after wake up
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 6.3.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-24 13:10 UTC by kde
Modified: 2025-06-24 19:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2025-05-24 13:10:18 UTC
SUMMARY
After sleep and wakeup oftentimes the second screen goes blank, with just a cursor visible. If I disconnect the screen, it is still visible in the display configuration, windows are still present there (I can get them out of there using keyboard shortcuts only), a mouse can go "to the second screen" (which is not connected) etc.

If I connect the display again, nothing happens system-wise (e.g. the windows are still considered to be on the second screen), but the screen is completely blank. While just after the wake up the screen was blank, with just the mouse cursor on it, now it just seems to receive nothing.

STEPS TO REPRODUCE
1. Sleep, with a second screen connected
2. Wake up
3. With some probability, only a mouse cursor is visible on the second display
4. Disconnect the display

OBSERVED RESULT
The second screen is still considered to be connected

EXPECTED RESULT
After sleep the screen is immediately working;
After disconnect, the screen is not considered to be connected

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 42; Wayland
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
I have an NVIDIA graphics card.

Previously there was a bug ( [496469](https://bugs.kde.org/show_bug.cgi?id=496469) ) where after wake up from sleep with a second screen connected, huge memory leaks were happening on NVIDIA. With latest NVIDIA drivers and plasma updates, it seems to have been fixed, but now instead of the memory leak, this bug happens to the screen.

`journalctl -b`; right during going to sleep:

```
May 24 14:51:20 fedora fprintd[35090]: Failed to install a sleep delay inhibitor: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been r>
May 24 14:51:20 fedora systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
May 24 14:51:20 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fprintd comm="systemd" exe="/usr/lib/sys>
May 24 14:51:20 fedora wpa_supplicant[2927]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
May 24 14:51:20 fedora systemd[1]: Reached target sleep.target - Sleep.
May 24 14:51:20 fedora systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions...
May 24 14:51:20 fedora kernel: pcieport 0000:00:1d.6: AER: Correctable error message received from 0000:04:00.0
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:   device [10ec:b822] error status/mask=00000001/00006000
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:    [ 0] RxErr                  (First)
May 24 14:51:20 fedora wpa_supplicant[2927]: wlo1: CTRL-EVENT-DSCP-POLICY clear_all
May 24 14:51:20 fedora wpa_supplicant[2927]: nl80211: deinit ifname=wlo1 disabled_11b_rates=0
May 24 14:51:20 fedora suspend[35097]: nvidia-suspend.service
May 24 14:51:20 fedora logger[35097]: <13>May 24 14:51:20 suspend: nvidia-suspend.service
May 24 14:51:20 fedora kwin_wayland[12201]: kwin_wayland_drm: atomic commit failed: Permission denied
<org.kde.pulseaudio stuff>
May 24 14:51:20 fedora systemd[1]: nvidia-suspend.service: Deactivated successfully.
May 24 14:51:20 fedora systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
May 24 14:51:20 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-suspend comm="systemd" exe="/usr/>
May 24 14:51:20 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-suspend comm="systemd" exe="/usr/l>
May 24 14:51:20 fedora systemd[1]: Starting systemd-suspend.service - System Suspend...
May 24 14:51:20 fedora kernel: pcieport 0000:00:1d.6: AER: Correctable error message received from 0000:04:00.0
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:   device [10ec:b822] error status/mask=00000001/00006000
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:    [ 0] RxErr                  (First)
May 24 14:51:20 fedora systemd-sleep[35127]: User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).
May 24 14:51:20 fedora systemd-sleep[35127]: This is not recommended, and might result in unexpected behavior, particularly
May 24 14:51:20 fedora systemd-sleep[35127]: in suspend-then-hibernate operations or setups with encrypted home directories.
May 24 14:51:20 fedora systemd-sleep[35127]: Performing sleep operation 'suspend'...
May 24 14:51:20 fedora kernel: PM: suspend entry (deep)
May 24 14:51:20 fedora kernel: pcieport 0000:00:1d.6: AER: Correctable error message received from 0000:04:00.0
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:   device [10ec:b822] error status/mask=00000001/00006000
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:    [ 0] RxErr                  (First)
May 24 14:51:20 fedora kernel: pcieport 0000:00:1d.6: AER: Correctable error message received from 0000:04:00.0
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:   device [10ec:b822] error status/mask=00000001/00006000
May 24 14:51:20 fedora kernel: rtw_8822be 0000:04:00.0:    [ 0] RxErr                  (First)
May 24 14:51:20 fedora kernel: Filesystems sync: 0.110 seconds
```

And during wake up:

```
May 24 15:39:37 fedora kernel: Freezing user space processes
May 24 15:39:37 fedora kernel: Freezing user space processes completed (elapsed 0.003 seconds)
May 24 15:39:37 fedora kernel: OOM killer disabled.
May 24 15:39:37 fedora kernel: Freezing remaining freezable tasks
May 24 15:39:37 fedora kernel: Freezing remaining freezable tasks completed (elapsed 0.000 seconds)
May 24 15:39:37 fedora kernel: printk: Suspending console(s) (use no_console_suspend to debug)
May 24 15:39:37 fedora kernel: sd 4:0:0:0: [sda] Synchronizing SCSI cache
May 24 15:39:37 fedora kernel: ata5.00: Entering standby power mode
May 24 15:39:37 fedora kernel: PM: suspend devices took 0.804 seconds
May 24 15:39:37 fedora kernel: ACPI: EC: interrupt blocked
May 24 15:39:37 fedora kernel: ACPI: PM: Preparing to enter system sleep state S3
May 24 15:39:37 fedora kernel: ACPI: EC: event blocked
May 24 15:39:37 fedora kernel: ACPI: EC: EC stopped
May 24 15:39:37 fedora kernel: ACPI: PM: Saving platform NVS memory
May 24 15:39:37 fedora kernel: Disabling non-boot CPUs ...
May 24 15:39:37 fedora kernel: smpboot: CPU 7 is now offline
May 24 15:39:37 fedora kernel: smpboot: CPU 6 is now offline
May 24 15:39:37 fedora kernel: smpboot: CPU 5 is now offline
May 24 15:39:37 fedora kernel: smpboot: CPU 4 is now offline
May 24 15:39:37 fedora kernel: smpboot: CPU 3 is now offline
May 24 15:39:37 fedora kernel: smpboot: CPU 2 is now offline
May 24 15:39:37 fedora kernel: smpboot: CPU 1 is now offline
May 24 15:39:37 fedora kernel: ACPI: PM: Low-level resume complete
May 24 15:39:37 fedora kernel: ACPI: EC: EC started
May 24 15:39:37 fedora kernel: ACPI: PM: Restoring platform NVS memory
May 24 15:39:37 fedora kernel: Enabling non-boot CPUs ...
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
May 24 15:39:37 fedora kernel: CPU1 is up
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
May 24 15:39:37 fedora kernel: CPU2 is up
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
May 24 15:39:37 fedora kernel: CPU3 is up
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 4 APIC 0x1
May 24 15:39:37 fedora kernel: CPU4 is up
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 5 APIC 0x3
May 24 15:39:37 fedora kernel: CPU5 is up
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 6 APIC 0x5
May 24 15:39:37 fedora kernel: CPU6 is up
May 24 15:39:37 fedora kernel: smpboot: Booting Node 0 Processor 7 APIC 0x7
May 24 15:39:37 fedora kernel: CPU7 is up
May 24 15:39:37 fedora kernel: ACPI: PM: Waking up from system sleep state S3
May 24 15:39:37 fedora kernel: ACPI: EC: interrupt unblocked
May 24 15:39:37 fedora kernel: nvidia 0000:01:00.0: Enabling HDA controller
May 24 15:39:37 fedora kernel: nvidia 0000:01:00.0: Enabling HDA controller
May 24 15:39:37 fedora kernel: ACPI: EC: event unblocked
May 24 15:39:37 fedora kernel: nvme nvme0: 8/0/0 default/read/poll queues
May 24 15:39:37 fedora kernel: nvme nvme0: Ignoring bogus Namespace Identifiers
May 24 15:39:37 fedora kernel: usb 1-6: reset high-speed USB device number 4 using xhci_hcd
May 24 15:39:37 fedora kernel: ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
May 24 15:39:37 fedora kernel: ata1: SATA link down (SStatus 4 SControl 300)
May 24 15:39:37 fedora kernel: ata6: SATA link down (SStatus 4 SControl 300)
May 24 15:39:37 fedora kernel: sd 4:0:0:0: [sda] Starting disk
May 24 15:39:37 fedora kernel: ata5.00: configured for UDMA/100
May 24 15:39:37 fedora kernel: usb 1-7: reset full-speed USB device number 5 using xhci_hcd
May 24 15:39:37 fedora kernel: PM: resume devices took 0.604 seconds
May 24 15:39:37 fedora kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
May 24 15:39:37 fedora kernel: OOM killer enabled.
May 24 15:39:37 fedora kernel: Restarting tasks ...
May 24 15:39:37 fedora kernel: Bluetooth: hci0: RTL: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8822
May 24 15:39:37 fedora kernel: Bluetooth: hci0: RTL: rom_version status=0 version=2
May 24 15:39:37 fedora kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8822b_fw.bin
May 24 15:39:37 fedora kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8822b_config.bin
May 24 15:39:37 fedora kernel: Bluetooth: hci0: RTL: cfg_sz 14, total sz 20270
May 24 15:39:37 fedora kernel: done.
May 24 15:39:37 fedora kernel: random: crng reseeded on system resumption
May 24 15:39:37 fedora systemd-resolved[2645]: Clock change detected. Flushing caches.
May 24 15:39:37 fedora bluetoothd[2685]: Battery Provider Manager destroyed
May 24 15:39:37 fedora dbus-broker[2681]: A security policy denied :1.10 to send method call /midi/profile:org.bluez.GattProfile1.Release to :1.64.
May 24 15:39:37 fedora systemd-logind[2719]: Lid opened.
May 24 15:39:37 fedora systemd[1]: Starting systemd-rfkill.service - Load/Save RF Kill Switch Status...
May 24 15:39:37 fedora uresourced[3078]: Setting resources on user-1000.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
May 24 15:39:37 fedora uresourced[3078]: Setting resources on user@1000.service (MemoryMin: 0, MemoryLow: 0, CPUWeight: 100, IOWeight: 100)
May 24 15:39:37 fedora uresourced[3078]: Setting resources on user.slice (MemoryMin: 0, MemoryLow: 0, CPUWeight: -, IOWeight: -)
May 24 15:39:37 fedora systemd[3276]: Stopped target bluetooth.target - Bluetooth.
May 24 15:39:37 fedora systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
May 24 15:39:37 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/>
May 24 15:39:37 fedora systemd[3276]: Reached target bluetooth.target - Bluetooth.
May 24 15:39:37 fedora systemd[1]: Stopped target bluetooth.target - Bluetooth Support.
May 24 15:39:37 fedora systemd-sleep[35127]: System returned from sleep operation 'suspend'.
May 24 15:39:37 fedora kernel: PM: suspend exit
May 24 15:39:37 fedora kernel: psmouse serio1: synaptics: queried max coordinates: x [..5636], y [..4644]
May 24 15:39:37 fedora kernel: psmouse serio1: synaptics: queried min coordinates: x [1342..], y [1154..]
May 24 15:39:37 fedora systemd[1]: systemd-suspend.service: Deactivated successfully.
May 24 15:39:37 fedora systemd[1]: Finished systemd-suspend.service - System Suspend.
May 24 15:39:37 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-suspend comm="systemd" exe="/usr>
May 24 15:39:37 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-suspend comm="systemd" exe="/usr/>
May 24 15:39:37 fedora systemd[1]: Stopped target sleep.target - Sleep.
May 24 15:39:37 fedora systemd[1]: Reached target suspend.target - Suspend.
May 24 15:39:37 fedora systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions...
May 24 15:39:37 fedora systemd[1]: Stopped target suspend.target - Suspend.
May 24 15:39:37 fedora systemd-logind[2719]: Operation 'suspend' finished.
May 24 15:39:37 fedora systemd-resolved[2645]: Closing all remaining TCP connections.
May 24 15:39:37 fedora systemd-resolved[2645]: Resetting learnt feature levels on all servers.
May 24 15:39:37 fedora ModemManager[2823]: <msg> [sleep-monitor-systemd] system is resuming
May 24 15:39:37 fedora NetworkManager[2848]: <info>  [1748090377.6638] manager: sleep: wake requested (sleeping: yes  enabled: yes)
May 24 15:39:37 fedora NetworkManager[2848]: <info>  [1748090377.6643] device (eno1): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
May 24 15:39:37 fedora kdeconnectd[12618]: 2025-05-24T15:39:37 kdeconnect.core: No local bluetooth adapter found
May 24 15:39:37 fedora suspend[35204]: nvidia-resume.service
May 24 15:39:37 fedora logger[35204]: <13>May 24 15:39:37 suspend: nvidia-resume.service
May 24 15:39:37 fedora kernel: Generic FE-GE Realtek PHY r8169-0-300:00: attached PHY driver (mii_bus:phy_addr=r8169-0-300:00, irq=MAC)
May 24 15:39:37 fedora systemd[1]: nvidia-resume.service: Deactivated successfully.
May 24 15:39:37 fedora systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
May 24 15:39:37 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-resume comm="systemd" exe="/usr/l>
May 24 15:39:37 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-resume comm="systemd" exe="/usr/li>
...
May 24 15:39:38 fedora kernel: pcieport 0000:00:1d.6: AER: Multiple Correctable error message received from 0000:04:00.0
May 24 15:39:38 fedora kernel: rtw_8822be 0000:04:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
May 24 15:39:38 fedora kernel: rtw_8822be 0000:04:00.0:   device [10ec:b822] error status/mask=00000080/00006000
May 24 15:39:38 fedora kernel: rtw_8822be 0000:04:00.0:    [ 7] BadDLLP
May 24 15:39:38 fedora chronyd[2773]: Forward time jump detected!
May 24 15:39:38 fedora chronyd[2773]: Can't synchronise: no selectable sources
```
Comment 1 Zamundaaa 2025-06-02 13:00:37 UTC
Please attach the output of drm_info while the display is connected and working normally, and again when it's wrongly detected as being still connected.
Comment 2 Bug Janitor Service 2025-06-17 03:47:46 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 3 kde 2025-06-24 18:22:52 UTC
I haven't used a second screen in a while, but for the past few days I got my hands on one again, and it seems the problem is gone, so I guess I'll set the status to WORKSFORME
Comment 4 kde 2025-06-24 19:02:17 UTC
Oh, shoot, just as I closed it, the bug happened again. Here is drm_info with the ghost second screen (with bug active):
https://textbin.net/zfid8hsn9b

And here is the normal one:
https://textbin.net/spxhcnttbn

I also noticed that there was an application on the second screen, when I replugged the monitor after the bug was active.