Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Keep DisplayPort output layout around on disconnect. #479

Closed
ascent12 opened this issue Dec 10, 2017 · 8 comments
Closed

Keep DisplayPort output layout around on disconnect. #479

ascent12 opened this issue Dec 10, 2017 · 8 comments

Comments

@ascent12
Copy link
Member

There are some monitors that will appear to be "disconnected" from DisplayPort when you turn them off, even when they're still phy. This can mess with your window placement and what you were doing pretty hard.
It's a complete misfeature, and I don't know why some monitors do it.

Anyway, to get around shit like this, Xorg will still pretend that the monitor is still connected, so your window layout doesn't get messed up.
We should probably do something similar.

I don't know whether this should be done in wlroots itself (inside DRM or elsewhere) or if we should expect compositors to handle it.
It should be a special-case for DisplayPort though. It doesn't seems to happen on other connector types.

@emersion
Copy link
Member

I can reproduce.

We can just mark them as disabled, and refuse to enable them again. How to detect that a DP monitor is turned off but phy?

@ascent12
Copy link
Member Author

Huh, I was supposed to write "physically connected", but I guess I accidentally deleted the rest of the sentence.
I don't think there is anything we can do to detect this, because to the GPU, it really looks like that monitor was disconnected.

@emersion
Copy link
Member

Ahah, I thought it was a common abbreviation in the DRM world.

So what if the user really disconnected the monitor?

@ascent12
Copy link
Member Author

ascent12 commented May 22, 2018

That's why this issue is such a pain in the ass: we can't tell. Either we need to let the user's window placement get massively screwed up by buggy monitors or let a "phantom display" exist, possibly requiring user intervention to actually get rid of it.
Xorg went with the latter (The monitor gets renamed to VIRTUAL1 etc.), and is far less annoying for the user in the general case, so I would personally want to go with that.

@ddevault
Copy link
Contributor

Xorg went with the latter (The monitor gets renamed to VIRTUAL1 etc.), and is far less annoying for the user in the general case, so I would personally want to go with that.

This sounds terrible, I'd rather just mess up the window layout. In sway that just means moving workspaces to another output. If they plug the display back in we can remember where those workspaces came from and move them back.

@ascent12
Copy link
Member Author

Letting the library user deal with it is fine. I was just proposing solutions that would work if it was to be handled in wlroots itself.

@StephenBrown2
Copy link

Seconded for remembering the previous workspace on monitor disconnect. I currently have a TV as my primary and a vertical second monitor, and when the TV goes to sleep it shoves all my windows onto the secondary monitor in X (Cinnamon), so I have to move them all back manually when I come back to my computer. It's annoying at best.

@emersion
Copy link
Member

Closing because this is a job for compositors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants