Bug 506650 - Regression: HDMI signal lost on EDID change
Summary: Regression: HDMI signal lost on EDID change
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: output configuration (other bugs)
Version First Reported In: 6.4.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-05 19:28 UTC by jakub
Modified: 2025-10-28 19:04 UTC (History)
2 users (show)

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


Attachments
dmesg -w compressed with zstd (585.40 KB, application/zstd)
2025-10-28 14:40 UTC, jakub
Details
journalctl --merge -f --no-hostname (47.93 KB, application/zstd)
2025-10-28 15:20 UTC, jakub
Details
drm_info while outputting valid signal (126.50 KB, application/octet-stream)
2025-10-28 18:05 UTC, jakub
Details
drm_info while display sees no signal (126.50 KB, application/octet-stream)
2025-10-28 18:05 UTC, jakub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jakub 2025-07-05 19:28:39 UTC
SUMMARY
I use an LG OLED TV connected to my RTX 4000 card on KDE 6.4.2 using Wayland. When I toggle the VRR & G-sync option in the TV OSD, it broadcasts a different EDID and

STEPS TO REPRODUCE
1. Set this HDMI TV as the only enabled output
2. Toggle the VRR switch to start/stop advertising VRR support

OBSERVED RESULT
Lose signal although `kscreen-doctor -o` still claims this display is enabled and primary. The workaround is to use win+p, switch to another output and then back

EXPECTED RESULT
VRR toggles but the display keeps working. This used to work as recently as the 6.3.x series I believe


SOFTWARE/OS VERSIONS
Operating System: NixOS 25.11
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0

Nvidia 570 and 575 (tested both) on Linux 6.15.4 running Wayland


ADDITIONAL INFORMATION

journalctl logs:

```
Jul 05 21:26:45 vautera plasma_waitforname[129439]: org.kde.plasma.waitforname: WaitForName: Service was not registered within timeout
Jul 05 21:26:45 vautera systemd[1411]: dbus-:1.2-org.kde.KSplash@13.service: Main process exited, code=exited, status=1/FAILURE
Jul 05 21:26:45 vautera systemd[1411]: dbus-:1.2-org.kde.KSplash@13.service: Failed with result 'exit-code'.
Jul 05 21:26:47 vautera kwin_wayland[2385]: kwin_wayland_drm: Atomic modeset test failed! Invalid argument
Jul 05 21:26:47 vautera kwin_wayland[2385]: kwin_wayland_drm: Atomic modeset test failed! Invalid argument
Jul 05 21:26:47 vautera kwin_wayland[2385]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x247a7990, name="HDMI-A-1", geometry=QRect(0,0 3840x2160), scale=1)
```
Comment 1 Zamundaaa 2025-10-13 15:04:59 UTC
Does this problem still happen to you with latest Plasma and drivers?

If so, we'll need more detailed information from the driver side. Please follow https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues to get a drm debug log of the problem.
Comment 2 jakub 2025-10-13 19:39:23 UTC
Still happening on 6.4.5, kernel 6.17. Do you need me to run a debug build of KWin as well, or just enable DRM logs and save a snapshot covering this issue happening?

I get these "atomic modeset failed" errors for other reasons too, like switching between my HDMI outputs with a kscreen-doctor command.

My workaround helps most of the time by restarting everything, it's just a KWin script doing this:

    print("Started plasmashell-fix watcher script")

    let restarted = false;
    const x = new QTimer()
    const y = new QTimer()
    x.timeout.connect(function() {
      print("timeout")
      callDBus(
        "org.freedesktop.systemd1",
        "/org/freedesktop/systemd1",
        "org.freedesktop.systemd1.Manager",
        "RestartUnit",
        "plasma-plasmashell.service",
        "replace",
        reply => {
          print(reply)
          restarted = true;
          y.start(5000);
        }
      );
    })
    x.singleShot = true
    y.timeout.connect(function() {
      print("restarted=false on a timer");
      restarted = false;
    });
    y.singleShot = true;


    workspace.windowRemoved.connect(function(client) {
      print(`DEBUG: windowRemoved - resourceClass: ${client.resourceClass}, dock? ${JSON.stringify(client.dock)}`);
      if (client.resourceClass === "plasmashell" && client.dock) {
        print("plasmashell dock disappeared")
        if (restarted) {
          print("ignoring this since we are post-restart");
          restarted = false;
        } else {
          x.start(3000);
        }
      }
    })
Comment 3 Zamundaaa 2025-10-15 19:53:16 UTC
Release build of KWin is fine, I just need to take a look at the drm logs to find out why it can't enable the screen
Comment 4 jakub 2025-10-28 08:52:04 UTC
I can't seem to reproduce anymore on 6.5.0, nvidia 580.95.05 and kernel 6.17.5.

I will run with DRM debugging for a while, see if I can trigger it: sudo dmesg -w | zstd -fo drm-debug.log.zst

Thus far, I've tried a bunch of EDID changes by toggling VRR, and changing between HDMI displays with kscreen-doctor - it all seems to be working great
Comment 5 Nate Graham 2025-10-28 13:48:34 UTC
Good news!
Comment 6 jakub 2025-10-28 14:40:12 UTC
Created attachment 186256 [details]
dmesg -w compressed with zstd

OK I was able to reproduce.

-- This is where the log starts
I was on HDMI-A-2 output exclusively, then switched that display's settings to enable VRR, which changes EDID. The screen's gone black and the display started showing No Signal.

I then used Meta+P to switch to my HDMI-A-1 output exclusively, then back again to my HDMI-A-2 at which point I had the video signal and VRR enabled.

-- This is where the logs stop
Comment 7 jakub 2025-10-28 14:56:37 UTC
Here's me disabling VRR on HDMI-A-2, the minimal repro I can build:

$ systemd-cat bscpylgtvcommand 192.168.4.52 set_other_settings '{"gameOptimization":"off"}'

Oct 28 15:54:52 .bscpylgtvcomma[344768]: {'returnValue': True}
Oct 28 15:54:53 kwin_wayland[2815]: Atomic modeset test failed! Invalid argument
Oct 28 15:54:53 kwin_wayland[2815]: Atomic modeset test failed! Invalid argument
Oct 28 15:54:53 kded6[3250]: xsettingsd: Reloading configuration
Oct 28 15:54:53 kded6[3250]: xsettingsd: Loaded 16 settings from /home/kuba/.config/xsettingsd/xsettingsd.conf
Oct 28 15:54:54 kded6[3250]: xsettingsd: Reloading configuration
Oct 28 15:54:54 kded6[3250]: xsettingsd: Loaded 16 settings from /home/kuba/.config/xsettingsd/xsettingsd.conf
Oct 28 15:54:54 ksecretd[2723]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 kded6[2893]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 kstart[2918]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 polkit-kde-authentication-agent-1[2945]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 kwalletmanager5[3811]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 kwalletd6[3597]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 krunner[163821]: There are no outputs - creating placeholder screen
Oct 28 15:54:54 xdg-desktop-portal-kde[3145]: There are no outputs - creating placeholder screen
Comment 8 jakub 2025-10-28 15:20:26 UTC
Created attachment 186260 [details]
journalctl --merge -f --no-hostname

Here's me enabling VRR on HDMI-A-2 with `systemd-cat bscpylgtvcommand 192.168.4.52 set_other_settings '{"gameOptimization":"on"}'` and a few seconds of journalctl after that
Comment 9 Zamundaaa 2025-10-28 17:06:11 UTC
Hmm, the debug log shows the display as working fine... maybe the "Atomic modeset test failed" warning is a bit of a red herring here and it finds a "working" config afterwards.
Please attach the output of drm_info when the display isn't working, it should allow us to make sure.
Comment 10 jakub 2025-10-28 18:05:11 UTC
Created attachment 186264 [details]
drm_info while outputting valid signal

Is this useful?

$ drm_info > /tmp/drm_info-good
$ bscpylgtvcommand 192.168.4.52 set_other_settings '{"gameOptimization":"on"}' && sleep 4 && drm_info > /tmp/drm_info-bad
Comment 11 jakub 2025-10-28 18:05:31 UTC
Created attachment 186265 [details]
drm_info while display sees no signal
Comment 12 Zamundaaa 2025-10-28 19:01:05 UTC
Yeah. The kernel driver claims the display is enabled in both cases - as far as KWin is concerned, it's working correctly, so this will have to be fixed on the driver side.

You can report this at https://github.com/NVIDIA/open-gpu-kernel-modules/issues if you're using the open kernel modules, and https://forums.developer.nvidia.com/c/gpu-graphics/linux if not. It would be good if you provide NVidia developers with the drm_info files as well.
Comment 13 jakub 2025-10-28 19:04:31 UTC
Thanks, I'll do that. And I'll test with open GPU modules as well, I hadn't thought of that before