Created attachment 156030 [details] Debug & Sysinfo When I attach an external monitor to my laptop's HDMI port the monitor is recognised but both the laptop and external screen go blank after a few seconds, with only the mouse cursor functioning. kwin_x11 is using 100% cpu and when i kill -9 it, kwin restarts and everything works fine (until the HDMI cable is removed and re-inserted). This is with Debian 12 (testing) on a Lenovo P1 with Intel/ Nvidia graphics (nouveau driver). I believe the HDMI ports are hard-wired to the discrete GPU. I installed the Nvidia driver and updated to version 5.26.90. The behaviour is similar, except it will function properly until after a reboot. I did try Wayland and nothing happens when attaching the monitor. Attached is a debug file and system information (Nouveau & V5.26.4). SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian 12 KDE Plasma Version: 5.26.90 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8
can you also paste the output of the command kscreen-console ? I'm curious if all the edids are found correctly, as is a known problem of erratic behavior when there are screens with invalid or duplicated edid (especially on displayport)
Created attachment 156069 [details] Output of kscreen-console I've not installed the display port driver if that's relevant.
> Enabled: false Seems like Bug 460341 except you're not using the proprietary driver.
I think it's an issue with kwin as kwn_x11 maxes out cpu and killing it fixes it (Until the cable is removed & reinserted without the proprietary driver or until reboot with the Nvidia driver). The above bug is only about the screen being turned off in settings whereas my screen is turned on and kwin crashes.
> I did try Wayland and nothing happens when attaching the monitor. Can you clarify what you mean by "nothing happens"? > kwin_x11 is using 100% cpu Can you run hotspot with kwin? either attach to kwin_x11 process or run `sudo perf record --call-graph dwarf -p $(pidof kwin_x11)` and then analyze its output in hotspot https://github.com/KDAB/hotspot Can you also check whether the issue is reproducible when compositing is disabled?
Regarding Wayland, when I attached the monitor there was no indication it was attached. Nothing in the GUI and I don't remember what commands I ran but nothing showed any indication of an external monitor. I have tried with Gnome wayland and it worked fine. The issue is present with compositing disabled. I got the following output from perf record: >[ perf record: Woken up 5595 times to write data \] >Warning: >Processed 114541 events and lost 12 chunks! > >Check IO/CPU overload! > >Warning: >9354 out of order events recorded. \ >[ perf record: Captured and wrote 784.348 MB perf.data (97303 samples) \] The .perfparser file saved from hotspot is 24MB. I'm only able to attach 4MB files here, how should I send the data?
> The .perfparser file saved from hotspot is 24MB. I'm only able to attach 4MB files here, how should I send the data? Those files cannot be opened and analyzed on another computer. Can you open it locally and post the screenshots of the flamegraph here?
Created attachment 156667 [details] Flamegraph The man says they are self contained, not the perf.data but .perfparser. I noticed that Debian had the "save as" function removed from hotspot so I did it with the appimage version (I guess they had some security concerns...). https://github.com/KDAB/hotspot#import-export Regardless, attached is the flamegraph.
Export is a new function in hotspot since December and the Debian release is out of date.
It looks like kwin or rather breeze decoration spends a lot of cpu cycles in fontconfig stuff, I wonder why. Could you try running kwin_x11 with QT_LOGGING_RULES="*.debug=true" envvar and post its output here, maybe Qt would print something QT_LOGGING_RULES="*.debug=true" kwin_x11 --replace This also explains why the issue is present when compositing is disabled. Breeze decoration would be still used in that case.
Can you post the output of these two commands as well xrandr and xrdb -query
Created attachment 156680 [details] Xrandr, xrb-query & xsession-errors Attached is the output of the two commands and .xsession-errors after turning on logging as per the wiki (slightly different to the ENV you posted). https://community.kde.org/KWin/Debugging#Getting_debug_log_output As an aside the external screen didn't go black on this occasion, instead it froze until kwin_x11 was restarted.
xrdb doesn't contain Xft.dpi.. Can you try forcing specific font dpi in system settings? i.e. go to font system settings, force specific font dpi, reboot, and then try to reproduce the issue again
I can't reproduce the issue after forcing specific font dpi, nicely done!
Sounds good, and we're handling DPI better in other places too as of Plasma 5.27.4.