jakehilborn / displayplacer

macOS command line utility to configure multi-display resolutions and arrangements. Essentially XRandR for macOS.
MIT License
3.74k stars 134 forks source link

Does not move "white bar" to primary screen at origin (0,0) #120

Closed jthphoto closed 1 year ago

jthphoto commented 1 year ago

displayplacer list Persistent screen id: 082310C3-6335-4BC1-96CD-5574C39EB0D1 Contextual screen id: 5 Type: 30 inch external screen Resolution: 2560x1600 Hertz: 60 Color Depth: 8 Scaling:off Origin: (0,0) - main display Rotation: 0 Resolutions for rotation 0: mode 0: res:640x800 hz:60 color_depth:8 scaling:on mode 1: res:800x500 hz:60 color_depth:8 mode 2: res:800x600 hz:75 color_depth:8 mode 3: res:800x600 hz:72 color_depth:8 mode 4: res:800x600 hz:60 color_depth:8 scaling:on mode 5: res:800x600 hz:60 color_depth:8 mode 6: res:800x600 hz:56 color_depth:8 mode 7: res:800x640 hz:60 color_depth:8 scaling:on mode 8: res:840x525 hz:60 color_depth:8 scaling:on mode 9: res:960x540 hz:60 color_depth:8 scaling:on mode 10: res:960x540 hz:50 color_depth:8 scaling:on mode 11: res:960x600 hz:60 color_depth:8 scaling:on mode 12: res:1024x640 hz:60 color_depth:8 mode 13: res:1024x640 hz:60 color_depth:8 scaling:on mode 14: res:1024x768 hz:75 color_depth:8 mode 15: res:1024x768 hz:70 color_depth:8 mode 16: res:1024x768 hz:60 color_depth:8 mode 17: res:1280x800 hz:60 color_depth:8 scaling:on mode 18: res:1280x800 hz:60 color_depth:8 mode 19: res:1280x960 hz:60 color_depth:8 mode 20: res:1280x1024 hz:75 color_depth:8 mode 21: res:1280x1024 hz:60 color_depth:8 mode 22: res:1280x1600 hz:60 color_depth:8 mode 23: res:1344x840 hz:60 color_depth:8 mode 24: res:1344x1008 hz:60 color_depth:8 mode 25: res:1400x1050 hz:60 color_depth:8 mode 26: res:1440x900 hz:60 color_depth:8 mode 27: res:1600x1000 hz:60 color_depth:8 mode 28: res:1600x1200 hz:60 color_depth:8 mode 29: res:1600x1280 hz:60 color_depth:8 mode 30: res:1680x1050 hz:60 color_depth:8 mode 31: res:1920x1080 hz:60 color_depth:8 mode 32: res:1920x1080 hz:50 color_depth:8 mode 33: res:1920x1200 hz:60 color_depth:8 mode 34: res:2048x1280 hz:60 color_depth:8 mode 35: res:2560x1600 hz:60 color_depth:8 <-- current mode mode 36: res:800x600 hz:75 color_depth:8 scaling:on mode 37: res:800x600 hz:72 color_depth:8 scaling:on mode 38: res:800x600 hz:56 color_depth:8 scaling:on mode 39: res:1024x768 hz:75 color_depth:8 scaling:on mode 40: res:1024x768 hz:70 color_depth:8 scaling:on mode 41: res:1024x768 hz:60 color_depth:8 scaling:on mode 42: res:1280x960 hz:60 color_depth:8 scaling:on mode 43: res:1280x1024 hz:75 color_depth:8 scaling:on mode 44: res:1280x1024 hz:60 color_depth:8 scaling:on mode 45: res:1280x1600 hz:60 color_depth:8 scaling:on mode 46: res:1344x840 hz:60 color_depth:8 scaling:on mode 47: res:1344x1008 hz:60 color_depth:8 scaling:on mode 48: res:1400x1050 hz:60 color_depth:8 scaling:on mode 49: res:1440x900 hz:60 color_depth:8 scaling:on mode 50: res:1600x1000 hz:60 color_depth:8 scaling:on mode 51: res:1600x1200 hz:60 color_depth:8 scaling:on mode 52: res:1600x1280 hz:60 color_depth:8 scaling:on mode 53: res:1680x1050 hz:60 color_depth:8 scaling:on mode 54: res:1920x1080 hz:60 color_depth:8 scaling:on mode 55: res:1920x1080 hz:50 color_depth:8 scaling:on mode 56: res:1920x1200 hz:60 color_depth:8 scaling:on mode 57: res:2048x1280 hz:60 color_depth:8 scaling:on mode 58: res:2560x1600 hz:60 color_depth:8 scaling:on mode 59: res:400x300 hz:75 color_depth:8 scaling:on mode 60: res:400x300 hz:72 color_depth:8 scaling:on mode 61: res:400x300 hz:60 color_depth:8 scaling:on mode 62: res:400x300 hz:60 color_depth:8 scaling:on mode 63: res:400x300 hz:56 color_depth:8 scaling:on mode 64: res:512x320 hz:60 color_depth:8 scaling:on mode 65: res:512x384 hz:75 color_depth:8 scaling:on mode 66: res:512x384 hz:70 color_depth:8 scaling:on mode 67: res:512x384 hz:60 color_depth:8 scaling:on mode 68: res:512x384 hz:60 color_depth:8 scaling:on mode 69: res:640x400 hz:60 color_depth:8 scaling:on mode 70: res:640x400 hz:60 color_depth:8 scaling:on mode 71: res:640x480 hz:60 color_depth:8 scaling:on mode 72: res:640x480 hz:75 color_depth:8 mode 73: res:640x480 hz:72 color_depth:8 mode 74: res:640x480 hz:60 color_depth:8 mode 75: res:640x480 hz:60 color_depth:8 mode 76: res:640x512 hz:75 color_depth:8 scaling:on mode 77: res:640x512 hz:60 color_depth:8 scaling:on mode 78: res:672x420 hz:60 color_depth:8 scaling:on mode 79: res:672x504 hz:60 color_depth:8 scaling:on mode 80: res:700x525 hz:60 color_depth:8 scaling:on mode 81: res:720x450 hz:60 color_depth:8 scaling:on mode 82: res:800x500 hz:60 color_depth:8 scaling:on mode 83: res:800x600 hz:60 color_depth:8 scaling:on mode 84: res:800x600 hz:60 color_depth:8 mode 85: res:960x600 hz:60 color_depth:8 scaling:on mode 86: res:960x600 hz:60 color_depth:8 scaling:on mode 87: res:1024x768 hz:60 color_depth:8 mode 88: res:1280x800 hz:60 color_depth:8 mode 89: res:1600x1200 hz:60 color_depth:8 mode 90: res:1920x1200 hz:60 color_depth:8 mode 91: res:1920x1200 hz:60 color_depth:8

