Bug 454387 - HDMI signal loss when connecting to a KDE Linux PC in a Wayland session from a 4-port HDMI KVM switch (in a KDE X11 session it works fine)
Summary: HDMI signal loss when connecting to a KDE Linux PC in a Wayland session from ...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-05-25 10:26 UTC by Chema
Modified: 2024-03-13 03:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Wayland log for KVM switch (1.12 MB, text/plain)
2022-05-27 17:22 UTC, Chema
Details
drm-debug log (3.26 MB, text/plain)
2022-05-27 18:02 UTC, Chema
Details
drm debug 2 (395.09 KB, application/x-7z-compressed)
2022-06-04 17:48 UTC, Chema
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chema 2022-05-25 10:26:35 UTC
SUMMARY

I have connected a Manjaro Linux KDE PC to an HDMI KVM switch of 4 ports (for 4 PC). If I'm in KDE with an X11 session, switching from another machine to the Linux machine is almost instantaneous, it only takes 2-3 seconds. But if I'm on KDE with a Wayland session, when I switch to the Linux computer the HDMI signal is lost, the screen goes black and it takes 15-20 seconds to get the signal back.

STEPS TO REPRODUCE
1. Connect at least two PCs to an HDMI KVM switch (of 4 ports), one of which is a Linux KDE.
2. The Linux KDE must have a Wayland session started.
3. Switch to the other computer with the HDMI KVM switch.
4. Change and return back to the Linux KDE computer with the HDMI KVM switch.

OBSERVED RESULT

HDMI signal is lost when switching to Linux KDE Wayland session machine. The screen goes black and the HDMI signal is not recovered until after 15 or 20 seconds.

EXPECTED RESULT

When switching with the HDMI KVM switch to the Linux KDE Wayland machine, the HDMI signal should not be lost and the switch should be almost instantaneous, like when in a Linux KDE X11 session.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Manjaro Linux KDE
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION

Tested with Kernels 5.17.9 and 5.18.0 and with two different HDMI KVM switches of different brands (all of 4 ports), and in all cases the same thing happens. And as I say, if the PC Linux KDE computer is in an X11 session, it works perfectly.
Comment 1 Zamundaaa 2022-05-27 00:34:21 UTC
Please add 
QT_LOGGING_RULES="kwin_wayland_*.debug=true"
into your /etc/environment and reboot. Then reproduce the bug and afterwards attach the output of
journalctl --boot 0 --user-unit plasma-kwin_wayland | grep kwin_wayland_drm
here
Comment 2 Chema 2022-05-27 06:25:11 UTC
Hi,

I have tried to execute the line that you have indicated after adding the line in the etc/environment and after reproducing the error again:

journalctl --boot 0 --user-unit plasma-kwin_wayland | grep kwin_wayland_drm

But it does not return any result from the terminal.

However, I have found something that may be interesting.

I did the following test:

- I switched on the KVM switch to another computer at 07:48.

- I returned to the Manjaro Linux KDE Wayland computer at 07:50.

After executing this line:

journalctl --since today

And looking at the lines that start at 07:50, which is when I changed the switch to the Linux machine, I see the following (I attach the log):

----------------------------------------------

