Skip to content

Reenable a fallback display when all outputs are disabled

Guido Günther requested to merge guidog/phosh:no-primary-monitor into main

Currently if you have the primary output on an external screen and the internal one gets disabled we basically crash since there's no output to put the shell surfaces for the primary output. This MR changes things so no primary output is not fatal and we reenable an internal one if we find one (we should likely re-enble a non-internal one as well as a lost resort).

There's one remaining problem without output-power-management: if one moves the primary display to the external screen and then back a button press no longer locks the screen since we fail to re-register output power-management protocol since the other object is not fully disposed yet.

Also if the external screen is locked locking the internal ones is glitchy since the surface does not come up instantly but we could fix that via phosh-private's set_shell_state (basically mark shell as not ready to the compositor until the lock is back up).

Needs quite some testing to make sure nothing else broke. Overall this makes single display mode with output on the external screen way easier to use for me (it's basically drive by fixing since i was looking for something completely different).

This basically fixes #424 (closed) by just reenabling the output.

Edited by Guido Günther

Merge request reports