Persistent screen id: 951419D7-9D46-43B0-A87F-36A6814F94D7 Contextual screen id: 2 Type: 35 inch external screen Resolution: 2560x1600 Hertz: 60 Color Depth: 8 Scaling:off Origin: (0,0) Rotation: 0 Resolutions for rotation 0: mode 0: res:800x600 hz:75 color_depth:8 mode 1: res:800x600 hz:72 color_depth:8 mode 2: res:800x600 hz:60 color_depth:8 mode 3: res:800x600 hz:60 color_depth:8 scaling:on mode 4: res:800x600 hz:56 color_depth:8 mode 5: res:960x540 hz:60 color_depth:8 scaling:on mode 6: res:1024x576 hz:60 color_depth:8 scaling:on mode 7: res:1024x576 hz:60 color_depth:8 mode 8: res:1024x768 hz:75 color_depth:8 mode 9: res:1024x768 hz:70 color_depth:8 mode 10: res:1024x768 hz:60 color_depth:8 mode 11: res:1280x720 hz:60 color_depth:8 mode 12: res:1280x720 hz:50 color_depth:8 mode 13: res:1280x960 hz:60 color_depth:8 mode 14: res:1344x756 hz:60 color_depth:8 mode 15: res:1344x1008 hz:60 color_depth:8 mode 16: res:1366x768 hz:60 color_depth:8 mode 17: res:800x600 hz:75 color_depth:8 scaling:on mode 18: res:800x600 hz:72 color_depth:8 scaling:on mode 19: res:800x600 hz:56 color_depth:8 scaling:on mode 20: res:1024x768 hz:75 color_depth:8 scaling:on mode 21: res:1024x768 hz:70 color_depth:8 scaling:on mode 22: res:1024x768 hz:60 color_depth:8 scaling:on mode 23: res:1280x720 hz:60 color_depth:8 scaling:on mode 24: res:1280x720 hz:50 color_depth:8 scaling:on mode 25: res:1280x960 hz:60 color_depth:8 scaling:on mode 26: res:1344x756 hz:60 color_depth:8 scaling:on mode 27: res:1344x1008 hz:60 color_depth:8 scaling:on mode 28: res:1366x768 hz:60 color_depth:8 scaling:on mode 29: res:400x300 hz:75 color_depth:8 scaling:on mode 30: res:400x300 hz:72 color_depth:8 scaling:on mode 31: res:400x300 hz:60 color_depth:8 scaling:on mode 32: res:400x300 hz:60 color_depth:8 scaling:on mode 33: res:400x300 hz:56 color_depth:8 scaling:on mode 34: res:512x384 hz:75 color_depth:8 scaling:on mode 35: res:512x384 hz:70 color_depth:8 scaling:on mode 36: res:512x384 hz:60 color_depth:8 scaling:on mode 37: res:512x384 hz:60 color_depth:8 scaling:on mode 38: res:640x360 hz:60 color_depth:8 scaling:on mode 39: res:640x360 hz:60 color_depth:8 scaling:on mode 40: res:640x360 hz:50 color_depth:8 scaling:on mode 41: res:640x480 hz:60 color_depth:8 scaling:on mode 42: res:640x480 hz:75 color_depth:8 mode 43: res:640x480 hz:72 color_depth:8 mode 44: res:640x480 hz:60 color_depth:8 mode 45: res:640x480 hz:60 color_depth:8 mode 46: res:672x378 hz:60 color_depth:8 scaling:on mode 47: res:672x504 hz:60 color_depth:8 scaling:on mode 48: res:683x384 hz:60 color_depth:8 scaling:on mode 49: res:683x384 hz:60 color_depth:8 mode 50: res:720x480 hz:60 color_depth:8 mode 51: res:720x576 hz:50 color_depth:8 mode 52: res:800x450 hz:60 color_depth:8 scaling:on mode 53: res:800x600 hz:60 color_depth:8 mode 54: res:1024x768 hz:60 color_depth:8 mode 55: res:1280x720 hz:60 color_depth:8 mode 56: res:2560x1600 hz:60 color_depth:8 <-- current mode

