Bug 507343 - Screen goes to sleep, wakes, sleeps, wakes and stays on.
Summary: Screen goes to sleep, wakes, sleeps, wakes and stays on.
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.4.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-22 07:52 UTC by zero
Modified: 2025-11-19 03:47 UTC (History)
3 users (show)

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


Attachments
Journalctl log of the sleep and wake cycle (255.89 KB, text/x-log)
2025-07-22 07:52 UTC, zero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zero 2025-07-22 07:52:47 UTC
Created attachment 183413 [details]
Journalctl log of the sleep and wake cycle

SUMMARY
Screen doesn't properly stay in sleep. It will wake up by itself and stay on indefinitely. Until user interaction, then it repeats the "sleep after x minutes > wake indefinitely" cycle.

STEPS TO REPRODUCE
1. Set Turn Off Screen to: "1 minute" / "When locked and unlocked".
2. Screen will sleep after 1 minute.
3. After a random amount of time, the screen wakes up without user interaction.
4. Screen will sleep again after 1 minute.
5. After a random amount of time, screen wakes up without user interaction.
6. Screen will stay on forever (Only when you interact with it, it goes back to Step 2).

OBSERVED RESULT
Screen turns off after expected time, but wakes itself.

EXPECTED RESULT
Screen stays off until user interaction.

SOFTWARE/OS VERSIONS
$ kinfo
Operating System: EndeavourOS 
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × Intel® Core™ i5-14600K
Memory: 32 GiB of RAM (31.1 GiB usable)
Graphics Processor: AMD Radeon RX 7900 XT
Display:  Samsung Electric Company Odyssey G85SB
Interface: Displayport


ADDITIONAL INFORMATION
Currently my setup consists of several suggested settings to try and avoid waking the screen;
- Disabled VRR/Adaptive Sync on both monitor & KDE
- Disabled Automatic Input Switching on monitor
- Lowered refresh rate (currently at 120Hz)

Included the journalctl log
My IRL observation timeline:
hh:mm:ss - event
08:42:xx - System booted
08:50:03 - I close the autostarted EndeavourOS welcome GUI.
08:51:03 - Screen turns off
08:52:xx  - Screen wakes
08:52:15 - I open Konsole & Kate to save logs
08:53:26 - I close Kate
08:54:30 - Screen turns off
08:55:xx - Screen wakes
08:56:01 - I open Kate to save logs
08:56:29 - I close Kate
08:57:33 - Screen turns off
08:58:xx - Screen wakes
09:00:12 - I open Kate to save logs
09:01:xx - I stop interacting with the system
09:02:xx - Screen turns off
09:03:xx - Screen wakes
09:04:xx - Screen turns off
09:05:xx - Screen wakes
09:11:xx - Screen still awake, I save logs in Kate
09:13:xx - I stop interacting with the system
09:14:xx - Screen turns off
09:15:xx - Screen wakes, observing flickering for 2 seconds
09:16:xx - Screen turns off
09:17:xx - Screen wakes
09:20:xx - Screen still awake

May be similar to: 
- https://bugs.kde.org/show_bug.cgi?id=506649 platform: Fedora, a user reported a new Fedora version fixed it?
- https://bugs.kde.org/show_bug.cgi?id=506747 platform: KDE Linux Android
Comment 1 zero 2025-07-22 08:29:52 UTC
Not sure if useful/relevant but;
$ kscreen-doctor -o
Output: 1 DP-2 944f274e-2cfe-46c5-a942-55c810ef4a3f
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  1:3440x1440@120*!  2:3440x1440@60  3:3440x1440@175  4:2560x1440@175  5:2560x1440@120  6:2560x1440@60  7:1920x1200@120  8:1920x1080@175  9:1920x1080@120  10:1920x1080@120  11:1920x1080@120  12:1920x1080@60  13:1920x1080@60  14:1600x1200@120  15:1680x1050@60  16:1600x900@60  17:1280x1024@60  18:1440x900@60  19:1280x800@60  20:1280x720@60  21:1280x720@60  22:1280x720@60  23:1024x768@60  24:800x600@60  25:720x480@60  26:720x480@60  27:640x480@60  28:640x480@60  29:1600x1200@60  30:1600x1200@175  31:1280x1024@175  32:1024x768@175  33:1920x1200@60  34:1920x1200@175  35:1280x800@175  36:1600x900@175  37:1368x768@60  38:1368x768@175  39:1280x720@175 
        Geometry: 0,0 3440x1440
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: Never
        RgbRange: Full
        HDR: enabled
                SDR brightness: 150 nits
                SDR gamut wideness: 0%
                Peak brightness: 400 nits
                Max average brightness: 248 nits
                Min brightness: 0 nits
        Wide Color Gamut: enabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer accuracy
        Brightness control: supported, set to 75% and dimming to 100%
        Color resolution: 10 bits per color, range: [8; 16] bits per color
        Allow EDR: unsupported
