由於我是10.14系統,軟件支持不夠,只能手工開啟hdpi。原理在 這篇博文 已經分享過了,這里只是摘錄一下,供大家參考。
BacklightDisplay:內置顯示器,
AppleDisplay-10ac-41ac:外接顯示器,10ac=廠商號(我的是DELL),41ac是產品號
-------
➜ ~ sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true
Password:
➜ ~ ioreg -lw0 | grep IODisplayPrefsKey
| | | | "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@0/display0/AppleBacklightDisplay-610-a029"
| | | | "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@2/display0/AppleDisplay-10ac-41ac"
➜ ~ mv Downloads/DisplayProductID-d06e.plist Downloads/DisplayProductID-41ac.plist
➜ ~ cat Downloads/DisplayProductID-41ac.plist
<?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 U2719DS </string>
<key>DisplayProductID</key>
<integer>16812</integer>
<key>DisplayVendorID</key>
<integer>4268</integer>
<key>scale-resolutions</key>
<array>
<data>AAAKAAAABaAAAAABACAAAA==</data>
</array>
</dict>
</plist>
➜ ~ sudo cp Downloads/DisplayProductID-41ac.plist /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-10ac/DisplayProductID-41ac
Password:
cp: /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-10ac/DisplayProductID-41ac: Operation not permitted
➜ ~
-------
小結:
1. 首先要拿到廠商號和設備號,用於在 網頁 填寫分辨率配置文件;
2. 分辨率配置文件的命名規范如下:
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-16進制廠商號/DisplayProductID-16進制設備號
3. 禁用“無根”系統完整性保護的方法如下:
重啟->cmd+R->csrutil disable; reboot
在這個模式下可操作的文件夾很小,所以說要reboot后操作;然后再進一次cmd+r,開啟csrutil