Black screen when turning on a second monitor + frozen KDE panel when screen turns on after being away. How to debug?

It started several months ago, so during that time there were multiple updates of KDE, kernel, Nvidia drivers etc.

When I turn off and later turn on the second monitor, both monitors remain black, until reboot. I can still move the cursor, and iirc the cursor may change when e.g. hovering over the places where the input fields are supposed to be.

It’s the same when turning on via the settings or via this script:

xrandr --output DP-0 --off --output DP-1 --off --output HDMI-0 --mode 2560x1440 --pos 0x0 --rotate left --output DP-2 --primary --mode 3440x1440 --pos 1440x1120 --rotate normal --rate 120 --output DP-3 --off --output HDMI-1 --off --output DP-4 --off --output DP-5 --off

2024-12-15_10-14

journalctl does not seem to show any errors about that, there is something about color profiles, but they are just the default ones.
gist:e39d7f2659b95d35991f2e935d936531 · GitHub

Also not sure if related, but another issue I encounter is that sometimes Plasma kind of gets frozen (usually after the screen turns on after being away for some time), I can interact with the opened apps, but cannot use the panel, the launcher does not open etc. systemctl restart --user plasma-plasmashell.service fixes that (does not help with the above issue about the monitors). Nothing in journalctl.

Any ideas how to figure out why it happens?


Operating System: EndeavourOS
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × Intel® Core™ i9-9900K CPU @ 3.60GHz
Memory: 62,6 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2

I believe the latest version of KDE has a bug which maybe causing your problem. In settings look for Plasma Style and try using a different style. I am using the Breath style and my problem was solved. If this is your problem expect it to be fixed with the next KDE update.

Do you mean Breeze? I was using Breeze Dark, switching to just Breeze did not help.

Looks like someone reported a similar bug 495861 – [X11][NVIDIA] When adding a second screen with greater resolution than first screen, screen goes black with exception of cursor but so far no one else reproduced or fixed it.

I am experiencing something like your second issue with Plasma 5.27.11 on Kubuntu 24.04. When the monitors turn back on, the whole system is unresponsive for about 20 seconds. I have the same layout as you with a vertical monitor on the left. When the left monitor is off, the system behaves normally. So I have been keeping the left monitor switched off and only turning it on when I need it for something. Really annoying.

The Breeze style is the problem if the problem is the same one. I am using Manjaro and Breath is the style I switched too. I just remember this is with composting turned on. This may not be related to your problem? I only tossed this out as a possible solution.

ah, this style is only for Manjaro.
I tried some other style instead of Breeze, but still the same :frowning:

1 Like

Different problem then, sorry it did not help.

1 Like

Use kscreen-doctor instead of xrandr. I don’t know exactly what the difference is, but there was something when I initially played with it. Also for me, in the rare case that the taskbar freezes on a drag-n-drop, it has its own watchdog timer and will restart after 15-20s. Not sure the manual service restart is required.
I haven’t once encountered this, my external display is 4K and internal 1080p. AMD hardware.

The same with kscreen-doctor :frowning:
It worked at first, but then the same black screen when I tried it later. Maybe it happens when there is a big delay between off/on, not immediately off and on. (probably the same for xrandr and KDE settings, I think it worked like that some time ago)

I also tried to just run kscreen-doctor output.HDMI-0.enable (after a long delay) without all other settings (position and rotation remain wrong). The screens did not turn black, but everything was somehow completely frozen, I could move the mouse cursor, but could not click anywhere, Alt-Tab etc., systemctl restart --user plasma-plasmashell.service had no effect (triggered it via a Talon voice command).

1 Like

That’s unfortunate.

My big monitor’s firmware is very weird, it doesn’t handle modesets well (it ends up going back and forth at least twice or thrice). To have it turned off / on correctly, my ON script with kscreen-doctor had to explicitly include the rotation and resolution at least (I don’t remember about position).

Try to get into text mode terminal next time (tty3-4 etc. on Manjaro via CTRL+ALT+F3/4; GUI is at F2). And the usual caps lock/numpad status LEDs, do they work or is the kernel hung up? There’s a point, the cursor is probably hardware-accelerated.

There are some ways in which Linux is backwards. :confused: Windows 10 made a leap forward with low timeout graphics driver resets.

1 Like

It was not hung up, there was my alert sound when I triggered the voice command, and then I rebooted via reboot.
So probably just something about graphics.