may 27 07:50:24 ComputerM kernel: usb 1-3: new high-speed USB device number 13 using xhci_hcd
may 27 07:50:24 ComputerM kernel: usb 1-3: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
may 27 07:50:24 ComputerM kernel: usb 1-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
may 27 07:50:24 ComputerM kernel: usb 1-3: Product: USB 2.0 Hub
may 27 07:50:25 ComputerM kernel: hub 1-3:1.0: USB hub found
may 27 07:50:25 ComputerM kernel: hub 1-3:1.0: 4 ports detected
may 27 07:50:25 ComputerM kernel: usb 1-3.1: new full-speed USB device number 14 using xhci_hcd
may 27 07:50:25 ComputerM kernel: usb 1-3.1: New USB device found, idVendor=145f, idProduct=02be, bcdDevice= 1.00
may 27 07:50:25 ComputerM kernel: usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
may 27 07:50:25 ComputerM kernel: usb 1-3.1: Product: Trust OpticalMouse
may 27 07:50:25 ComputerM kernel: usb 1-3.1: Manufacturer: PixArt
may 27 07:50:25 ComputerM kernel: input: PixArt Trust OpticalMouse as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.1/1-3.1:1.0/0003:145F:02BE.0011/input/input32
may 27 07:50:25 ComputerM kernel: hid-generic 0003:145F:02BE.0011: input,hidraw0: USB HID v1.11 Mouse [PixArt Trust OpticalMouse] on usb-0000:04:00.3-3.1/input0
may 27 07:50:25 ComputerM kernel: input: PixArt Trust OpticalMouse Keyboard as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.1/1-3.1:1.1/0003:145F:02BE.0012/input/input34
may 27 07:50:25 ComputerM kernel: hid-generic 0003:145F:02BE.0012: input,hiddev96,hidraw1: USB HID v1.11 Keyboard [PixArt Trust OpticalMouse] on usb-0000:04:00.3-3.1/input1
may 27 07:50:25 ComputerM kernel: usb 1-3.4: new low-speed USB device number 15 using xhci_hcd
may 27 07:50:26 ComputerM kernel: usb 1-3.4: New USB device found, idVendor=145f, idProduct=02c9, bcdDevice= 1.01
may 27 07:50:26 ComputerM kernel: usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
may 27 07:50:26 ComputerM kernel: usb 1-3.4: Product: Trust Keyboard
may 27 07:50:26 ComputerM kernel: usb 1-3.4: Manufacturer: SIGMACHIP
may 27 07:50:26 ComputerM kernel: input: SIGMACHIP Trust Keyboard as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4/1-3.4:1.0/0003:145F:02C9.0013/input/input35
may 27 07:50:26 ComputerM kernel: hid-generic 0003:145F:02C9.0013: input,hidraw2: USB HID v1.10 Keyboard [SIGMACHIP Trust Keyboard] on usb-0000:04:00.3-3.4/input0
may 27 07:50:26 ComputerM kernel: input: SIGMACHIP Trust Keyboard Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4/1-3.4:1.1/0003:145F:02C9.0014/input/input36
may 27 07:50:26 ComputerM kernel: input: SIGMACHIP Trust Keyboard System Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4/1-3.4:1.1/0003:145F:02C9.0014/input/input37
may 27 07:50:26 ComputerM kernel: hid-generic 0003:145F:02C9.0014: input,hidraw4: USB HID v1.10 Device [SIGMACHIP Trust Keyboard] on usb-0000:04:00.3-3.4/input1
may 27 07:50:26 ComputerM mtp-probe[2695]: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.1"
may 27 07:50:26 ComputerM mtp-probe[2696]: checking bus 1, device 15: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4"
may 27 07:50:26 ComputerM mtp-probe[2695]: bus: 1, device: 14 was not an MTP device
may 27 07:50:26 ComputerM mtp-probe[2696]: bus: 1, device: 15 was not an MTP device
may 27 07:50:26 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event13 (SIGMACHIP Trust Keyboard System Control)
may 27 07:50:26 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event9 (PixArt Trust OpticalMouse Keyboard)
may 27 07:50:26 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event11 (SIGMACHIP Trust Keyboard Consumer Control)
may 27 07:50:26 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event10 (SIGMACHIP Trust Keyboard)
may 27 07:50:26 ComputerM mtp-probe[2715]: checking bus 1, device 15: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4"
may 27 07:50:26 ComputerM mtp-probe[2715]: bus: 1, device: 15 was not an MTP device
may 27 07:50:26 ComputerM mtp-probe[2717]: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.1"
may 27 07:50:26 ComputerM mtp-probe[2717]: bus: 1, device: 14 was not an MTP device
may 27 07:50:42 ComputerM dbus-daemon[564]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.31' (uid=1000 pid=1086 comm="/usr/lib/org_kde_powerdevil") (using servicehelper)
may 27 07:50:42 ComputerM dbus-daemon[564]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
may 27 07:50:58 ComputerM xdg-desktop-portal-kde[1295]: xdp-kde-wayland-integration: Adding output:
may 27 07:50:58 ComputerM xdg-desktop-portal-kde[1295]: xdp-kde-wayland-integration:     manufacturer:  "Samsung Electric Company"
may 27 07:50:58 ComputerM xdg-desktop-portal-kde[1295]: xdp-kde-wayland-integration:     model:  "LS32A70/HNAR600099"
may 27 07:50:58 ComputerM xdg-desktop-portal-kde[1295]: xdp-kde-wayland-integration:     resolution:  QSize(3840, 2160)
may 27 07:51:05 ComputerM kernel: [UFW BLOCK] IN=enp3s0 OUT= MAC=01:00:5e:00:00:01:ec:be:dd:50:0f:e8:08:00 SRC=192.168.1.1 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=17813 DF PROTO=2 
may 27 07:51:06 ComputerM dbus-daemon[564]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.31' (uid=1000 pid=1086 comm="/usr/lib/org_kde_powerdevil") (using servicehelper)
may 27 07:51:06 ComputerM dbus-daemon[564]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'

