RehabMan
Moderator
- Joined
- May 2, 2012
- Messages
- 183,242
- Motherboard
- Intel DH67BL
- CPU
- i7-2600K
- Graphics
- HD 3000
- Mac
-
- Mobile Phone
-
I've tried to do this quite a few times. My 4540s has a 15" 1920x1080p monitor. Most of the time, I can work close enough to the display such that the text is not too small. But sometimes, it would be useful to work at 1600x900. Unfortunately, if you use a normal scaled resolution at 1600x900 the text is not as crisp. It would be great to use Apple's HiDPI tech to get better scaling.
Same thing goes for my Lenovo u430 with 1600x900 14" display. Sometimes it would be great to use 1440x810 instead. The result is not retina clarity, but it isn't bad... This post will use my Lenovo u430 as an example.
I've tried a number of methods as documented in the following threads, but they've always come up short and don't really work. The problem is they rely on SwitchResX to add the resolutions which is fairly buggy and will not add all resolutions consistently. SwitchResX works great for selecting modes not available in SysPrefs->Displays, but not so good for adding custom resolutions.
http://forums.macrumors.com/showthread.php?t=1568657
http://www.tonymacx86.com/graphics/...na-hidpi-resolution-your-desktop-display.html
http://www.insanelymac.com/forum/to...na-hidpi-resolution-for-your-desktop-display/
In addition, they have you extracting EDID and other unnecessary tasks...
The other day, I borrowed a friend's MacBookPro11,2 with retina display. I did a little poking around, and in particular, I grabbed the display override plist for the built-in retina display. Looking at that file and experimenting with it gave me the information needed to add your own custom resolutions to our own display plist. There are some quirks, but it works...
First step is you must enable HiDPI mode:
Note: I did not have to do the second one.
Note: For 10.11.0 and later, the location of the display overrides have changed. They are now at
/System/Library/Displays/Contents/Resources/Overrides. If you are running 10.11 or later, make sure you substitute the new path as appropriate.
Next, determine your vendor-id and product-id of your display. This is available from ioreg. Using IORegistryExplorer, look under your display under your graphics device:

Your ids are DisplayVendorID and DisplayProductID. The hex values here determine where in /System/Library/Displays/Overrides, you create the directory/plist file. If the file already exists, you should edit the existing file (copy it to your Desktop for editing).
In my case, the vendor-id is 0xdae, so I need to create a directory (it may already be present):
Next, create your plist file. I create it on my desktop and then copy it to the overrides folder later. the file name should be named after your product id. In my case the product-id is 0x1482, so the name will be DisplayProductID-1482.plist. I name it with extension plist to make it easy to open the file. The starting contents should look like this:
The DisplayProductName can be whatever you like. Note that DisplayProductID and DisplayVendorID must be converted from hex to decimal for the plist.
Next step is to add your custom resolution(s). Open the plist that is now on your desktop in a plist editor (I use xcode), and then add your custom resolutions under scale-resolutions.
You must add two resolutions for each custom resolution you'd like. My native display on this laptop is 1600x900, so I'm going to add two custom resolutions 1366x768 and 1440x810. Note how the resolutions are carefully chosen to reflect a 16:9 aspect ratio. Custom resolutions are array entries under scale-resolutions that have type Data and have two 32-bit values. The values are in natural byte-order (big-endian/Motorola byte-order, not little-endian or Intel byte order). 1366x768 would be:
Note that the value you enter here are in hex. 0x556 is 1366 and 0x300 is 768.
In order to make it HiDPI capable, you must also add another scaled resolution at twice the custom resolution above, so... 2732x1536. Converted to Data hex format:
With these two entries, it looks like this in the xcode plist editor:

You can test this plist now by copying it and rebooting:
Note that the destination in Displays/Overrides does not have a plist extension.
After that you can restart:
You can now access the HiDPI resolution of 1366x768 in SysPrefs->Displays.
Curious things start to happen if you add multiple new HiDPI resolutions. There seems to be some filtering going on in SysPrefs->Displays. Resolutions which are 'close' to each other are filtered out and only one is shown if they are close (eg. 1366x768 either/or 1440x810).
On the Probook (1080p native), if you add 1440x810, it will override the 1366x768, but on the Lenovo u430 (900p native), the 1366x768 seems to override 1440x810:

