-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent Ids of Screen Change #89
Comments
if you run the tool, it'll give you an example command to set to how you currently have it. in that command is the res, which doesnt include the x60 (refresh rate?) you've got in yours. if you look at my example below.
|
Mine is originally like this:
When I turn on the system after it goes to sleep. The IDs of last two displays swap. |
Your Macbook pro 14 is using Apple Silicon M1, right? There seems to be an issue where displayplacer doesn't work on Apple Silicon. See: I have the same issue with my Mac Studio M1 Max. Currently I don't think there is a solution to this. |
I have this too. "persistent_screen_id" values are not consistent - sometimes they swap between the monitors after re-docking or waking from sleep. Displayplacer itself works fine and it can restore screen position for each "persistent_screen_id" (so I interpret I am not suffering from issue #78), but that doesn't help if the ids themselves keep changing over. In the short-term I will make a cut-down script that I can run manually to simply swap the screens when they are wrong (either as a genuine "detect and swap", or even more simple, just two separate scripts for "ScreenOrder1" and "ScreenOrder2"). But longer term it would be great to have genuinely "persistent" screen IDs, whether to enable displayplacer to work properly, or even better if it would stop the original problem of screen positions being randomly swapped around in the first place. Machine: MacBook Pro (14-inch, 2021), Apple M1 Pro |
Here's my workaround to swap position of two displays set to the same resolution (so if you have 3 displays, like a laptop built-in and 2 external, it won't swap an external with the laptop, unless they are set to the same resolution, in which case you will need additional regex customization): echo "displayplacer list | tail -n1 | sed 's/displayplacer //;s/id:\(.\{36\}\) res:\([0-9x]\{7,9\}\) \(.*\)id:\(.\{36\}\) res:\2/id:\4 res:\2 \3id:\1 res:\2/g' | xargs displayplacer" > swap_display.sh
chmod +x swap_display.sh Execution: ./swap_display.sh Works for me on an M1 Max running macOS 12.5.1 and displayplacer v1.2.0. Best of luck! |
I seem to be having the same issue with my Mac Studio with 4 displays, but I'm not 100% certain. The Ultra Wide monitor on top never changes, but the 3 main monitors constantly get out of order after waking. The Display preference pane usually has them listed in the correct order, but if not I can run DisplayPlacer. However, it seems the thunderbolt ports on the rear are what gets out of order. Using DisplayPlacer does work in the sense that it restores the correct position from the display preference pane perspective, but that doesn't correspond to the physical displays. It's as though while I sleep, gremlins physically unplug my monitors and plug them back in the wrong order. The only way to fix it is to rearrange them in the preference pane and then assign a new main display; or to physically move the thunderbolt cables. Is there any way to assign the thunderbolt ports to a particular monitor ID? Thanks |
@Aquenon, out of interest, which type of IDs are you using for your DisplayPlacer settings? - e.g. "persistent_screen_id" or "contextual_screen_id" (I forget if there are also other options). I initially used "persistent_screen_id", but found that was horribly inconsistent (on my M1 MacBook Pro). I have since changed to use "contextual_screen_id", and found that is much better; though curiously after OS version update a few weeks ago the displays swapped over and I needed to swap the IDs in my script. Since then, although the displays frequently swap after waking from sleep, running the script to set locations (by "contextual_screen_id") has always been effective in putting them back where I want. (I have no deeper insights into the meaning of these IDs or why they might behave differently) |
Thanks for the quick reply. I had to go back and look. The command just said id, but when I scrolled back up to the DisplayPlacer list command, the IDs are the Persistent screen IDs. Each one has a Contextual screen ID as well, but only the persistent ID is included in the command that the list command generates at the end. Do I need to edit the generated command to include the contextual_screen_id with the persistent? Or change the command to only use the contextual? |
Looks like the latter option will work - I have the issue described here where the "persistent" IDs can swap between two identical displays on my M1 Mac Studio. You can replace the GUID-style persistent IDs with the contextual IDs in the generated command - for my setup this meant subbing in I just came across this and made that swap in my little "fix displays" script that runs displayplacer. Now I need to wait and see if those IDs are stickier than the "persistent" ones. (I am not very hopeful.). Failing that, the approach above from @alxw where the command just swaps the two displays would work well for me - thanks for that! |
@mrinvicto @bytejunkie @fsmbrad @colosb01 @Aquenon @amcclain displayplacer v1.4.0 supports addressing screens by serial id. If all of the screens in your setup have unique serial ids, this should fix the id switching issue. Could you try out the new version and let me know if it works on your setup? |
Hey Jake. I've been trying to setup 4 identical projectors as external displays, which I'm having trouble getting to bootup in the correct order (its random every time). I've tried before and after you released this updated version, but to no avail. Is this something which is just beyond the intended use of Displayplacer, or am I doing something wrong? When I throw my intended 'config (list)' back into terminal, nothing much happens. Appreciate your work on this greatly! |
I have two identical Samsung Monitors connected to my Macbook pro 14. Everytime the system sleeps the Persistent Ids of the screens change. I tried swapping the persistent Ids and running the script, but then I get the error
could not find res:1080x1920x60
.This is really frustrating. Please help out here.
The text was updated successfully, but these errors were encountered: