This problem is due to the fact that several manufactures use the EDID file structure in the wrong way, adopting same
serialNumber for different monitor and different
AlphanumericSerialNumber, which is a sub-attribute not a standard.
You can have a view from terminal with ioreg using this command:
ioreg -l | grep EDID
Seems that Apple has changed it's policy for EDID UUID calculations on Apple Silicon, respect to Intel architecture, so now these monitor are simply the same monitor from an OS point of view, that means they are randomly connected, and swapped, based on "who get first".
Test findings from IFission user on GitHub
The only definitive solutions are: a monitor firmware update that fix the EDID, or a fix from Apple with an OS update, which address these use case.
As a workaround you can try to use different cable interface (DisplayPort and Hdmi) to distinguish different connected monitors, or pass trough a dock that "re-assign" the EDID of one monitor.
Another good solution is to define a shortcut that simply swap monitor settings, if you have only 2 it should work pretty well.
This is well explained in this post from Lunar developer, which I thank you for this script:
https://notes.alinpanaitiu.com/Weird monitor bugs
Apple should have a look on this, it's not pleasant to end up with a broken setup after a machine upgrade, especially considering how much they cost.
Interesting,
looks like my two monitors are identical.
For whatever reason it has happened in 3-4 days now.
| | | | "DisplayAttributes" = {"SupportsSuspend"=Yes,"MaximumRefreshRate"=76,"SupportsActiveOff"=Yes,"PortID"=1,"ProductAttributes"={"ManufacturerID"="LEN","YearOfManufacture"=2022,"SerialNumber"=0,"ProductName"="LEN S28u-10","AlphanumericSerialNumber"="VNA7WPC5","LegacyManufacturerID"=12462,"ProductID"=25062,"WeekOfManufacture"=8},"MaxVerticalImageSize"=34,"MinimumVariableRefreshRate"=1507328,"MaxHorizontalImageSize"=62,"HasHDMILegacyEDID"=No,"Chromaticity"={"Red"={"X"=44416,"Y"=20416},"Green"={"X"=17472,"Y"=40448},"Blue"={"X"=9600,"Y"=3968}},"DefaultColorSpaceIsSRGB"=No,"DefaultWhitePoint"={"X"=20544,"Y"=21568,"Gamma"=144179},"SupportsVariableRefreshRate"=No,"AspectRatio"=15,"MinimumRefreshRate"=23,"MaximumVariableRefreshRate"=4980736,"WhitePoints"=({"X"=20544,"Y"=21568,"Gamma"=144179}),"PreciseAspectRatio"=119507,"ContinuousFrequencySupport"="None","SupportsStandby"=Yes}
| | | | "EDID UUID" = "30AEE661-0000-0000-0820-0103803E2278"
| | | | "DisplayAttributes" = {"SupportsSuspend"=No,"MaximumRefreshRate"=60,"SupportsActiveOff"=No,"PortID"=2,"ProductAttributes"={"ManufacturerID"="LEN","YearOfManufacture"=2022,"SerialNumber"=0,"ProductName"="LEN S28u-10","AlphanumericSerialNumber"="VNA7WNTH","LegacyManufacturerID"=12462,"ProductID"=25062,"WeekOfManufacture"=8},"MaxVerticalImageSize"=34,"MinimumVariableRefreshRate"=2621440,"MaxHorizontalImageSize"=62,"HasHDMILegacyEDID"=No,"Chromaticity"={"Red"={"X"=44416,"Y"=20416},"Green"={"X"=17472,"Y"=40448},"Blue"={"X"=9600,"Y"=3968}},"DefaultColorSpaceIsSRGB"=No,"NativeFormatHorizontalPixels"=3840,"DefaultWhitePoint"={"X"=20544,"Y"=21568,"Gamma"=144179},"SupportsVariableRefreshRate"=Yes,"AspectRatio"=15,"MinimumRefreshRate"=40,"MaximumVariableRefreshRate"=3932160,"WhitePoints"=({"X"=20544,"Y"=21568,"Gamma"=144179}),"PreciseAspectRatio"=119507,"ContinuousFrequencySupport"="CVT","SupportsStandby"=Yes,"NativeFormatVerticalPixels"=2160}
| | | | "EDID UUID" = "30AEE661-0000-0000-0820-0104B53E2278"