0%

Macbook pro 2020 开启HiDPI连接2K显示器

 关于Macbook pro 2020 开启HiDPI的方式(macOS Catalina 10.15.7)。参考自Scaled Resolutions.

暂时关闭系统的SIP

  • 重启mac,按住Command+R,进入recovery模式
  • 登录用户,打开菜单栏->实用工具->终端
  • 输入csrutil disable
  • 重启机器

开启HiDPI

打开终端,输入

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

获取显示器信息,终端输入

1
ioreg -lw0 | grep IODisplayPrefsKey

可以得到如下的显示器信息

1
2
| |   | |         "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@0/display0/AppleBacklightDisplay-610-a03e"
| | | | "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@1/display0/AppleDisplay-5e3-2490"

其中AppleDisplay是外接的显示器,AppleBacklightDisplay是内置的显示器。主要是外接显示器的尾部信息AppleDisplay-5e3-2490,需要记住下面两个参数,后面会用到。

  • DisplayVendorID 对应5e3
  • DisplayProductID对应2490

之后去这个网站Scaled Resolutions,填写左边表格的对应信息,会自动生成右边的文件,主要是下面几项

  • DisplayProductName 这个显示器名称好像可以随意,我写的就是显示器界面出现的那个名称
  • DisplayProductID 和 DisplayVendorID 就是上面获取到的对应显示器的这两个字段

Scale Resolutions这部分选择默认即可。下载生成的文件(此处名称是DisplayProductID-2490.plist),其去掉.plist名称后缀,并创建文件夹DisplayVendorID-5e3(就是对应的DisplayVendorID字段),将其放入。

之后将其拷贝到/System/Library/Displays/Contents/Resources/Overrides/目录下。对于10.15.7需要先将目录的read-only去掉(重启后会恢复):

1
2
3
sudo mount -uw /
killall Finder
sudo mv DisplayVendorID-5e3 /System/Library/Displays/Contents/Resources/Overrides/

恢复SIP

重启机器,同样的方式进入recovery模式,打开终端,输入csrutil enable开启SIP,之后重启机器。

切换分辨率

这里使用RDMv2.2,安装后打开,点击右上角,正常情况下会看到目前的所有显示器的分辨率与频率,选择外接的显示器的分辨率那一栏,会显示可用分辨率列表,其中带闪电标记的就是开启了HiDPI的,我这边可以选择的就是1920x1080⚡️

搞定。

更新

昨天mac os出了一个大版本更新,从10.15.7更新到11.0.1(macOs Big Sur),我的两个外接显示器有一个的配置文件直接消失了,需要重新放入配置文件。在进行配置文件存放时出现了问题,原本的挂载命令出错。

1
2
3
sudo mount -uw /
mount_apfs: volume could not be mounted: Permission denied
mount: / failed with 66

搜了一下没找到解决办法,不过看到个其他解决方案如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
To enable HiDPI on Big Sur (11.0.1):

You need to get all the files/folders that are in /System/Library/Displays copied over to /Library. Then you can copy your resolution .plist file.

To make things easier you can just copy/paste this command into terminal:
Code Block language
sudo cp -R /System/Library/Displays /Library/

Now copy over your generated file. Here is an example:
Code Block language
sudo cp ~/Downloads/DisplayProductID-413a.plist /Library/Displays/Contents/Resources/Overrides/DisplayVendorID-10ac/DisplayProductID-413a

Hope this helps!

亲测可行。