canonical / ubuntu-frame

The foundation for many embedded graphical display implementations
GNU General Public License v3.0
156 stars 21 forks source link

display: populates `display` config value with stale configuration #187

Closed Saviq closed 4 months ago

Saviq commented 4 months ago

1) I had monitor with preferred video mode "1280x800@52.9" connected then I shut down the board. 2) Connected different monitor with preferred mode "1366x768@59.94Hz" and rebooted the board. 3) Then I executed above steps but "display" still shows the same old config. 4) Also snap logs ubuntu-frame did show that ubuntu-frame has detected new monitor with preferred timing of "1366x768@59.94Hz"

Looks like we're using the old config YAML in this case to populate the display value.

Saviq commented 4 months ago

The problem is here:

https://github.com/canonical/ubuntu-frame/blob/8c44955b90a554186e2fedaeab3139a10024a8dc/snap/hooks/configure#L9-L12

We should be clearing the display file on unset - actually causing Frame to restart and repopulate the config.