Application menu bar disappears after disconnecting extra monitor from laptop

I am affected by a regression going from plasma 5 to plasma 6.

the computer is a thinkpad laptop running up to date manjaro.

when connecting external monitors to get a multiple monitors setup, the laptop screen is set as primary and the application menu bar is displayed on the laptop screen as it should.

this issue started to happen after I connecting a single external monitor instead of the usual two.

when disconnecting the external monitor, the application menu disappears and stays off making it difficult to do anything and fix the issue.

plugging the external monitor back in, make the application menu bar appear again on the laptop screen.

after a solid 30 minutes of going through system settings looking for ways to fix this without rebooting as this would be quite inconvenient to reboot each time I disconnect the external monitor, I eventually found out that edit mode had a manage desktop and panels option where it shows the application menu on the correct screen at the correct position despite it not being displayed on screen.

the temporary workaround I found consist in moving the application menu bar to a disconnected screen, then back to the active laptop screen. and only then it would be displayed again.

What can I do to prevent this issue from happening again ? is there a way to manually set screen setup profiles instead of having is being automatically detected each time ?

1 Like

I am facing a similar issue with Plasma 6.1.1 on Fedora 40. When docking the laptop, it connects to two external monitors. I spent a few hours tweaking panels, task manager etc to my liking. When I unplugged the laptop it did successfully moved my configuration to single display scenario. When I plugged it back it restored the default panel configuration.

In addition, if I turn off the laptop while connected to the docking station and turn back on disconnected, Plasma picks up the panel layout as it was while docked.

I implemented a solution based on systemd. I check displays with kdoctor-screen. I stored two configurations (one for docked mode and one for laptop mode) and depending on the output of the check I copy the config in place and restart plasma. I run this with a timer through systemd. Not the best, not robust and probably not future proof.

So I wonder what’s the proper solution to configure panels in a way that work both when docked, undocked and possibly connected to a projector.

Sorry if this is a silly question, I just moved to KDE :slight_smile: