Bug 500341 - External monitor randomly blacking out for a few seconds
Summary: External monitor randomly blacking out for a few seconds
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 6.3.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2025-02-18 19:18 UTC by Kubek4155
Modified: 2025-03-23 03:46 UTC (History)
2 users (show)

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


Attachments
drm_info dump (347.24 KB, text/plain)
2025-02-20 16:43 UTC, Kubek4155
Details
Photo of everything being red on the monitor as mentioned in comment 3 (220.66 KB, image/png)
2025-02-20 17:04 UTC, Kubek4155
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kubek4155 2025-02-18 19:18:03 UTC
SUMMARY
External monitor sometimes blacks out for a few seconds and then returns. Neither the monitor nor the system detects a disconnected screen. All apps remain working all the time, even during blackout. When it returns everything is fine. The blackouts don't seem to have a pattern, they just randomly happen. Sometimes I don't get a single blackout for a few days, sometimes they happen every few seconds. When using journalctl right after the blackout it shows two identical warnings, one right after the other: "kwin_wayland[900]: kwin_scene_opengl: 0x502: GL_INVALID_OPERATION error generated."

STEPS TO REPRODUCE:
1. Since it happens randomly, just use the computer until a blackout happens.

SYSTEM INFORMATION:
Linux:  6.13.2-arch1-1
KDE Plasma Version: 6.3.1 
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
I use a laptop with an Intel iGPU and Nvidia RTX 4050 Mobile. It doesn't make a difference whether the iGPU is turned off in the laptop's firmware or not.
Comment 1 Zamundaaa 2025-02-20 16:19:11 UTC
Please attach the output of drm_info with the external monitor connected.

This sounds very difficult to debug to be honest. There's really no pattern for when it happens?
Comment 2 Kubek4155 2025-02-20 16:43:26 UTC
Created attachment 178649 [details]
drm_info dump
Comment 3 Kubek4155 2025-02-20 16:59:32 UTC
(In reply to Zamundaaa from comment #1)
> Please attach the output of drm_info with the external monitor connected.
> 
> This sounds very difficult to debug to be honest. There's really no pattern
> for when it happens?

I'm not sure this is what you meant but I attached the output.

Yeah, I haven't recognized a pattern here. Sometimes it happens very often, sometimes it does not. For some time I believed this is becuause of media playback or games but it isn't the case, it can happen no matter what is the computer doing.

Also I forgot to mention that sometimes just before a blackout happens, everything on the monitor turns red for like 0.1 second. I checked and it looks exactly like if you were to use that night colors option with the temperature set all the way to max. Imma attach a photo of what I mean.

Just as I was writing this a blackout happened again but only a single line went red before it.
Comment 4 Kubek4155 2025-02-20 17:04:10 UTC
Created attachment 178652 [details]
Photo of everything being red on the monitor as mentioned in comment 3
Comment 5 Zamundaaa 2025-02-20 17:12:59 UTC
Okay, that *could* be link-retraining happening when the connection between GPU and display goes bad. We should probably show a notification when that happens.

Have you tried a different cable or port? It might be less sensitive to that issue.
Comment 6 Bug Janitor Service 2025-02-20 17:41:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7207
Comment 7 Zamundaaa 2025-02-20 21:20:31 UTC
Git commit 40fd44ce7b46389ab569ec0b49f5c29d962bf8cd by Xaver Hugl.
Committed on 20/02/2025 at 21:06.
Pushed by zamundaaa into branch 'master'.

backends/drm: log when link training is necessary

M  +3    -0    src/backends/drm/drm_gpu.cpp

https://invent.kde.org/plasma/kwin/-/commit/40fd44ce7b46389ab569ec0b49f5c29d962bf8cd
Comment 8 Bug Janitor Service 2025-02-20 21:30:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7210
Comment 9 Zamundaaa 2025-02-20 21:43:04 UTC
Git commit 3ce3299c673d07a4b9bd0a6bc960c35001018ed5 by Xaver Hugl.
Committed on 20/02/2025 at 21:30.
Pushed by zamundaaa into branch 'Plasma/6.3'.

backends/drm: log when link training is necessary


(cherry picked from commit 40fd44ce7b46389ab569ec0b49f5c29d962bf8cd)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +3    -0    src/backends/drm/drm_gpu.cpp

https://invent.kde.org/plasma/kwin/-/commit/3ce3299c673d07a4b9bd0a6bc960c35001018ed5
Comment 10 Kubek4155 2025-02-21 21:53:16 UTC
(In reply to Zamundaaa from comment #5)
> Okay, that *could* be link-retraining happening when the connection between
> GPU and display goes bad. We should probably show a notification when that
> happens.
> 
> Have you tried a different cable or port? It might be less sensitive to that
> issue.

I can't believe it but I have been using a different cable for 3 hours total and a single blackout didn't happen (I think one would occur with the previous cable in such a period of time). The one I am using now is from ps4 and the one I have been using before is a Klanet brand hdmi 2.1 cable (though I don't believe it is a 2.1 cable). I bought it for like 10$ and this brand seems to be very unknown, only sites with this stuff are Polish and Slovakian sites. I can find the link with that cable if you want. 

If anything happens I'll report that. Honestly how can an hdmi cable do stuff like this to a system?
Comment 11 Bug Janitor Service 2025-03-08 03:52:15 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 12 Bug Janitor Service 2025-03-23 03:46:32 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.