Dual identical monitors swap settings after displays turn off

displaysleep-wakethunderbolt

I have dual LG 4k monitors on a 2015 macbook pro on High Sierra. One is connected via a belkin thunderbolt 2 hub. They both work at 4k 60Hz no problem (via displayports, not HDMI, that is).

The system itself is set to never sleep with Prevent computer from sleeping automatically when the display is off in Energy Saver, in System Preferences, and I have Turn display off after 3hrs rather than never.

When I return after more than 3 hrs and wake, i.e. cause the screens to switch on again (the system I believe should not have actually been in sleep due to power connection remaining on the laptop) the two screens consistently swap their settings with each other, such that the one I have at 270 rotation for vertical aspect swaps with the one I have at normal rotation, and I have to manually swap them back again.

Strange and annoying. Not quite sure what to do.

Best Answer

This is the combination of:

  • macOS not caring about serial numbers
  • a race condition.

See my detailed answer in Primary display randomly changes