If you run SwitchResX with both installed you'll be able to select either one and activate it even though both are not available in SysPrefs->Displays. SysPrefs->Displays is filtering the resolutions in a way that SwitchResX is not. Note that using SwitchResX to add these resolutions does not work most of the time. You must edit the plist directly.
On my 4540s I was able to add both 1600x900 and 1440x810 (or 1366x768). In that case, the system showed both 1600x900 and the 1440x810 (or 1366x768) but not the 1440x810 and 1366x768 at the same time. Thus why I say the system is filtering resolutions that are close to each other.
Just for clarification, this is what my plist looks like (in text) for both 1366x768 and 1440x810 (Data values are encoded base64):
Adding custom HiDPI resolutions should prove very useful for screens which have very high resolution (retina class) or even moderate resolution on small screens (1080p on 13" or under).
You will notice some performance degradation when running a scaled resolution like this. This is because the system is rendering to the high-resolution frame buffer (at twice the size), then scaling down to the native resolution of the display (that part is probably done in hardware).
Automatic tool
I have not tried this tool, but there is a web based program that can generate a display override plist for you.
Same thing goes for my Lenovo u430 with 1600x900 14" display. Sometimes it would be great to use 1440x810 instead. The result is not retina clarity, but it isn't bad... This post will use my Lenovo u430 as an example.
I've tried a number of methods as documented in the following threads, but they've always come up short and don't really work. The problem is they rely on SwitchResX to add the resolutions which is fairly buggy and will not add all resolutions consistently. SwitchResX works great for selecting modes not available in SysPrefs->Displays, but not so good for adding custom resolutions.
http://forums.macrumors.com/showthread.php?t=1568657
http://www.tonymacx86.com/graphics/...na-hidpi-resolution-your-desktop-display.html
http://www.insanelymac.com/forum/to...na-hidpi-resolution-for-your-desktop-display/
In addition, they have you extracting EDID and other unnecessary tasks...
The other day, I borrowed a friend's MacBookPro11,2 with retina display. I did a little poking around, and in particular, I grabbed the display override plist for the built-in retina display. Looking at that file and experimenting with it gave me the information needed to add your own custom resolutions to our own display plist. There are some quirks, but it works...
First step is you must enable HiDPI mode:
Code:
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled
Note: I did not have to do the second one.
Note: For 10.11.0 and later, the location of the display overrides have changed. They are now at
/System/Library/Displays/Contents/Resources/Overrides. If you are running 10.11 or later, make sure you substitute the new path as appropriate.
Next, determine your vendor-id and product-id of your display. This is available from ioreg. Using IORegistryExplorer, look under your display under your graphics device:

Your ids are DisplayVendorID and DisplayProductID. The hex values here determine where in /System/Library/Displays/Overrides, you create the directory/plist file. If the file already exists, you should edit the existing file (copy it to your Desktop for editing).
In my case, the vendor-id is 0xdae, so I need to create a directory (it may already be present):
Code:
sudo mkdir /System/Library/Displays/Overrides/DisplayVendorID-dae
Next, create your plist file. I create it on my desktop and then copy it to the overrides folder later. the file name should be named after your product id. In my case the product-id is 0x1482, so the name will be DisplayProductID-1482.plist. I name it with extension plist to make it easy to open the file. The starting contents should look like this:
Code:
<?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>Lenovo u430 Display</string>
<key>DisplayProductID</key>
<integer>5250</integer>
<key>DisplayVendorID</key>
<integer>3502</integer>
<key>scale-resolutions</key>
<array>
</array>
</dict>
</plist>
The DisplayProductName can be whatever you like. Note that DisplayProductID and DisplayVendorID must be converted from hex to decimal for the plist.
Next step is to add your custom resolution(s). Open the plist that is now on your desktop in a plist editor (I use xcode), and then add your custom resolutions under scale-resolutions.
You must add two resolutions for each custom resolution you'd like. My native display on this laptop is 1600x900, so I'm going to add two custom resolutions 1366x768 and 1440x810. Note how the resolutions are carefully chosen to reflect a 16:9 aspect ratio. Custom resolutions are array entries under scale-resolutions that have type Data and have two 32-bit values. The values are in natural byte-order (big-endian/Motorola byte-order, not little-endian or Intel byte order). 1366x768 would be:
Code:
<00000556 00000300>
Note that the value you enter here are in hex. 0x556 is 1366 and 0x300 is 768.
In order to make it HiDPI capable, you must also add another scaled resolution at twice the custom resolution above, so... 2732x1536. Converted to Data hex format:
Code:
<00000aac 00000600 00000001>
With these two entries, it looks like this in the xcode plist editor:

You can test this plist now by copying it and rebooting:
Code:
cd ~/Desktop
sudo cp DisplayProductID-1482.plist /System/Library/Displays/Overrides/DisplayVendorID-dae/DisplayProductID-1482
Note that the destination in Displays/Overrides does not have a plist extension.
After that you can restart:
Code:
sudo reboot
You can now access the HiDPI resolution of 1366x768 in SysPrefs->Displays.
Curious things start to happen if you add multiple new HiDPI resolutions. There seems to be some filtering going on in SysPrefs->Displays. Resolutions which are 'close' to each other are filtered out and only one is shown if they are close (eg. 1366x768 either/or 1440x810).
On the Probook (1080p native), if you add 1440x810, it will override the 1366x768, but on the Lenovo u430 (900p native), the 1366x768 seems to override 1440x810:

If you run SwitchResX with both installed you'll be able to select either one and activate it even though both are not available in SysPrefs->Displays. SysPrefs->Displays is filtering the resolutions in a way that SwitchResX is not. Note that using SwitchResX to add these resolutions does not work most of the time. You must edit the plist directly.
On my 4540s I was able to add both 1600x900 and 1440x810 (or 1366x768). In that case, the system showed both 1600x900 and the 1440x810 (or 1366x768) but not the 1440x810 and 1366x768 at the same time. Thus why I say the system is filtering resolutions that are close to each other.
Just for clarification, this is what my plist looks like (in text) for both 1366x768 and 1440x810 (Data values are encoded base64):
Code:
<?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>Lenovo u430 Display</string>
<key>DisplayProductID</key>
<integer>5250</integer>
<key>DisplayVendorID</key>
<integer>3502</integer>
<key>scale-resolutions</key>
<array>
<data>AAALQAAABlQ=</data>
<data>AAAFoAAAAyo=</data>
<data>AAAKrAAABgA=</data>
<data>AAAFVgAAAwA=</data>
</array>
</dict>
</plist>
Adding custom HiDPI resolutions should prove very useful for screens which have very high resolution (retina class) or even moderate resolution on small screens (1080p on 13" or under).
You will notice some performance degradation when running a scaled resolution like this. This is because the system is rendering to the high-resolution frame buffer (at twice the size), then scaling down to the native resolution of the display (that part is probably done in hardware).
Automatic tool
I have not tried this tool, but there is a web based program that can generate a display override plist for you.
Last edited by a moderator: