Contribute
Register

Adding/Using HiDPI custom resolutions

Status
Not open for further replies.
I have taken your advice and put those resolutions in the file, rebooted, installed SwitchResX and this is what I see

View attachment 421621

However, when I select either and click Activate Immediately, screen flashes black, then goes back to previous resolution, so they still don't work.

I want to say that I am connected through a DELL D6000 dock, through the DisplayLink software. I have ordered a DP to USB C cable that should arrive today, so by tomorrow I will have tested it directly and gave feedback... I have a feeling this dock is the core of the lag as well as this whole mess
DisplayLink sends video over USB at 5 Gbps. It has to take the pixels and compress them. This takes CPU power. 4K 60Hz video is at least 12 Gbps. Are all the ports on the dock powered by DisplayLink? Probably. If the USB-C dock had a DisplayPort that was not powered by DisplayLink, it would still be limited to 4K 30 Hz, because two of the four lanes of the USB-C cable are used by USB 3.0.

I've never used DisplayLink so I don't know how it works with different resolutions. I don't know if it supports scaling a 5K frame buffer to a 4K display. It's supposed to support outputting 5K to a 5K display but that's not exactly the same thing. Maybe you can check the displaylink.com website and ask around there.

The following document suggests that choosing 1920x1080 is less performant that 3840x2160 which doesn't make sense since the first one is not marked "(low resolution)" and therefore is probably a HiDPI mode which is just 3840x2160 where everything is drawn four times larger. I would use SwitchResX to verify how that 1920x1080 resolution is setup (is it scaled? is it HiDPI? SwitchResX will tell you for sure).

Since you have a Thunderbolt port, you should get a Thunderbolt dock. A Thunderbolt dock can support two 4K 60 Hz displays which are powered directly by your graphics card (like the displays are connected directly to your MacBook Pro) instead of DisplayLink. You can connect DisplayLink adapters or docks to a USB port of a Thunderbolt Dock if you still want crappy video. DisplayLink is cool if you really need another display and don't have any more display ports. The MacBook Pro can have four displays connected besides the built-in laptop display. If you need 5 or more external displays, then you should try an eGPU (expensive) or DisplayLink (cheap).

Now that you are using SwitchResX, you should delete the file you made. You can recreate the scaled resolutions in SwitchResX. SwitchResX will create a new file for you when you press Command-S to save your changes.

When using SwitchResX, instead of using Activate Immediately, you might consider just Saving changes to the custom resolutions, and restarting. Then check the Custom Resolutions tab to see if the graphics driver accepted the new custom resolutions.
 
I have done everything by the book and my resolutions don't show up for my external monitor in RDM (also tried for other monitors and no luck)... Any help? This is on a genuine 2019 MacBook Pro with a 555X discrete GPU.

I am trying to downscale a 4K monitor (DELL U2718Q) to 2K because on native 4K everything is too small and on 1080p HiDPI everything is too big...

Surely, the display settings automatically gives you the option to choose something in between and one that is suitable for your needs.

Why bother with setting custom res? What's wrong with the default 2560x1440 you show in your settings?
 
Why bother with setting custom res? What's wrong with the default 2560x1440 you show in your settings?
It's DisplayLink. It's not a real graphics card connection. There are problems with DisplayLink. Use SwitchResX to show us the timing info for the 2560x1440 resolution by double clicking it in the current resolutions list. If it's a scaled resolution instead of real timing, then I would try a creating a custom timing. Create a 2560x1440 60Hz timing using CVT-RB. The 2560x1440 timing won't be HiDPI but that's probably a good thing since more pixels will add more lag when using DisplayLink.
 
It's DisplayLink. It's not a real graphics card connection. There are problems with DisplayLink. Use SwitchResX to show us the timing info for the 2560x1440 resolution by double clicking it in the current resolutions list. If it's a scaled resolution instead of real timing, then I would try a creating a custom timing. Create a 2560x1440 60Hz timing using CVT-RB. The 2560x1440 timing won't be HiDPI but that's probably a good thing since more pixels will add more lag when using DisplayLink.

The only way The 2560x1440 could be HiDPI was if the physical resolution of the screen was 5120x2880, e.g a 5K screen. This screen ain't one.
 
The only way The 2560x1440 could be HiDPI was if the physical resolution of the screen was 5120x2880, e.g a 5K screen. This screen ain't one.
No. Only the frame buffer needs to be 5120x2880. That's why you need to have a 5120x2880 scaled resolution to get a 2560x1440 HiDPI mode. The physical size doesn't matter. A graphics card can scale a 5120x2880 frame buffer to a 3840x2160 signal. How do you think my MacBook Pro 2015 has a "Looks like 1920x1200" mode (actual frame buffer size 3840x2400) when the built in display is only 2880x1800?

Even on my old Mac Pro 2008, I can create a 6544x4090 resolution and display it on my Apple 30" Cinema Display (2560x1600). The GTX 680 doesn't supports scaled resolutions taller than 4096 (4K) pixels. The display is 16:10 so I chose a resolution that is a multiple of 10 tall (4090) and multiplied by 16/10 to get the horizontal size (6544). Using 8:5 might work, but I chose an even number of lines and a multiple of 16 for the horizontal because 16 is a higher power of 2 than 8.
 
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).
 
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!
 
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.
 
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).
 
Status
Not open for further replies.
Back
Top