usr-sse2 / RDM

Easily set Mac Retina display to higher unsupported resolutions
1.13k stars 75 forks source link

Change save path to /Library for Catalina or above (for System Integrity Protection) and add ability to restore system-wide settings #19

Closed jnooree closed 3 years ago

jnooree commented 4 years ago

This commit will change destination directory from /System/Library to /Library for systems running macOS Catalina or above. Also adds ability to handle system-provided settings more precisely, and fixes #15, a bug related to writing hiDPI flag(s).

2020/09/01 UPDATE: Now this could automatically backup the system-wide settings, and has a menu to restore those.

Major Changes

2020/09/01 UPDATE:

2020/09/08 UPDATE:

Minor Changes

2020/09/01 UPDATE:

2020/09/08 UPDATE:

usr-sse2 commented 4 years ago

Thanks for such a great work! I'll test and review it next week and then merge.

usr-sse2 commented 3 years ago

Do systems older than Catalina support /Library/Displays/Contents/Resources/Overrides? If so, we should use that always instead of trying to write into the system folder. I just didn't know that /Library/... is supported.

jnooree commented 3 years ago

Do systems older than Catalina support /Library/Displays/Contents/Resources/Overrides? If so, we should use that always instead of trying to write into the system folder. I just didn't know that /Library/... is supported.

I just have no idea. I only have a mac that supports Catalina and above, so I cannot verify it. I've found out that the /Library/ folder works from here, at least for Catalina and above.

usr-sse2 commented 3 years ago

Ok, then I'll check it myself on High Sierra.

usr-sse2 commented 3 years ago

High Sierra ignores /Library/Displays (and at least in my case seems to ignore scaled-resolutions, so supporting it becomes useless in that case, but I'll check later with a non-TV display), so I'll check Mojave next.

usr-sse2 commented 3 years ago

While testing I found that if /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-30ae/DisplayProductID-60c9 doesn't exist, then RDM fails because it can't backup this file. Only when I created this file, RDM allowed to save settings in /Library/Displays/Contents/Resources/Overrides/DisplayVendorID-30ae/DisplayProductID-60c9.

jnooree commented 3 years ago

While testing I found that if /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-30ae/DisplayProductID-60c9 doesn't exist, then RDM fails because it can't backup this file. Only when I created this file, RDM allowed to save settings in /Library/Displays/Contents/Resources/Overrides/DisplayVendorID-30ae/DisplayProductID-60c9.

It is now fixed by jnooree/RDM@9b8623b. Sorry for my mistake.

jnooree commented 3 years ago

One small thing to note: the version 2.4.0 should be added to the latest commit (or the commit that has changed the internal version string, c61cbe4), to match the documentation. Thanks for merging my PR!

usr-sse2 commented 3 years ago

I'm not releasing it now, so I'll update the tags and docs later. There are issues with the calculator and with working with both plist locations (we shouldn't write into System folder on 10.15+ even if it's writable) that I'll fix myself.