Display arrangement gets reset after connecting to a different external display

Solution 1:

macOS fails to preserve my monitor layouts too. I wrote a tool called displayplacer that lets describe your monitor layout as a terminal command. I then use BetterTouchTool to execute these profiles via hotkeys. Create a profile for your layout with the docking station and then execute the profile after you plug in.

For example, on my 4 monitor setup at home I have this profile: displayplacer "id:A46D2F5E-487B-CC69-C588-ECFD519016E5 res:3840x2160 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" "id:F466F621-B5FA-04A0-0800-CFA6C258DECD res:1440x900 color_depth:4 scaling:on origin:(-1440,1437) degree:0" "id:4C405A05-8798-553B-3550-F93E7A7722BB res:1440x2560 color_depth:8 scaling:off origin:(3840,-363) degree:270" "id:18173D22-3EC6-E735-EEB4-B003BF681F30 res:1920x1200 color_depth:8 scaling:off origin:(960,-1200) degree:0"

Also available via Homebrew brew tap jakehilborn/jakehilborn && brew install displayplacer