其他分享
首页 > 其他分享> > 黑苹果

黑苹果

作者:互联网

开启hidpi模式

sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true

检测您的显示器

ioreg -lw0 | grep IODisplayPrefsKey

得到输出的结果

"IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@0/display0/AppleBacklightDisplay-610-a019"
"IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@2/display0/AppleDisplay-10ac-d06e"

生成文件

第二行的10acd06e为16进制的数值,对应文件名:
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-10ac/DisplayProductID-d06e

并转化成10进制数字填入下面xml中

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>DisplayProductName</key>
  <string>DELL U2515H</string>
  <key>DisplayProductID</key>
  <integer>53358</integer>
  <key>DisplayVendorID</key>
  <integer>4268</integer>
  <key>scale-resolutions</key>
  <array>
    <data>AAAKAAAABaAAAAABACAAAA==</data& 大专栏  黑苹果gt;
    <data>AAAFAAAAAtAAAAABACAAAA==</data>
    <data>AAAPAAAACHAAAAABACAAAA==</data>
    <data>AAAHgAAABDgAAAABACAAAA==</data>
    <data>AAAMgAAABwgAAAABACAAAA==</data>
    <data>AAAGQAAAA4QAAAABACAAAA==</data>
    <data>AAAKAgAABaAAAAABACAAAA==</data>
    <data>AAAKrAAABgAAAAABACAAAA==</data>
    <data>AAAFVgAAAwAAAAABACAAAA==</data>
  </array>
</dict>
</plist>

然后把文件拷贝到该目录:

/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-`10ac`/DisplayProductID-`d06e`

重新启动Mac

重启即可切换设置的分辨率,如果设置中没有找到对应的分辨率,可以使用工具RDM来切换

参考文章:

https://github.com/xzhih/one-key-hidpi/blob/master/README-zh.md
https://www.tonymacx86.com/threads/adding-using-hidpi-custom-resolutions.133254/
https://comsysto.github.io/Display-Override-PropertyList-File-Parser-and-Generator-with-HiDPI-Support-For-Scaled-Resolutions/
https://zhuanlan.zhihu.com/p/36913571
https://bbs.feng.com/read-htm-tid-11677019.html

标签:DisplayVendorID,d06e,DisplayProductID,苹果,IODisplayPrefsKey,com,10ac
来源: https://www.cnblogs.com/dajunjun/p/11718088.html