Score:0

Primary Monitor briefly turns off (and rearranges windows) when Secondary Monitor (connected via Displayport) is turned off

vn flag

The Problem at hand is DisplayPort itself, as turning of a monitor connected with it will terminate all connection to the computer, making it think that that monitor was removed and therefore rearranging the windows.

Motivation: This is unacceptable (to me) as it prevents me from quickly looking at the secondary monitor, without interfereng with my primary one. (This Problem didnt occur when my secondary monitor was connected via DVI cable, but my new graphics card does not have an DVI port.)

Solutions: Now obviously there are hardware-solutions like getting a new/different monitor or graphics card or using an adapter. This Problem was asked here 6 years ago with no answer: How can I make xubuntu ignore DisplayPort monitor being turned off?

I use the Unity desktop manager on Ubuntu 20.04 and an Nvidia graphics card.

Ive looked into possible ways to turn of this intened behaviour of my desktop manager rearranging the windows (and briefly turning off my mein monitor), but it seems to no longer work (one could disable the xrandr plugin for gnome and thereby suppress this behavior if a monitor is removed). This does not work for me as im using Unity as desktop manager and when i turn of the respective plugin, the screen no longer gets cleared before displaying the new desktop-stat, causing a trail when dragging windows.

Ive also looked into forcing output through the displayport, but i couldnt get it to work, since xrandr displays nothing on the turned of monitor (or i made mistakes). xrandr output with monitor connected(truncated):

DP-2 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200     59.95*+

xrandr output without monitor connected(truncated):

DP-2 disconnected (normal left inverted right x axis y axis)

The last solution i can think of would be to somehow have a virtual screen, so my desktop manager always has the same screens, but i have no idea where to start with this.

To summarize: I would like to prevent my destop manager from rearranging my windows when a new monitor is connected/disconnected. I dont care wheter this is through disabling that behaviour or making it think that the monitor is still there. If there is a desktop manager where you can just turn of this behaviour or set permanent screen configurations, i would switch to that.

David avatar
cn flag
It seems the desktop manager is just doing what the hardware is telling it via the displayport.
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.