-
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
id switching #30
Comments
Yeah that should not be happening. Are the two monitors the same brand and same model? |
yes they are the exact same brand and model. I just came back to my desk after lunch and it was flipped again. the edits i made this morning didn't work so I swapped the IDs and ran it from Automator and it corrected. So being that its the same model displays seem like the os is swapping the IDs when it wakes up? |
I used to have 2 identical monitors. One at work in portrait mode, and one at home in landscape mode. macOS thought they were the same so I always had to change the orientation when plugging in my laptop. Try this, use |
I will get that a shot. For now, I am not unplugging as I am not going anywhere LOL. I will let you know what I find. Thank you for the great fix to this problem! |
After a few days and a couple of display swaps. The contextual screen ids don't make any difference. It looks like they switch as well. For the moment I have two Automator apps on my desktop. the second has the reversed IDs. So if encounter the monitor swap, I click on #1, if that doesn't fix it I click on #2 with the swapped IDs. |
It doesn't seem like this has anything to do with the problem posted above, but today one of my displays persistent IDs changed. |
What models are your monitors? |
Ther are both BenQ GW2765 monitors |
I have attached a rough log for the last 3 weeks. I don't know if it might help track this down. |
I'm having this same issue. Persistent IDs for two identical monitors are changing each time I plug them in. Not just swapping IDs, but actually changing to completely new IDs. As a result, displayplacer kicks back an "Unable to find screen..." error for both of them. Strangely, it works occasionally after several unplugs/replugs, suggesting that maybe the screens are cycling through a discrete number of IDs...? I am connecting to the monitors via this "J5 Create" USB-C hub: Would the hub potentially cause this issue? Maybe I could log the IDs that I see after each replug, and try to determine if there's a pattern? Thanks for all you've done on this app... when it works, it works like a charm! |
@joshgolden Same issue here. I tried SwitchResX today and saw the same problem. But I found the ID for one monitor is always the same (need to confirm this). The ID of the other monitor changes among two values (or cycles through some as mentioned). So I wrote a small python script to keep the non-changing ID there and use the other ID whatever appears. I'll use this script for a few days and report the result.
|
I determined that the monitors were each cycling between two unique IDs. So I updated my executable Terminal script to run displayplacer twice, separately for each set of IDs. Seems to be working so far. So that might be a simpler workaround for others experiencing the same issue... not quite as elegant as the Python script above, but gets the job done without any real programming skills required. |
Yes, it seems that they swap two IDs and they are always the same, you just don't know which it is. Oddly I have created two Automator apps with the contextual IDs each has the IDs swapped. that seems to be working if my screens are swapped I click on the first one if that doesn't work I click on the second one. This week that has been working |
Wanted to echo this experience. I have two identical monitors that keep flipping "persistent" IDs back and forth when my 2020 16" MBP goes to sleep. One point to note is that I had exactly the same setup (same Satechi dual HDMI adapter, USB hub, etc., I basically plugged the new laptop into the existing USB-C/Thunderbolt accessories) on my 2017 15" MBP and it was stable. Makes me wonder if it's the video card or some other change in the MBP that is contributing to this behaviour. Is the issue that the drivers in MacOS don't make the effort to grab the serial number of the monitors or that the monitors lack a unique serial number? ------------------- MAIN EDID BLOCK -----------------
|
Having a similar issue, but I'm connecting: MacBook <-> USB Dock <-> 3 Identical Monitors (1 DisplayPort, 2 HDMIs)(BenQ 2780) I've installed the DisplayLink driver to be able to use the Dock Graphic card.
Starts working after I run again: And then, with the new ID's:
|
Same issue here, I have two of the same Trio models from mobilepixels.us that use DisplayLink. |
I also have two identical monitors that seem to be swapping persistent ids with one another. |
I wrote my own script. I have 2 external and 1 laptop monitor, so this script tries to detect which are the 2 external monitors and then just switches the configuration for them using displayplacer: https://gist.github.com/xdhmoore/cb8321bbd00f2fe07e418d9fa93367ca |
I came to post my bodgy script that has been working well for the past several weeks: https://gist.github.com/markdon/6d13190d4518f16e61c104a1fbe1606d @xdhmoore 's script seems way better! It doesn't hardcode anything and just swaps the two external displays between their existing configs. So you would run a script that you expect to place your monitors correctly, then run ./toggle-displays.bash if they are in the wrong positions. |
I arrived here by googling a Macbook issue where when you connect 2 external displays via a dock, the displays swap randomly when the MacBook wakes up. @march 's answer in this post explains that it is a macOS issue: I am using this tool as a workaround, by programmatically swapping the monitors' positions. Unless there's a way to grep the factory serial numbers of the monitors, there's no way to fix the identification problem. |
Having this issue as well, but interestingly only since today having upgraded my Intel Mac to an M1-based Mac. Anyone using an Intel Mac and still having this issue? |
@Oliver-Saer On MBP 2019 with two identical monitors on USB-C, one portrait. |
This is an internal Apple API problem, monitors IDs keep switching randomly at wake up. I recommend using contextual ids instead of the persistent ids (because these switch randomly) Stepsdisplayplacer list Copy the output and replace In my case the final command would be ( I have replaced persistent-ids for contextual-ids) displayplacer "id:5 res:1920x1080 hz:60 scaling:off origin:(0,0) degree:0" "id:2 res:1920x1080 hz:60 scaling:off origin:(-1920,0) degree:0" "id:4 res:1920x1080 hz:60 scaling:off origin:(1920,0) degree:0" I am not 100% sure but I think there is a trade off with this method, that is, you have to connect each screen to a different port |
Ran into the same problem. Mac Mini Intel. My use case is switch between LG Monitor and Samsung TV as main display and mirror the other in a scaled way. Ran into the changing ID problem. After some grumbling, I hacked together a functional bash script that dynamically identifiers IDs. Setup:
I ended up hacking a little bash script that identifies ID based on some pattern in displayplacer list command. (I found that the size is 80/85 for TV and 37/29 for monitor depending on which one is primary). I then read the lines before and 4th column. I then run those bash functions when I want to switch between monitor and TV. I have them tied to hotkeys via Better Touch tools. Works well. Would be nice to have fixed in future or maybe have a mechanism to set based on some alternative identification method that takes into account that ID might change.
|
@Sublevel4 @joshgolden @yongming-qin @phaedrusrex @luiscachog @bxm156 @xdhmoore @markdon @yuliswe @Oliver-Saer @angel-langdon @LeoUfimtsev 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? |
@jakehilborn Unfortunately I no longer have the hardware to reproduce this issue. |
I'm no longer using this as toggling off |
@jakehilborn Last time I checked apples public API, I remember the unique serial ID was either always an empty string or just unavailable. What's changed? |
@jakehilborn I updated today. When i run displayplacer list, both of the monitors are listed like this Display 1 Display 2 So for me the serial Ids are the same for both monitors. And for the record Oliver's Automatically rearrange spaces setting doesn't work for me, it still flips. |
I'm on MBP M1 2012, macOS 13.4.1 (c) (22F770820d). I think they might have fixed the monitor flipping bug. It hadn't occurred to me in a few months. |
I got this installed and working via a shortcut app and via Automator. The issue I seem to be having is that the id is getting switched.
For example. I left my desk last night and everything was displaying correctly. When I came to my desk this morning. the monitors where switched. So I hit the shortcut. Screens flickered and stayed the same. I then tried the Automator app. Same result.
I opened terminal and ran displayplacer list and got this
id:4927EFE8-6123-BA85-0FAD-1F365C7776E7 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" "id:6D890636-F5C6-E41E-FBC5-7DBE6EB37956 res:2560x1440 hz:60 color_depth:8 scaling:off origin:(-2560,0) degree:0
To fix it I swapped the ids and ran the Automator again within Automator and the displays where corrected. I had to swap the IDs two days ago in the same way. The persistent IDs shouldn't change, right? I have two 27" monitors, each plugged into separate Thunderbolt ports on a 2019 15" MBP
The text was updated successfully, but these errors were encountered: