Display arrangement gets reset after connecting to a different external display

displaydock

My MacBook Pro (15-inch, 2018) is connected to two Lenovo ThinkVision P27q-10 displays via a Kensington SD5200T docking station. One display is connected to the docking station via DisplayPort; the other via HDMI. The Mac is connected to the docking station with a single USB-C cable. The display arrangement in macOS is set up accordingly and is working perfectly.

However, when I disconnect the Mac from the docking station and connect it to a different external monitor (e.g. a TV) via a HDMI dongle, then the display arrangement settings in macOS are reset the next time I reconnect the Mac to the docking station.

Does anyone have any idea why this is happening and how to fix it, so that I don't have to reconfigure the display arrangement each time I connect my Mac to a different display?

Best Answer

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

Related Question