Score:2

How do I get windows to restore their position when (dis)connecting external monitor on laptop?

om flag

I recently did a fresh install of Kubuntu 22.04 on my laptop and having troubles with my laptop and an external monitor. When I disconnect my external monitor, which is larger than the laptop, the windows are resized to fit. This is good.

When I reconnect the external monitor, the desktop expands to fill the space there, but the windows are not restored to their previous location. I have another laptop still running 18.04 where the windows do restore their position.

How can I get my windows to go back to their previous location?

I unify the outputs when the external display is connected, that is, I have the laptop display and external monitor display the same thing.

I'm using a Lenovo T14 if relevant.

Linux edaqa-ThinkPad-T14-Gen-3 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


Probably unrelated, but for reference in case it is: when using unified outputs the laptop is not shrinking the display to fit, instead simply overflowing the desktop outside of the physical dimensions. 18.04 also didn't have this problem.


I'd be happy if I could simply get edge stickiness and vertical/horizontal maximize restored. Perhaps the problem lies here somehow, that the desktop is using absolute sizes now instead of these properties?


There might be even more at play here, as I often notice the maximize size of some of my windows is dictacted by the smaller monitor, not the large one. I don't think the "Unify Outputs" option is working correctly.

Score:0
in flag

Try Wayland instead of X11. I'm running Kubuntu and on the login screen I can choose Wayland or X11. If I use Wayland and have the desktop set to 'restore last session' then my windows are restored when plugging/unplugging an external display.

om flag
I'm reasonably certain I am using Wayland, as I think it's the default. But I'll double check.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.