Contribute
Register

Adding/Using HiDPI custom resolutions

Joined
Jan 26, 2018
Messages
915
Motherboard
ASRock X299 Professional Gaming XE
CPU
i9-7980xe
Graphics
Vega
Mac
Mac Pro
Mobile Phone
Android
Yes, you can do that, but HiDPI on any screen other than 5120x2880 will look **** and blurry.
 
Joined
Apr 5, 2016
Messages
765
Motherboard
GIGABYTE Z170X-Gaming 7
CPU
i7-6700K
Graphics
GTX TITAN X
Mac
iMac, MacBook, MacBook Air, MacBook Pro, Mac mini, Mac Pro
Classic Mac
Apple, LC, Power Mac
Mobile Phone
iOS
Yes, you can do that, but HiDPI on any screen other than 5120x2880 will look **** and blurry.
2560x1440 HiDPI looks best on a 5120x2880 display, but it still looks better than 2560x1440 Non-HiDPI on a 3840x2160 display.

1920x1080 HiDPI looks best on a 3840x2160 display, but if the display is 27 inches then things drawn on the screen seem too large - take up too much space. This is why Mirceaaa wants to use a 2560x1440 mode. He is using DisplayLink instead of a GPU, so 2560x1440 non-HiDPI might be better because less pixels will perform better over DisplayLink (if it doesn't try to scale it up to 3840x2160).
 
Joined
Oct 12, 2013
Messages
11
CPU
i7
Mac
MacBook Pro
Mobile Phone
iOS
Thanks everyone for your replies.

Seems like the DP -> USB C cable has done its job, here are all the resolutions I see now for the 4K monitor:

1565770953816.png

I can now also see and select 'Looks Like 2560x1440' from the Display settings and that does exactly what I need.
Also, no lag, even when scaling on 3360x1890 !

Thank you for your help!
 
Joined
May 13, 2014
Messages
168
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
Radeon VII
I have an Acer XV273K (4K / 120hz), and am able to select 3840x2160@120hz and 1920x1080@120hz HiDPI and everything works correctly. However, for the other intermediate scaling options like "Looks like 2560x1440", I can only select 60hz refresh rate.

I've tried creating custom resolutions in SwitchResX but I can't create anything that's not a 2x resolution. I've seen the guides for DisplayOverrides but they always mention creating 2x resolutions too... not something in between like I'm trying to use here. Any tips?

View attachment 404645View attachment 404646
Did you end up figuring this out? I recently purchased this monitor too and haven't had much luck running it in 'looks like 2560x1440' scaled mode at 120Hz as it's stuck on 60Hz, despite the fact that native retina mode ('looks like 1920x1080') and native res (3840x2160) both work at 120Hz.
 
Joined
Apr 5, 2016
Messages
765
Motherboard
GIGABYTE Z170X-Gaming 7
CPU
i7-6700K
Graphics
GTX TITAN X
Mac
iMac, MacBook, MacBook Air, MacBook Pro, Mac mini, Mac Pro
Classic Mac
Apple, LC, Power Mac
Mobile Phone
iOS
Did you end up figuring this out? I recently purchased this monitor too and haven't had much luck running it in 'looks like 2560x1440' scaled mode at 120Hz as it's stuck on 60Hz, despite the fact that native retina mode ('looks like 1920x1080') and native res (3840x2160) both work at 120Hz.
Lets see if I can figure this out:

I have an HDMI 2.0 display with many 4K timings (multiple refresh rates from 24Hz to 60Hz). All scale timings appear to use the same refresh rate.

SwitchResX has an option to change the "Scaled resolutions base" to a different resolution but it does not specify the refresh rate. The option adds a "DisplayPixelDimensions" element to an override for the display in the /System/Library/Displays/Contents/Resources/Overrides folder.

The string "DisplayPixelDimensions" can be found in the CoreDisplays framework.
Code:
grep -R DisplayPixelDimensions /System/Library/Extensions /Library/Extensions /System/Library/Frameworks

strings /System/Library/Frameworks/CoreDisplay.framework/CoreDisplay
Here's a list of the options that SwitchResX modifies:
"default-resolution" is for the "Startup resolution" option.
"DisplayPixelDimensions" is for the "Scaled resolutions base" option.
"scale-resolutions" is for scaled custom resolutions.
"trng" is for "Frequency Range" options.
"DisplayProductName" is for custom product name option.
"dspc" is for custom resolution timings.
"IODisplayEDID" is for custom timings that don't go into "dspc".
"tovr" is for adding "Standard resolutions".

A lot of the code that uses those is in IOGraphicsLib.c and IODisplayLib.c at opensource.apple.com. Maybe there's a clue in there. These are user land code, not kernel code, so maybe they can be modified to do what you need. Apple might have hidden some stuff in newer versions of those files, so also check older OS versions.

The ability to run different refresh rates for a scaled mode is probably in the user code and should not depend on the individual graphics card drivers (those kernel drivers have the resolution and refresh rate that you want, you just need to find out how to get the user land code to use that for a HiDPI mode).

I noticed a string "appleMultiRefreshRateScaledModes" and "multiRefreshRateScaledModes" in 10.14.6 (not in 10.14.3) for the CoreDisplay framework. Using Hopper Disassembler, it's easy to see that they are used as preferences. I tried
Code:
defaults write com.apple.CoreDisplay multiRefreshRateScaledModes -bool true
defaults write com.apple.CoreDisplay appleMultiRefreshRateScaledModes -bool true
but they didn't appear to change anything. then I added "sudo" which writes to a different set of preferences for root in /private/var/root/Library/Preferences/com.apple.CoreDisplay.plist but that didn't work either.

Then I did
Code:
sudo cp ~/Library/Preferences/com.apple.CoreDisplay.plist /Library/Preferences
and restarted.

It works! Now SwitchResX sees all the refresh rates of the base resolution for each scaled resolution and its corresponding HiDPI mode resolution.

The "appleMultiRefreshRateScaledModes" preference is applied only to Apple displays (vendor code 0x0610). "multiRefreshRateScaledModes" works for all displays.

This leaves a few questions:
  1. How do you use the defaults command to modify /Library/Preferences instead of ~/Library/Preferences or /private/var/root/Library/Preferences?
  2. Which version of macOS between 10.14.3 and 10.14.6 introduced this new preference?
  3. Is there some code that can allow multi refresh rates per scaled mode in earlier macOS version? For instance, Nvidia graphics cards newer than Kepler only work in High Sierra 10.13.x. It looks like the code that uses the new preference is in IOFBBuildModeList and IOFBInstallScaledMode of IOGraphicsLib.c (but the source code available on opensource.apple.com doesn't include these changes).
 
Joined
Apr 5, 2016
Messages
765
Motherboard
GIGABYTE Z170X-Gaming 7
CPU
i7-6700K
Graphics
GTX TITAN X
Mac
iMac, MacBook, MacBook Air, MacBook Pro, Mac mini, Mac Pro
Classic Mac
Apple, LC, Power Mac
Mobile Phone
iOS
How do you use the defaults command to modify /Library/Preferences instead of ~/Library/Preferences or /private/var/root/Library/Preferences?
The correct command is:
Code:
sudo defaults write /Library/Preferences/com.apple.CoreDisplay multiRefreshRateScaledModes -bool true
 
Joined
May 13, 2014
Messages
168
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
Radeon VII
Interesting. Looks like I have some experimentation to try this weekend.

Thanks joevt.
 
Joined
May 13, 2014
Messages
168
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
Radeon VII
Hey joevt, I appreciate the help!

I think I'm closer to than I was before. Strangely though, 2560x1440 scaled mode is now the only option missing in the list.

Here's some screenshots. There's several in there so just flick through them when you get a chance.

 
Joined
Apr 5, 2016
Messages
765
Motherboard
GIGABYTE Z170X-Gaming 7
CPU
i7-6700K
Graphics
GTX TITAN X
Mac
iMac, MacBook, MacBook Air, MacBook Pro, Mac mini, Mac Pro
Classic Mac
Apple, LC, Power Mac
Mobile Phone
iOS
I think I'm closer to than I was before. Strangely though, 2560x1440 scaled mode is now the only option missing in the list.

Here's some screenshots. There's several in there so just flick through them when you get a chance.
Can you show current resolutions and EDID?
It says 5120x2880 is active so it should be an option. Then there should also be a 2560x1440 HiDPI option.

I wonder why your System Preferences / Display screenshot doesn't have a "Show low resolution modes" option. Did you hold the Option key and click "Scaled"?

What version of macOS are you running?

When taking a screen shot, you can use Command-Shift-4 to select an area. Press Space bar to switch between selecting an area and selecting a window. Press Escape to cancel.
 
Joined
May 13, 2014
Messages
168
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
Radeon VII
Can you show current resolutions and EDID?
Sure, here's the EDID.

Here's some screenshots of the list of resolutions I have in SwitchResX.

It says 5120x2880 is active so it should be an option. Then there should also be a 2560x1440 HiDPI option.
That's what's weird. Every other resolution combination is there except 2560x1440 HiDPI. For 2560x1440 there's only the low-res option.

I wonder why your System Preferences / Display screenshot doesn't have a "Show low resolution modes" option. Did you hold the Option key and click "Scaled"?
I can get the full list of resolutions to show up if I hold Alt/Option and click Scaled.

What version of macOS are you running?
10.14.6[/QUOTE]
 
Top