Skip to content
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

[Merged by Bors] - Automate reloading display configuration #122

Closed
wants to merge 5 commits into from

Conversation

AlanGriffiths
Copy link
Contributor

@AlanGriffiths AlanGriffiths commented Jan 25, 2023

This allows Frame to handle display reconfiguration without a restart.

Features:

  1. If there is no display option set, then when Frame runs it is set to a default
  2. When the display option is set:
    2.1. With Miral < 3.8 Frame is restarted and will load the new display configuration
    2.2. With Miral 3.8 Frame is not restarted and will attempt to reload
  3. When the display option is unset, the configuration is cleared and Frame restarted

Note: there is (still) no validation of the configuration being set

Fixes: #20

scripts/bin/daemon-post-stop Outdated Show resolved Hide resolved
@AlanGriffiths AlanGriffiths marked this pull request as ready for review January 26, 2023 12:02
snap/hooks/configure Outdated Show resolved Hide resolved
@AlanGriffiths AlanGriffiths marked this pull request as draft January 26, 2023 12:26
@AlanGriffiths AlanGriffiths force-pushed the automate-display-configuration branch from 7f1ebee to 03a2c7b Compare January 26, 2023 14:49
@AlanGriffiths AlanGriffiths force-pushed the automate-display-configuration branch from 03a2c7b to 2518dce Compare January 26, 2023 14:56
@AlanGriffiths AlanGriffiths marked this pull request as ready for review January 26, 2023 14:58
@AlanGriffiths AlanGriffiths requested a review from Saviq January 26, 2023 15:01
Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading from stable to edge/pr122 does not populate the display variable, because the file doesn't have the DO NOT EDIT… header.

(Sh|C)ould we, if the file does exist, snapctl set display= its contents on refresh? Or on startup?

@AlanGriffiths
Copy link
Contributor Author

Upgrading from stable to edge/pr122 does not populate the display variable, because the file doesn't have the DO NOT EDIT… header.

I suspect the reason is that the file exists (! [ -e "${display_file}" ]), not because of the contents

@AlanGriffiths
Copy link
Contributor Author

(Sh|C)ould we, if the file does exist, snapctl set display= its contents on refresh? Or on startup?

No

Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice!

@Saviq
Copy link
Collaborator

Saviq commented Jan 27, 2023

bors merge

too

bors bot pushed a commit that referenced this pull request Jan 27, 2023
This allows Frame to handle display reconfiguration without a restart.

Features:

1. If there is no `display` option set, then when Frame runs it is set to a default
2. When the `display` option is set:
2.1. With Miral < 3.8 Frame is restarted and will load the new display configuration
2.2. With Miral 3.8 Frame is not restarted and will attempt to reload
3. When the display option is unset, the configuration is cleared and Frame restarted

Note: there is (still) no validation of the configuration being set

Fixes: #20
@bors
Copy link

bors bot commented Jan 27, 2023

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Automate reloading display configuration [Merged by Bors] - Automate reloading display configuration Jan 27, 2023
@bors bors bot closed this Jan 27, 2023
@bors bors bot deleted the automate-display-configuration branch January 27, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Difficult to bootstrap the display config option
2 participants