Persistent screen id: 5E7D5547-C35A-492F-B0E1-3AEE3144BB30 Contextual screen id: 4 Type: 27 inch external screen Resolution: 2560x1440 Hertz: 60 Color Depth: 8 Scaling:off Origin: (-2560,0) Rotation: 0 Resolutions for rotation 0: mode 0: res:800x600 hz:75 color_depth:8 mode 1: res:800x600 hz:72 color_depth:8 mode 2: res:800x600 hz:60 color_depth:8 mode 3: res:800x600 hz:60 color_depth:8 scaling:on mode 4: res:800x600 hz:56 color_depth:8 mode 5: res:960x540 hz:60 color_depth:8 scaling:on mode 6: res:960x540 hz:50 color_depth:8 scaling:on mode 7: res:960x600 hz:60 color_depth:8 scaling:on mode 8: res:1024x576 hz:60 color_depth:8 mode 9: res:1024x576 hz:60 color_depth:8 scaling:on mode 10: res:1024x768 hz:75 color_depth:8 mode 11: res:1024x768 hz:70 color_depth:8 mode 12: res:1024x768 hz:60 color_depth:8 mode 13: res:1280x720 hz:60 color_depth:8 mode 14: res:1280x720 hz:60 color_depth:8 scaling:on mode 15: res:1280x960 hz:60 color_depth:8 mode 16: res:1280x1024 hz:75 color_depth:8 mode 17: res:1280x1024 hz:60 color_depth:8 mode 18: res:1280x1440 hz:60 color_depth:8 mode 19: res:1344x756 hz:60 color_depth:8 mode 20: res:1344x1008 hz:60 color_depth:8 mode 21: res:1400x1050 hz:60 color_depth:8 mode 22: res:1440x900 hz:60 color_depth:8 mode 23: res:1440x1280 hz:60 color_depth:8 mode 24: res:1600x900 hz:60 color_depth:8 mode 25: res:1600x1200 hz:60 color_depth:8 mode 26: res:1920x1080 hz:60 color_depth:8 mode 27: res:1920x1080 hz:50 color_depth:8 mode 28: res:1920x1200 hz:60 color_depth:8 mode 29: res:2048x1152 hz:60 color_depth:8 mode 30: res:2560x1440 hz:60 color_depth:8 <-- current mode mode 31: res:800x600 hz:75 color_depth:8 scaling:on mode 32: res:800x600 hz:72 color_depth:8 scaling:on mode 33: res:800x600 hz:56 color_depth:8 scaling:on mode 34: res:1024x768 hz:75 color_depth:8 scaling:on mode 35: res:1024x768 hz:70 color_depth:8 scaling:on mode 36: res:1024x768 hz:60 color_depth:8 scaling:on mode 37: res:1280x960 hz:60 color_depth:8 scaling:on mode 38: res:1280x1024 hz:75 color_depth:8 scaling:on mode 39: res:1280x1024 hz:60 color_depth:8 scaling:on mode 40: res:1280x1440 hz:60 color_depth:8 scaling:on mode 41: res:1344x756 hz:60 color_depth:8 scaling:on mode 42: res:1344x1008 hz:60 color_depth:8 scaling:on mode 43: res:1400x1050 hz:60 color_depth:8 scaling:on mode 44: res:1440x900 hz:60 color_depth:8 scaling:on mode 45: res:1440x1280 hz:60 color_depth:8 scaling:on mode 46: res:1600x900 hz:60 color_depth:8 scaling:on mode 47: res:1600x1200 hz:60 color_depth:8 scaling:on mode 48: res:1920x1080 hz:60 color_depth:8 scaling:on mode 49: res:1920x1080 hz:50 color_depth:8 scaling:on mode 50: res:1920x1200 hz:60 color_depth:8 scaling:on mode 51: res:2048x1152 hz:60 color_depth:8 scaling:on mode 52: res:2560x1440 hz:60 color_depth:8 scaling:on mode 53: res:400x300 hz:75 color_depth:8 scaling:on mode 54: res:400x300 hz:72 color_depth:8 scaling:on mode 55: res:400x300 hz:60 color_depth:8 scaling:on mode 56: res:400x300 hz:60 color_depth:8 scaling:on mode 57: res:400x300 hz:56 color_depth:8 scaling:on mode 58: res:512x384 hz:75 color_depth:8 scaling:on mode 59: res:512x384 hz:70 color_depth:8 scaling:on mode 60: res:512x384 hz:60 color_depth:8 scaling:on mode 61: res:512x384 hz:60 color_depth:8 scaling:on mode 62: res:640x360 hz:60 color_depth:8 scaling:on mode 63: res:640x360 hz:60 color_depth:8 scaling:on mode 64: res:640x480 hz:60 color_depth:8 scaling:on mode 65: res:640x480 hz:75 color_depth:8 mode 66: res:640x480 hz:72 color_depth:8 mode 67: res:640x480 hz:60 color_depth:8 mode 68: res:640x480 hz:60 color_depth:8 mode 69: res:640x512 hz:75 color_depth:8 scaling:on mode 70: res:640x512 hz:60 color_depth:8 scaling:on mode 71: res:640x720 hz:60 color_depth:8 scaling:on mode 72: res:672x378 hz:60 color_depth:8 scaling:on mode 73: res:672x504 hz:60 color_depth:8 scaling:on mode 74: res:700x525 hz:60 color_depth:8 scaling:on mode 75: res:720x450 hz:60 color_depth:8 scaling:on mode 76: res:720x640 hz:60 color_depth:8 scaling:on mode 77: res:800x450 hz:60 color_depth:8 scaling:on mode 78: res:800x450 hz:60 color_depth:8 scaling:on mode 79: res:800x600 hz:60 color_depth:8 scaling:on mode 80: res:800x600 hz:60 color_depth:8 mode 81: res:960x540 hz:60 color_depth:8 scaling:on mode 82: res:960x540 hz:60 color_depth:8 scaling:on mode 83: res:1024x768 hz:60 color_depth:8 mode 84: res:1280x720 hz:60 color_depth:8 mode 85: res:1600x900 hz:60 color_depth:8 mode 86: res:1600x1200 hz:60 color_depth:8 mode 87: res:1920x1080 hz:60 color_depth:8 mode 88: res:1920x1080 hz:60 color_depth:8