----------------------------------------

If you look at the log, from when it detects the change to the Linux machine at 07:50:24 until it is fully available again at 07:51:06, 42 seconds have passed.

If we look more closely at the log, we see that there are two moments in which a large time delay occurs:

May 27 07:50:26 ComputerM mtp-probe[2717]: bus: 1, device: 14 was not an MTP device
May 27 07:50:42 ComputerM dbus-daemon[564]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.31' (uid=1000 pid=1086 comm="/usr/ lib/org_kde_powerdevil") (using servicehelper)

Between these two lines 16 seconds pass, and then:

May 27 07:50:42 ComputerM dbus-daemon[564]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
May 27 07:50:58 ComputerM xdg-desktop-portal-kde[1295]: xdp-kde-wayland-integration: Adding output:

Between these two lines another 16 seconds pass.

I am not an expert, but I understand that the large time delay between these lines indicates that something is not working correctly, it should not take that long between them.

I hope this information can be of some use. If you think it convenient, I can also try to get the same log from an X11 session, where it is working correctly and the change between machines is almost instantaneous, to see the differences in times.

Regards.
Comment 3 Chema 2022-05-27 06:56:05 UTC
Hi,

I enclose the log obtained from an X11 session so that you can compare the times with that of the session in Wayland, as you can see in an X11 session it is much faster.

For this test:

- I switched to another computer at 08:45.
- I returned to the Linux computer at 08:47.

----------------------------------

may 27 08:47:36 ComputerM dbus-daemon[963]: [session uid=1000 pid=963] Activating via systemd: service name='org.f>
may 27 08:47:36 ComputerM systemd[941]: Starting Xdg Desktop Portal For KDE...
may 27 08:47:36 ComputerM dbus-daemon[963]: [session uid=1000 pid=963] Successfully activated service 'org.freedes>
may 27 08:47:36 ComputerM systemd[941]: Started Xdg Desktop Portal For KDE.
may 27 08:47:36 ComputerM xdg-desktop-portal-kde[5581]: xdp-kde: Desktop portal registered successfully
may 27 08:47:36 ComputerM xdg-desktop-portal-kde[5581]: qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequ>
may 27 08:47:36 ComputerM xdg-desktop-portal-kde[5581]: xdp-kde-background: GetAppState called: no parameters
may 27 08:47:37 ComputerM kernel: usb 1-3: new high-speed USB device number 16 using xhci_hcd
may 27 08:47:37 ComputerM kernel: usb 1-3: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
may 27 08:47:37 ComputerM kernel: usb 1-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
may 27 08:47:37 ComputerM kernel: usb 1-3: Product: USB 2.0 Hub
may 27 08:47:37 ComputerM kernel: hub 1-3:1.0: USB hub found
may 27 08:47:37 ComputerM kernel: hub 1-3:1.0: 4 ports detected
may 27 08:47:37 ComputerM kernel: usb 1-3.1: new full-speed USB device number 17 using xhci_hcd
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_OutputChange
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Output:  82
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  0
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  0
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Connection:  "Connected"
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Subpixel Order:  0
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 1 
                                                                   m_crtc QObject(0x0) 
                                                                   CRTC: 0 
                                                                   MODE: 0 
                                                                   Connection: 0 
                                                                   Primary: false
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Output 82 : connected = true , enabled =>
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRScreenChangeNotify
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Config_timestamp:  4111952
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Window: 58720261
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Root: 1735
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Size ID: 65535
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Size:  3840 2160
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         SizeMM:  956 537
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_OutputChange
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Output:  82
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  0
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  0
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Connection:  "Connected"
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Subpixel Order:  0
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 0 
                                                                   m_crtc QObject(0x0) 
                                                                   CRTC: 0 
                                                                   MODE: 0 
                                                                   Connection: 0 
                                                                   Primary: false
