New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for static display geometry #495
Comments
While I can see this being important for mir-kiosk, should Mir support this? My preference would be for Mir (libmiral) to provide a more general API that this particular case to be handled by miral-kiosk. |
@AlanGriffiths if you think a developer desktop with 3 screens, while it might not need static configuration, it will likely want to store and restore display configuration. My gut feeling is that it would be nice if Mir handled this by default for shells. So why wouldn't a static config be something Mir could support as well? |
I was thinking shells would have their own ways of allowing display config. But I guess we could offer a usable default |
The obvious place is in the configuration file we could do something like:
@Saviq what's not clear to me is how we identify the outputs: The monitors are likely to have identical EDID. Do we just use the order they are listed on the card(s) - if so, how do we handle slots that are disconnected or powered down? |
@AlanGriffiths if we can't uniquely identify displays, let's not even try, and instead rely on output names, those should be unique and static? It's a more common use case anyway where you want the physical output to always have the same content, even if you replace the display? Disconnecting or powering down should have zero effect on the output. |
OK, I can identify the cards, ports and types (and count ports of each type):
And that ties up with:
|
On further thought using the config file directly will be a bit clunky. I think an optional --output-layout <file> would be easier to manage. (And maybe --list-outputs-to <file> to create a template?) We can look at adding things later (orientation, refresh rate, ...), but I'm thinking the file could have something like:
Stuff after "#" is a comment, but if we generate it we can populate it with the output type and available display modes. |
I'd go for something like The comments could also include the connection status (and data about the connected display, if any). Also, is card ordering something we can rely on? It could change on boot, couldn't it? |
Well, I think (without good evidence) that the cards are ordered by their physical location. That can, of course change between boots. But it isn't immediately obvious to me how better to identify them. So I'm going to punt that out of the scope of "the simplest thing that might possibly work". Updating the above example:
Stuff after "#" is a comment, but if we generate it we can populate it with the output type and available display modes. |
551: Add a "--display-config static=<filename>" option r=Saviq a=AlanGriffiths Add a "--display-config static=\<filename\>" option. (Fixes #495) This reads the indicated file and tries to position the display outputs accordingly. If the file does not exist, or if actual outputs are not specified defaults are applied. The complete resulting layout is listed in the Mir "info" log. Note: Specifying a non-existent file is an easy way to get a template for editing. (As with other configuration options this can also be specified with environment variables or a config file.) Co-authored-by: Alan Griffiths <alan@octopull.co.uk> Co-authored-by: Alan Griffiths <alan.griffiths@canonical.com>
In digital signage space, it's often required to have a static display geometry configuration. Displays being disconnected or connected should not change the geometry of the overall display.
Most common case seems to be mapping outputs by name (
DP-1
,eDP-1
etc.) to geometry (WxHx+X+Y
). Multiple GPUs need also be supported.Mir (and by extension,
mir-kiosk
) should support this via command line arguments and/or config file.Let's use this issue to design this feature.
The text was updated successfully, but these errors were encountered: