I’m having a very peculiar issue with an external display plugged to my laptop. I’m running Manjaro with Plasma. Here are “steps to reproduce”.
Start the laptop and log into my account with the display unplugged.
Connect the display.
The display is detected. It is used to extend my desktop to the right of my laptop’s screen.
I open “Configure Display Settings…” to rearrange my displays and make the external one primary.
Now I unplug the external display and plug it again.
What happens next looks like the system and the display can’t get to grips with each other. My external display just repeatedly flashes the message that it detects an input, but can’t display anything. My laptop’s display shows my desktop that flickers between two layouts: with the external display or without it. If I manage to get a glimpse of “Display Configuration” window it shows a message at the top: “An output has been removed, settings reloaded”. So it looks like something rapidly retries to connect to the display.
When that happens I found two ways to get out of that situation. One is to reboot with the display connected. After reboot and logging in it works as before, with my chosen arrangement. Another is to disconnect the display again, clear display settings by running rm -rf ~/.local/share/kscreen and connecting again. This resets the settings so I have to rearrange the displays again.
Now some observations:
The event that triggers this situation could be anything that forces Plasma to reorient itself in the available displays. Could be unplugging and plugging again like I said above and that is the most reproducible. Sometimes it could also be closing the laptop’s lid, or waking from sleep.
If I switch out of xorg session with Ctrl+Alt+F2 then everything is replicated on both displays as you’d expect.
The first screen of SDDM, the “choose account” screen after boot up, is not affected. If the external display is connected during boot up, it will use both displays. If I plug it after boot up while I’m already on this first screen, it will not use it.
The second screen of SDDM, the lock screen, is just affected as normal desktop.
I have a dual boot with Windows 11 on this laptop. There are no such problems with the same display on Windows.
There is no such problem when using the same laptop with a different monitor.
I’m completely in the dark as to where to even start looking so I welcome any suggestions.
The laptop is ASUS TUF Gaming and the display is Samsung C27JG5X.
Thank you for your reply. I just noticed another thing: unless I change the display settings to rearrange displays I can unplug and plug again to my heart’s content with no issue. That’s why I’m inclined to blame software rather than hardware here.
That said, I used xrand --props to get my display’s EDID and put it through edid-decode, which didn’t turn up anything alarming:
I think you should try setting/selecting lower refresh rate and/or resolution. Also it may have something to do with HDMI port you are using. I would have tried Type C connector or even dock.
The last resort I can think of is to wait for the next Plasma release, 5.27, which is said to contain a lot of fixes to its screen management stack.
Yeah, I used this monitor with this laptop several months ago and I surely would have noticed this issue then. Same cable, same hdmi port, same nvidia drivers, the only difference being presumably some Plasma updates in between.
I tried using an hdmi-usb-c dongle and while this specific problem did not occur, everything else was all kinds of messed up: lags, missing borders around windows, messed up window layouts, etc… so quite clearly a suboptimal signal path.
Good for you. Btw you mentioned that you have the same nVidia driver version but what makes you think that your external screen is managed by Nvidia device? Chances are it’s Intel UHD and it could have seen updates (in-kernel) recently, hence the bug you’re experiencing.
Issue xrandr --listproviders and other xrandr command as per its man page to find out what actually drives your HDMI port. Sorry can’t tell you the exact command as I am far from my laptop now.