Comment 2 zero 2025-07-22 09:14:35 UTC
The same happens on my other OS on the same system.

$ kinfo
Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.7-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 20 × Intel® Core™ i5-14600K
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XT
Comment 3 zero 2025-07-23 07:09:02 UTC
Follow up:
As this problem is way out of my league knowledge wise, I tried diagnosing with ChatGPT.

What didnt work:
- Using different kernel (tested 6.15.7-1, 6.12.39-1)
- Kernel param: amdgpu.dc=0
- Kernel param: amdgpu_hotplug.dc=0

This led me to:
$ udevadm monitor --subsystem-match=drm
KERNEL[3864.424231] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1 (drm)
UDEV  [3864.432087] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1 (drm)
KERNEL[3867.922168] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1 (drm)
UDEV  [3867.931875] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1 (drm)

Turned on debugging temporarily, letting the monitor sleep and wake(by itself) showed me this;
$ sudo dmesg -w | grep hotplug
[ 1512.751780] amdgpu 0000:03:00.0: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:101:DP-2] generating connector hotplug event
[ 1512.751833] amdgpu 0000:03:00.0: [drm:drm_client_dev_hotplug] fbdev: ret=0
[ 1516.397131] amdgpu 0000:03:00.0: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:101:DP-2] generating connector hotplug event
[ 1516.397177] amdgpu 0000:03:00.0: [drm:drm_client_dev_hotplug] fbdev: ret=0

So this was tracked down to being a hotplug event triggering the monitor to wake again, and (according to ChatGPT) causes the DPMS idle timer to no be tracked anymore/broken after that.

Bug report for this issue: https://gitlab.freedesktop.org/drm/amd/-/issues/662

---
After messing with a lot of stuff the waking is no longer occurring. I have no idea what I did that "fixed" it for me thats the annoying part.

My current settings/what I've changed since this bug report:
- Boot/grub.cfg: Removed kernel params for iommu(on manjaro system)
- Monitor: Enter standby in 60 seconds (previously this was set to 30 seconds)
- Monitor: VRR: On
- Monitor sleep timer: 30 mins (probably unrelated but mentioning it anyways)
- KDE: Adaptive Sync: Always
- KDE: Refresh rate: 175Hz
- KDE: Lock screen automatically: Never
- KDE: Dim screen auto: Never
- KDE: Turn off screen: 30s
Comment 4 Guido 2025-10-19 20:06:53 UTC
I can confirm this on Plasma 6.4.5, but it seems a bit different

When an external monitor is active and the laptop monitor is deactivated, the (external) screen wakes up on its own after going into automatic standby mode. This only happens on Wayland (X11 is ok) in this configuration: if both screens are active or only the laptop screen is active, the problem does not occur.
Also, while the external monitor is waking up, for an instant (less than a second), also the laptop monitor turns on, then turns off again, while the external monitor remains on.

My configuration is pretty different:
Operating System: Manjaro Linux 
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.18.0-rc1-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 16 GiB of RAM (15.3 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Comment 5 Zamundaaa 2025-10-20 12:45:20 UTC
> [ 1512.751780] amdgpu 0000:03:00.0: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:101:DP-2] generating connector hotplug event
> [ 1512.751833] amdgpu 0000:03:00.0: [drm:drm_client_dev_hotplug] fbdev: ret=0
> [ 1516.397131] amdgpu 0000:03:00.0: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:101:DP-2] generating connector hotplug event
> [ 1516.397177] amdgpu 0000:03:00.0: [drm:drm_client_dev_hotplug] fbdev: ret=0
Oof, almost 4 seconds apart, that's the worst case I've seen so far.
If you manage to undo whatever AI-hallucinated things you did to your system to reproduce the problem again, please try putting
KWIN_DPMS_WORKAROUND_TIMEOUT=5000
into /etc/environment + rebooting, and check if that helps.

The default is 2000(ms), I'm not sure how much we want to increase that still. Maybe increasing it to 5s would still be okay; unplugging and immediately re-plugging a display that quickly and expecting it to wake up in that scenario is rather unlikely.

(In reply to Guido from comment #4)
> I can confirm this on Plasma 6.4.5, but it seems a bit different
That is a different issue, and will be fixed by https://invent.kde.org/plasma/kwin/-/merge_requests/8282
Comment 6 Bug Janitor Service 2025-11-04 03:47:44 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 7 Bug Janitor Service 2025-11-19 03:47:05 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.