After some testing by the team on Friday related to display configuration with budgie-daemon v2, it was discovered that internal / built-in displays don't have a serial! 😱Thus far I have only been testing on my desktop with two external monitors, where I quickly found during development that the names weren't reliable when connected up using a myriad of docks and switches, since across boots and switches between devices (or unplug / re-plugs) the names could swap (e.g. DP-1 becomes DP-2, DP-2 becomes DP-1) or increment (DP-1 would become DP-3, DP-2 becomes 4, etc.).So it was quite surprising to hear that serials can just..be null when using built-ins. So today I spent some time swapping out references of "serial" for "identifier" (including the obvious plural cases) and where we used to call getSerial on our WaylandOutputHead, we now call a getIdentifier. Additionally I made changes to some of the keys in the TOML config to align with the same terminology in the code, so technically it will be a breaking change but I am sure the two other testers besides me will forgive me :PThis new identifier now returns the serial if it exists (not null or empty QString). If the serial is empty, we will fall back to a hash of one of the following combinations:
Output make, model, name
Machine ID (QSysInfo::machineUniqueId()), output name
This should resolve the issue as according to zwlr_output_head_v1::name the name should be consistent "across sessions with the same hardware and software configuration". However if we don't end up getting a make or model to combine with the name of the output, then I will fallback to the machine ID. I would prefer the first combination as that configuration could still apply when the end user has re-installed the underlying operating system on the same hardware, whereas the machine ID is certain to change and can't be relied on across installs.However this time around rather than make any assumptions, I'll be updating one of the laptops and testing out that theory. But that shall be for another day!