Bug 509765

Summary: Setting refresh rate to 240 Hz from 60 Hz appears to break turning monitor on after inactivity timeout
Product: [Plasma] kwin Reporter: perplexed9524
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: aleixpol, moginheden, plasma-bugs-null, ppirazzi4, serdarthtux, xaver.hugl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: drm_info while issue is present.
dmesg drm debug log 30 Sep 2025

Description perplexed9524 2025-09-21 23:28:33 UTC
SUMMARY
Screen fails to turn on after being turned off due to inactivity at 239.76 Hz, but works at 59.98 Hz. 
Ctrl+Alt+F3 turns works to turn the screen back on.

STEPS TO REPRODUCE
1. Set refresh rate to 239.76 Hz
2. Wait for power management to turn off screen
3. Attempt to use the system

OBSERVED RESULT
Screen does not turn back on

EXPECTED RESULT
Screen turns back on

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 41 KDE Spin (Wayland); Kernel 6.16.5-100
KDE Plasma Version: 6.4.4 
KDE Frameworks Version: 6.17.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
Mode when fails: 5120x1440@240
Mode when works:  5120x1440@60
Comment 1 Zamundaaa 2025-09-22 12:12:08 UTC
Please attach the output of drm_info while the screen doesn't turn on. You can get it through ssh
Comment 2 perplexed9524 2025-09-22 12:38:00 UTC
Created attachment 185152 [details]
drm_info while issue is present.

In case it helps, here's a diff against the output after the screen is back on:

$ diff drm_info_2025-09-22_non-working.txt drm_info_2025-09-22_working.txt 
82c82
< │   │       ├───"EDID" (immutable): blob = 155
---
> │   │       ├───"EDID" (immutable): blob = 152
87c87
< │   │       ├───"CRTC_ID" (atomic): object CRTC = 0
---
> │   │       ├───"CRTC_ID" (atomic): object CRTC = 62
89c89
< │   │       ├───"HDR_OUTPUT_METADATA": blob = 153
---
> │   │       ├───"HDR_OUTPUT_METADATA": blob = 146
171a172
> │   │   │   ├───Mode: 5120×1440@239.76 phsync nvsync 
174,175c175,177
< │   │       ├───"ACTIVE" (atomic): range [0, 1] = 0
< │   │       ├───"MODE_ID" (atomic): blob = 0
---
> │   │       ├───"ACTIVE" (atomic): range [0, 1] = 1
> │   │       ├───"MODE_ID" (atomic): blob = 151
> │   │       │   └───5120×1440@239.76 phsync nvsync 
246c248,254
<     │   │   ├───FB ID: 0
---
>     │   │   ├───FB ID: 149
>     │   │   │   ├───Object ID: 149
>     │   │   │   ├───Size: 5120×1440
>     │   │   │   ├───Format: ABGR2101010 (0x30334241)
>     │   │   │   ├───Modifier: NVIDIA_BLOCK_LINEAR_2D(h=4, k=6, g=2, s=1, c=0) (0x0300000000606014)
>     │   │   │   └───Planes:
>     │   │   │       └───Plane 0: offset = 0, pitch = 20480 bytes
272c280,286
<     │       ├───"FB_ID" (atomic): object framebuffer = 0
---
>     │       ├───"FB_ID" (atomic): object framebuffer = 149
>     │       │   ├───Object ID: 149
>     │       │   ├───Size: 5120×1440
>     │       │   ├───Format: ABGR2101010 (0x30334241)
>     │       │   ├───Modifier: NVIDIA_BLOCK_LINEAR_2D(h=4, k=6, g=2, s=1, c=0) (0x0300000000606014)
>     │       │   └───Planes:
>     │       │       └───Plane 0: offset = 0, pitch = 20480 bytes
274c288
<     │       ├───"CRTC_ID" (atomic): object CRTC = 0
---
>     │       ├───"CRTC_ID" (atomic): object CRTC = 62
472,473c486,487
<     │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 571
<     │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 856
---
>     │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 1993
>     │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 627
Comment 3 Zamundaaa 2025-09-26 15:45:39 UTC
Okay, I think we'll need a drm debug log of KWin trying to turn the display on. https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues explains how to do that; ideally you should enable the logging through ssh and then trigger KWin to enable the display by moving the mouse or pressing some key, and then stop the logging again.
Comment 4 perplexed9524 2025-09-30 18:55:31 UTC
Created attachment 185405 [details]
dmesg drm debug log 30 Sep 2025
Comment 5 perplexed9524 2025-09-30 18:57:49 UTC
(In reply to Zamundaaa from comment #3)
> Okay, I think we'll need a drm debug log of KWin trying to turn the display
> on.
> https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues
> explains how to do that; ideally you should enable the logging through ssh
> and then trigger KWin to enable the display by moving the mouse or pressing
> some key, and then stop the logging again.

Sorry for the delay! Please find the log in the attachment.

Thank you for your help in troubleshooting this!
Comment 6 Zamundaaa 2025-10-15 16:16:19 UTC
Hmm, that's a bit confusing - that log shows it working normally. There are two failed test commits, which aren't entirely unexpected though, and afterwards it presents to the display normally.
Comment 7 moginheden 2025-12-09 20:05:55 UTC
I think I'm encountering this same bug.  I'm on:
CachyOS 24.12
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.18.0-3-cachyos (64-bit)
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 4070

I have 2 monitors.  The primary is set to 144.06hz and the smaller is set to 59.91hz.  If I turn the primary one off (using the button on the bottom of the monitor), then turn it back on, it does not come back on, (and mentions that it has no input as if the cable is disconnected.) Moving the mouse or hitting a key on the keyboard does not bring it back, (but the computer has not crashed, I see the input on the 2nd monitor.) The smaller monitor does flash as if re-setting what windows go on what monitors and what backgrounds to use at this point, but that doesn't bring the primary monitor back.

If I unplug the primary one while it's turned on and reconnect it, it comes back up no problem.

If I turn off the primary monitor, turn it back on, unplug it and reconnect it, it comes back up.

If I unplug the secondary monitor while the primary one is in the broken state, the primary ones comes back.

If I start with the secondary monitor unplugged, turn off the primary one, turn it back on, then plug in the secondary one it fixes the primary one.

If I set the primary monitor to 60hz then it can be turned off and back on without issue.

If I set the primary monitor to 120hz it has the same problems as the 144.06hz configuration.

If I hit ctrl-alt-f2 when the monitor is in the broken state it comes back up, (and remains up if I switch back to ctrl-alt-f1.)

I don't seem to have drm_info installed. Would it be useful at this point to install it to get you it's output?  Is there any other debugging info that would help track down this bug?