No matter what I enter, displaypacer puts the menu bar on Contextual screen id: 4 (at origin -2560,0), even if I copy/paste the recommended command at the end of displaypacer list:

displayplacer "id:082310C3-6335-4BC1-96CD-5574C39EB0D1+951419D7-9D46-43B0-A87F-36A6814F94D7 res:2560x1600 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" "id:5E7D5547-C35A-492F-B0E1-3AEE3144BB30 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(-2560,0) degree:0"

16" M1 MacBook Pro 13.4

jakehilborn commented 1 year ago

Try using the contextual ids instead of the persistent ids in the command like shown below. It's best to not try to use displayplacer to create new layouts. macOS has many restrictions on what screen config combos are allowed. Instead, use the system preferences to arrange the layout to what you need and run displayplacer list to get the command that represents the current layout. Nonetheless, the in the command you shared, the two mirrored screens should have the "white bar" in the system prefs which indicates they are the main screen.

displayplacer "id:5+2 res:2560x1600 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" "id:4 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(-2560,0) degree:0"

Are you also seeing a segmentation fault error when running this like the issue title suggests?

jthphoto commented 1 year ago

Thanks for the reply. Copying the command you suggested still moves the menu bar to the id:4 screen.

And sorry for the misleading title ... I encountered that trying to troubleshoot this problem and was initially going to report that, but decided to report the underlying issue instead (and forgot to change the title).

jakehilborn commented 1 year ago

@jthphoto Try this: Use the system settings to move the white bar to the correct screen. Now that you have your screen arrangement as desired, run displayplacer list. That output command should be correct and capable of moving the white bar to the correct screen. If it still doesn't work, edit the command to replace the persistent ids with the contextual ids.

jthphoto commented 1 year ago

Thanks. Still doesn't work, even with the contextual IDs.

jthphoto commented 1 year ago

Update: For a separate issue I had to restart my computer a couple times today. After that, this started working normally again. Not sure if it's related but either way thanks so much for your help.