may 27 08:47:37 ComputerM kwin_x11[5045]: kwin_core: Failed to update gamma ramp for output KWin::X11PlaceholderOu>
may 27 08:47:37 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Output 82 : connected = true , enabled =>
may 27 08:47:38 ComputerM kernel: usb 1-3.1: New USB device found, idVendor=145f, idProduct=02be, bcdDevice= 1.00
may 27 08:47:38 ComputerM kernel: usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
may 27 08:47:38 ComputerM kernel: usb 1-3.1: Product: Trust OpticalMouse
may 27 08:47:38 ComputerM kernel: usb 1-3.1: Manufacturer: PixArt
may 27 08:47:38 ComputerM kernel: input: PixArt Trust OpticalMouse as /devices/pci0000:00/0000:00:08.1/0000:04:00.>
may 27 08:47:38 ComputerM kernel: hid-generic 0003:145F:02BE.0015: input,hidraw0: USB HID v1.11 Mouse [PixArt Trus>
may 27 08:47:38 ComputerM kernel: input: PixArt Trust OpticalMouse Keyboard as /devices/pci0000:00/0000:00:08.1/00>
may 27 08:47:38 ComputerM kernel: hid-generic 0003:145F:02BE.0016: input,hiddev96,hidraw1: USB HID v1.11 Keyboard >
may 27 08:47:38 ComputerM kernel: usb 1-3.4: new low-speed USB device number 18 using xhci_hcd
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Emitting configChanged()
may 27 08:47:38 ComputerM kernel: usb 1-3.4: New USB device found, idVendor=145f, idProduct=02c9, bcdDevice= 1.01
may 27 08:47:38 ComputerM kernel: usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
may 27 08:47:38 ComputerM kernel: usb 1-3.4: Product: Trust Keyboard
may 27 08:47:38 ComputerM kernel: usb 1-3.4: Manufacturer: SIGMACHIP
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandR::setConfig
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Requested screen size is QSize(3840, 216>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Needed CRTCs:  1
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Actions to perform: 
                                                                   Primary Output: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:                 Old: 0 
                                                                           New: 82
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:         Change Screen Size: false
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:         Disable outputs: false
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:         Change outputs: false
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:         Enable outputs: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:                  (82)
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: QMap((78, XRandRCrtc(0x5575e5cb3980))(79>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Testing CRTC 78 
                                                                   Free: true 
                                                                   Mode: 0 
                                                                   Possible outputs: QVector(82, 83, 84, 85) 
                                                                   Connected outputs: QVector() 
                                                                   Geometry: QRect(0,0 0x0)
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: RRSetCrtcConfig (enable output) 
                                                                   Output: 82 ( "HDMI-A-0" ) 
                                                                   New CRTC: 78 
                                                                   Pos: QPoint(0,0) 
                                                                   Mode: KScreen::Mode(Id: "87" , Size: QSize(3840>
                                                                   Rotation: KScreen::Output::None
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandRCrtc  78  m_timestamp update  0  =>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr:         Result:  0  timestamp:  4112698
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 0 
                                                                   m_crtc QObject(0x0) 
                                                                   CRTC: 78 
                                                                   MODE: 87 
                                                                   Connection: 0 
                                                                   Primary: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Connected output 82 to CRTC 78
may 27 08:47:38 ComputerM kernel: input: SIGMACHIP Trust Keyboard as /devices/pci0000:00/0000:00:08.1/0000:04:00.3>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: RRSetOutputPrimary 
                                                                   New primary: 82
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandR::setConfig done!
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_CrtcChange
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  78
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  87
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Geometry:  0 0 3840 2160
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_OutputChange
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Output:  82
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  78
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  87
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Connection:  "Connected"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Subpixel Order:  0
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRScreenChangeNotify
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Config_timestamp:  4111952
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Window: 58720261
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Root: 1735
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Size ID: 0
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Size:  3840 2160
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         SizeMM:  956 537
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_CrtcChange
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  78
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  87
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Geometry:  0 0 3840 2160
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_OutputChange
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4004143
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Output:  82
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  78
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  87
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Connection:  "Connected"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Subpixel Order:  0
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_OutputChange
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4112698
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Output:  82
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  78
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  87
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Connection:  "Connected"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Subpixel Order:  0
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRScreenChangeNotify
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4112698
may 27 08:47:38 ComputerM rtkit-daemon[1124]: Supervising 6 threads of 3 processes of 1 users.
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Config_timestamp:  4111952
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Window: 58720261
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Root: 1735
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Size ID: 0
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Size:  3840 2160
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         SizeMM:  956 537
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper: RRNotify_OutputChange
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Timestamp:  4112698
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Output:  82
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         CRTC:  78
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Mode:  87
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Rotation:  "Rotate_0"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Connection:  "Connected"
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xcb.helper:         Subpixel Order:  0
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandRCrtc  78  m_configTimestamp update>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 0 
                                                                   m_crtc XRandRCrtc(0x5575e5cb3980) 
                                                                   CRTC: 78 
                                                                   MODE: 87 
                                                                   Connection: 0 
                                                                   Primary: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Output 82 : connected = true , enabled =>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 0 
                                                                   m_crtc XRandRCrtc(0x5575e5cb3980) 
                                                                   CRTC: 78 
                                                                   MODE: 87 
                                                                   Connection: 0 
                                                                   Primary: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Output 82 : connected = true , enabled =>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 0 
                                                                   m_crtc XRandRCrtc(0x5575e5cb3980) 
                                                                   CRTC: 78 
                                                                   MODE: 87 
                                                                   Connection: 0 
                                                                   Primary: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Output 82 : connected = true , enabled =>
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: XRandROutput 82 update 
                                                                   m_connected: 0 
                                                                   m_crtc XRandRCrtc(0x5575e5cb3980) 
                                                                   CRTC: 78 
                                                                   MODE: 87 
                                                                   Connection: 0 
                                                                   Primary: true
may 27 08:47:38 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Output 82 : connected = true , enabled = true
may 27 08:47:38 ComputerM rtkit-daemon[1124]: Successfully made thread 5596 of process 5117 owned by '1000' RT at priority 5.
may 27 08:47:38 ComputerM rtkit-daemon[1124]: Supervising 7 threads of 3 processes of 1 users.
may 27 08:47:38 ComputerM kernel: hid-generic 0003:145F:02C9.0017: input,hidraw2: USB HID v1.10 Keyboard [SIGMACHIP Trust Keyboard] on usb-0000:04:00.3-3.4/input0
may 27 08:47:38 ComputerM kernel: input: SIGMACHIP Trust Keyboard Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4/1-3.4:1.1/0003:145F:02C9.0018/i>
may 27 08:47:38 ComputerM mtp-probe[5598]: checking bus 1, device 18: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4"
may 27 08:47:38 ComputerM kernel: input: SIGMACHIP Trust Keyboard System Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4/1-3.4:1.1/0003:145F:02C9.0018/inp>
may 27 08:47:38 ComputerM kernel: hid-generic 0003:145F:02C9.0018: input,hidraw4: USB HID v1.10 Device [SIGMACHIP Trust Keyboard] on usb-0000:04:00.3-3.4/input1
may 27 08:47:38 ComputerM mtp-probe[5598]: bus: 1, device: 18 was not an MTP device
may 27 08:47:38 ComputerM mtp-probe[5597]: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.1"
may 27 08:47:38 ComputerM mtp-probe[5597]: bus: 1, device: 17 was not an MTP device
may 27 08:47:38 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event11 (SIGMACHIP Trust Keyboard Consumer Control)
may 27 08:47:38 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event9 (PixArt Trust OpticalMouse Keyboard)
may 27 08:47:38 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event13 (SIGMACHIP Trust Keyboard System Control)
may 27 08:47:38 ComputerM systemd-logind[579]: Watching system buttons on /dev/input/event10 (SIGMACHIP Trust Keyboard)
may 27 08:47:38 ComputerM mtp-probe[5616]: checking bus 1, device 18: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.4"
may 27 08:47:38 ComputerM mtp-probe[5616]: bus: 1, device: 18 was not an MTP device
may 27 08:47:39 ComputerM mtp-probe[5618]: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3/1-3.1"
may 27 08:47:39 ComputerM mtp-probe[5618]: bus: 1, device: 17 was not an MTP device
may 27 08:47:39 ComputerM kscreen_backend_launcher[5272]: kscreen.xrandr: Emitting configChanged()
may 27 08:47:39 ComputerM kwin_x11[5045]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 12857, resource id: 88080389, major code: 18 (ChangeProperty), minor cod>
may 27 08:47:56 ComputerM NetworkManager[594]: <info>  [1653634076.0105] device (wlp2s0): set-hw-addr: set MAC address to 56:96:6D:E8:AB:85 (scanning)
may 27 08:47:56 ComputerM NetworkManager[594]: <info>  [1653634076.0383] device (wlp2s0): supplicant interface state: inactive -> disconnected
may 27 08:47:56 ComputerM NetworkManager[594]: <info>  [1653634076.0383] device (p2p-dev-wlp2s0): supplicant management interface state: inactive -> disconnected
may 27 08:47:56 ComputerM NetworkManager[594]: <info>  [1653634076.0436] device (wlp2s0): supplicant interface state: disconnected -> inactive
may 27 08:47:56 ComputerM NetworkManager[594]: <info>  [1653634076.0437] device (p2p-dev-wlp2s0): supplicant management interface state: disconnected -> inactive

-------------------------

Regards.
Comment 4 Zamundaaa 2022-05-27 16:48:46 UTC
(In reply to Chema from comment #2)
> it does not return any result from the terminal.
Right, sorry - as you're still on 5.24 you'll need to first change the session to use systemd boot:
kwriteconfig5 --file startkderc --group General --key systemdBoot true
then reboot, the command should work now
Comment 5 Chema 2022-05-27 17:22:49 UTC
Created attachment 149268 [details]
Wayland log for KVM switch
Comment 6 Chema 2022-05-27 17:24:33 UTC
Hi Zamundaaa,

I just uploaded the log executing the instruction you told me.

As you can see in it, it starts at 19:10:44 and ends at 19:12:39, which means that it took almost 2 minutes to perform all the operations that generated the log.

Regards.
Comment 7 Zamundaaa 2022-05-27 17:49:45 UTC
The actual output detection stuff takes less than a second, but then it appears to fail to set the mode (which should never ever happen).
Weirdly, after that it also seems to do nothing at all for an entire minute, and then there's an output change event, which makes KWin reload stuff and then it works.

As a first step I'd like to find out why setting the mode fails. In order to do that, you can enable drm debug logging like so:
echo 0xFE | sudo tee /sys/module/drm/parameters/debug
Then make it save the log into a file:
sudo dmesg -w > drm-debug.log

Now reproduce the bug with the dmesg command running, then stop it and disable drm logging again with
echo 0 | sudo tee /sys/module/drm/parameters/debug
and upload the drm-debug.log file
Comment 8 Chema 2022-05-27 18:02:51 UTC
Created attachment 149269 [details]
drm-debug log
Comment 9 Chema 2022-05-27 18:04:11 UTC
Hi Zamundaaa,

I just uploaded the drm-debug.log, I hope I executed correctly the instructions you told me.

Regards.
Comment 10 Zamundaaa 2022-06-04 13:35:35 UTC
I'm sorry, I made a mistake: when enabling drm debug logging
> echo 0xFE | sudo tee /sys/module/drm/parameters/debug
leaves out some important messages. Can you try again with
> echo 0xFF | sudo tee /sys/module/drm/parameters/debug
instead and upload the log with that?
Comment 11 Chema 2022-06-04 17:48:19 UTC
Created attachment 149469 [details]
drm debug 2

This is the drm debug with option "echo 0xFF | sudo tee /sys/module/drm/parameters/debug"
Comment 12 Chema 2022-06-04 17:50:28 UTC
Hi Zamundaaa,

I just uploaded the drm debug log with the other option that you have indicated in a 7z compressed file since the file occupies 5.5 MB and I cannot upload it directly here as it has a 4 MB limit.

Regards.
Comment 13 Zamundaaa 2022-11-10 18:28:09 UTC
Sorry for taking so long to follow up on this bug, it somehow went under.
In the log there's a hotplug at 81s:
> [   81.602846] amdgpu 0000:04:00.0: [drm:drm_sysfs_connector_hotplug_event] [CONNECTOR:78:HDMI-A-1] generating connector hotplug event
Then KWin updates all the information from the kernel, but when it checks the connector, this happens:
> [   81.625847] [drm:drm_ioctl] comm="kwin_wayland" pid=878, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR
> [   81.625853] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:78:HDMI-A-1]
> [   81.625868] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:78:HDMI-A-1] status updated from connected to disconnected
> [   81.625876] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:78:HDMI-A-1] disconnected

As a first thing to check, does this still happen on a newer version of Plasma and/or the kernel?
Comment 14 Bug Janitor Service 2022-11-25 05:21:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Chema 2022-12-09 10:43:14 UTC
Hi,

I'm sorry it's taking so long to respond, but on the one hand I've been very busy these weeks and on the other hand to be able to test the bug I had to reinstall the KVM switch that was causing the problem (in the end, after searching and searching on Amazon and trying several models, I found one where the problem did not occur).

Well, I ran the test again, and the result is still the same: when I switch to Windows PC, the switch is quite fast. But when I switch from it to the Linux computer which has the latest version of KDE (at the moment I have KDE Plasma 5.26.4 and Linux kernel 6.1rc8), the monitor stops receiving the signal and goes dark for about 1 minute, until it gets it back magically. Also, when the screen recovers, the applications that were open have remained frozen, they do not respond, you have to minimize them and then they refresh and you can continue using them.

I don't know if it could be related, but a while ago I also opened a bug for something similar (Bug 453557), if you use a bidirectional HDMI emulator (https://www.amazon.com/EVanlak-Passthrough-Generrtion-Eliminated-Thunderbolt /dp/B07YMTMMH5) with a KVM switch to make switching between screens instant, works fine in KDE except when you put the computer to sleep, when you wake it up the screen doesn't react, it goes black, you have to press Ctrl + F1 to switch sessions in Linux, then the screen reacts and you can go back to KDE by pressing Ctrl + F2.

The curious thing about these two problems is that, as I already mentioned at the time, this does not happen with the GNOME desktop using Wayland.

Regards.
Comment 16 Zamundaaa 2022-12-15 15:05:15 UTC
Can you upload the logs again for the new version?
It would be ideal to have KWin and dmesg logs for the same time that the problem happens.

Additionally there's some env vars you could test, which may or may not make a difference:
- make KWin use the same buffer format as Xorg and other compositors: KWIN_DRM_PREFER_COLOR_DEPTH=24
- make KWin use implicit modifiers like Xorg: KWIN_DRM_USE_MODIFIERS=0
- make KWin use the legacy drm interface like Xorg: KWIN_DRM_NO_AMS=1
Comment 17 Kangarooo 2022-12-17 21:58:06 UTC
Does connecting monitors and then running this in terminal fixes?
xrandr -q
Comment 18 Zamundaaa 2024-02-12 15:07:30 UTC
.
Comment 19 Bug Janitor Service 2024-02-27 03:46:29 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 20 Bug Janitor Service 2024-03-13 03:47:08 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!