sudowork / fix_m1_rgb

Script that attempts to force M1 macs into RGB mode when used with monitors that are defaulting to YPbPr.
132 stars 10 forks source link

Errors: PixelEncoding and Range not as expected / No LinkDescription found in display config #7

Closed Paul-Morris closed 3 years ago

Paul-Morris commented 3 years ago

On a Macbook Pro M1 running Big Sur 11.4 The dryrun is giving errors. I edited plist with a binary editor and there is definitely a LinkDescription in there so I'm not sure what's going on?

`

[2021-07-15 15:26:03 INFO] Found /Library/Preferences/com.apple.windowserver.displays.plist. [2021-07-15 15:26:03 INFO] Backing up file /Library/Preferences/com.apple.windowserver.displays.plist -> /Library/Preferences/com.apple.windowserver.displays.plist.bak.1626377163 [2021-07-15 15:26:03 INFO] Fixing /Library/Preferences/com.apple.windowserver.displays.plist [2021-07-15 15:26:03 INFO] Fixing config for Display 37D8832A-2D66-02CA-B9F7-8F30A301B230 [2021-07-15 15:26:03 INFO] Did not fix Display 37D8832A-2D66-02CA-B9F7-8F30A301B230. Values for PixelEncoding and Range not as expected. [2021-07-15 15:26:03 INFO] Fixing config for Display 6521F0F7-E764-6900-0857-D6964E3302DB [2021-07-15 15:26:03 INFO] Fixed Display 6521F0F7-E764-6900-0857-D6964E3302DB [2021-07-15 15:26:03 INFO] Resulting XML output for /Library/Preferences/com.apple.windowserver.displays.plist:

....

[2021-07-15 15:26:03 INFO] Writing output to /Library/Preferences/com.apple.windowserver.displays.plist [2021-07-15 15:26:03 INFO] Found /Users/paulmorris/Library/Preferences/ByHost/com.apple.windowserver.displays.03D04E29-7EB8-5025-A535-ACC0370EB337.plist. [2021-07-15 15:26:03 INFO] Backing up file /Users/paulmorris/Library/Preferences/ByHost/com.apple.windowserver.displays.03D04E29-7EB8-5025-A535-ACC0370EB337.plist -> /Users/paulmorris/Library/Preferences/ByHost/com.apple.windowserver.displays.03D04E29-7EB8-5025-A535-ACC0370EB337.plist.bak.1626377163 [2021-07-15 15:26:03 INFO] Fixing /Users/paulmorris/Library/Preferences/ByHost/com.apple.windowserver.displays.03D04E29-7EB8-5025-A535-ACC0370EB337.plist [2021-07-15 15:26:03 INFO] Skipping /Users/paulmorris/Library/Preferences/ByHost/com.apple.windowserver.displays.03D04E29-7EB8-5025-A535-ACC0370EB337.plist. No LinkDescription found in display config. Try rotating your display from Display settings to generate the field in the plist.`

sudowork commented 3 years ago

More just an informational warning. It looks like it did find some displays to fix. It checks multiple files as well, and it looks like only 2 files have displays with a LinkDescription. So you can try running it without the dry-run flag to see if it works for you.

rhcustoms86 commented 3 years ago

I'm getting the same error as well.

rhcustoms86 commented 3 years ago

[2021-07-16 02:24:18 INFO] Writing output to /Library/Preferences/com.apple.windowserver.displays.plist [2021-07-16 02:24:18 INFO] Finished writing output to /Library/Preferences/com.apple.windowserver.displays.plist [2021-07-16 02:24:18 INFO] Found /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist. [2021-07-16 02:24:18 INFO] Backing up file /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist -> /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist.bak.1626420258 /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist -> /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist.bak.1626420258 [2021-07-16 02:24:18 INFO] Fixing /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist [2021-07-16 02:24:18 INFO] Skipping /Users/rhcustoms/Library/Preferences/ByHost/com.apple.windowserver.displays.B3026609-92B1-5A13-8FCE-CBC4DE7390DB.plist. No LinkDescription found in display config. Try rotating your display from Display settings to generate the field in the plist. rhcustoms@Ryans-Mac-mini ~ %

Paul-Morris commented 3 years ago

More just an informational warning. It looks like it did find some displays to fix. It checks multiple files as well, and it looks like only 2 files have displays with a LinkDescription. So you can try running it without the dry-run flag to see if it works for you.

Thanks I misunderstood. Applied! Hopefully it fixes it but my display still says "YPbPr" Side note: I can switch it manually to RGB but then the colours turn pink and green.

rhcustoms86 commented 3 years ago

I still get the Pink/Green too.

khoslaventures commented 3 years ago

also having same issue, I can't seem to get a link description to generate in the plist through the rotate method. And when I run the script, it's not updating the ByHost one which seems to be why I'm not getting RGB.

Btw, is there any way to effectively report this to Apple and ensure it's being fixed? (edit: just installed Monterey, if we report this through Feedback Assistant it's more likely to be addressed.)

clemsontiger commented 3 years ago

Also getting the same issue. Rotating doesn't seem to help the error. I ran it anyway, and oddly, after reboot, prior to signing into an account, my external Dell actually looked right and did in fact say it was running RGB. As soon as I signed in under my account though, the monitor switched to Ypbpr. I manually switched back to RGB and it gave the pink color. Signing back out it looks correct and says RGB again...

jlsalmon commented 3 years ago

Not entirely sure if my case is the same as this, but I simply deleted the user-specific plist file in ~/Library/Preferences/ByHost and reran the script, rebooted and et voila.

beret commented 3 years ago

@jlsalmon Clearing out the existing local plist file as you described resolved that error/warning, and it worked for me after a restart!

Thanks for this great tool @sudowork!

rm ~/Library/Preferences/ByHost/com.apple.windowserver.displays.*.plist

sudowork commented 3 years ago

Okay, I've updated the script to simply backup and remove the ByHost preference file instead of trying to modify in-place. This seems to work better for most people. Done in b4a28257a852ae962a4e4e883566dc8beb569fd8.

Closing this out since the warnings above are expected.