Contribute
Register

Adding/Using HiDPI custom resolutions

Status
Not open for further replies.
Does this mean custom scaled resolutions were created by SwitchResX? The webpage for creating scaled resolutions may use different hex data than SwitchResX. Scaled resolution includes the width and height and may optionally include flags:
Code:
    kScaleInstallAlways         = 0x00000001,    // skips all the various checks and always installs
    kScaleInstallNoStretch      = 0x00000002,    // disables the install of a stretched version if the aspect is different
    kScaleInstallNoResTransform = 0x00000004,    // install resolution untransformed
    kScaleInstallMirrorDeps     = 0x00000008    // install resolution on mirror dependents of this display
Post the override file created by SwitchResX.


The HiDPI modes are listed in SwitchResX but when you select them, they give a black screen? Post a screenshot of the current resolutions list.

macOS has a minimum height and width for scaled resolutions (I think minimum height used to be 600 but now it's 500? check various non HiDPI resolutions) so it won't accept HiDPI modes that have a height less than 1000.


Seems like it might be a bug with Apple's drivers. What version of macOS are you running?


Your display has a blank custom display name. You should enter something or unselect the "Use custom display name".

You only show the 100 Hz version of the scaled modes. There should be corresponding HiDPI modes for 50 Hz and 60 Hz (for example, 2580 x 1080 HiDPI 50Hz, 60Hz, 100Hz).

Did the 1720 x 720 HiDPI mode also not work?

For the 2580 x 1080 HiDPI mode, what if you create a different ratio by adding 8 pixels to the vertical only, will the HiDPI mode work? Keep repeatedly adding 8 pixels to the vertical until it does work. Then repeat the test starting at 2160 and subtracting 8 pixels until it works. I want to know how different from 21.5:9 the aspect ratio needs to be before it can work.


Attached switchresx plist (originally had no file ext on the end, had to add .txt to allow the upload) and also my plist generated with https://comsysto.github.io/Display-...or-with-HiDPI-Support-For-Scaled-Resolutions/

I do remember switchresx adding things to my generated plist, however I deleted this file from the appropriate displayproductID folder inside the override folder, as I could see switchresx created its own plist for the monitor under 'DisplayYearManufacture....'

If you could make me a custom switchresx plist that has 5 or 6 resolutions around the scaled 4816x2018 range I would appreciate that.

Attached screenshot of current resolutions and 2 scaled resolutions which I added with +2 in vertical pixels. (4816x2018, 4472x1874). When I select the HiDPI res's at 21:9 that are meant to work (no +2 in vertical) nothing happens, no black screen or anything, resolution stays the same as what it is currently set to.

Running latest version Catalina 10.15.4
 

Attachments

  • DisplayProductID-e25.plist
    565 bytes · Views: 136
  • DisplayYearManufacture-2019-DisplayWeekManufacture-49.txt
    760 bytes · Views: 153
  • Screen Shot 2020-04-27 at 11.06.25 pm.png
    Screen Shot 2020-04-27 at 11.06.25 pm.png
    2.2 MB · Views: 217
  • Screen Shot 2020-04-27 at 11.07.05 pm.png
    Screen Shot 2020-04-27 at 11.07.05 pm.png
    828.8 KB · Views: 232
Attached switchresx plist (originally had no file ext on the end, had to add .txt to allow the upload) and also my plist generated with https://comsysto.github.io/Display-...or-with-HiDPI-Support-For-Scaled-Resolutions/

I do remember switchresx adding things to my generated plist, however I deleted this file from the appropriate displayproductID folder inside the override folder, as I could see switchresx created its own plist for the monitor under 'DisplayYearManufacture....'

If you could make me a custom switchresx plist that has 5 or 6 resolutions around the scaled 4816x2018 range I would appreciate that.

Attached screenshot of current resolutions and 2 scaled resolutions which I added with +2 in vertical pixels. (4816x2018, 4472x1874). When I select the HiDPI res's at 21:9 that are meant to work (no +2 in vertical) nothing happens, no black screen or anything, resolution stays the same as what it is currently set to.

Running latest version Catalina 10.15.4

The following script creates the 'scale-resolutions' info which you can paste into the override file.

Code:
printf '\t<key>scale-resolutions</key>\n\t<array>\n'
IFS=$'\n'
for theline in $(
    for theres in \
        6536x2736 \
        5160x2160 \
        4816x2016 \
        4472x1872 \
        3440x1440
    do
        resx=${theres%x*}
        resy=${theres#*x}
        printf "%08x %08x 00000001 00200000\n" $resx $resy
        printf "%08x %08x 00000001 00200000\n" $resx $((resy+2))
    done
); do
    printf '\t\t<data>'$(echo $theline | xxd -p -r | base64)'</data>\n'
done
printf '\t</array>\n'
It adds the correct aspect resolution (21.5:9) and the same resolution with +2 vertical.
The first 32 bit number after the vertical value is the scale flags according to SwitchResX - it has kScaleInstallAlways set. The next 32 bit number is a set of display mode flags to be set. SwitchResX sets the kDisplayModeValidForMirroringFlag. You might want to add the kDisplayModeValidForHiResFlag (it's a flag that is included in some of Apple's provided override files) - in that case, change 00200000 to 00a00000. It's possible to add another 32 bit number which is a set of display mode flags to be cleared.

Here is a list of display mode flags:
Code:
enum {
    kDisplayModeSafetyFlags             = 0x00000007,

    kDisplayModeAlwaysShowFlag          = 0x00000008,
    kDisplayModeNeverShowFlag           = 0x00000080,
    kDisplayModeNotResizeFlag           = 0x00000010,
    kDisplayModeRequiresPanFlag         = 0x00000020,

    kDisplayModeInterlacedFlag          = 0x00000040,

    kDisplayModeSimulscanFlag           = 0x00000100,
    kDisplayModeBuiltInFlag             = 0x00000400,
    kDisplayModeNotPresetFlag           = 0x00000200,
    kDisplayModeStretchedFlag           = 0x00000800,
    kDisplayModeNotGraphicsQualityFlag  = 0x00001000,
    kDisplayModeValidateAgainstDisplay  = 0x00002000,
    kDisplayModeTelevisionFlag          = 0x00100000,
    kDisplayModeValidForMirroringFlag   = 0x00200000,
    kDisplayModeAcceleratorBackedFlag   = 0x00400000,
    kDisplayModeValidForHiResFlag       = 0x00800000,
    kDisplayModeValidForAirPlayFlag     = 0x01000000,
    kDisplayModeNativeFlag              = 0x02000000
};
enum {
    kDisplayModeValidFlag               = 0x00000001,
    kDisplayModeSafeFlag                = 0x00000002,
    kDisplayModeDefaultFlag             = 0x00000004
};

Here is your resolutions (21.5:9 and 21.5:9+2 pixels) with the 00a00000 display mode flags set.
Code:
    <key>scale-resolutions</key>
    <array>
        <data>AAAZiAAACrAAAAABAKAAAA==</data>
        <data>AAAZiAAACrIAAAABAKAAAA==</data>
        <data>AAAUKAAACHAAAAABAKAAAA==</data>
        <data>AAAUKAAACHIAAAABAKAAAA==</data>
        <data>AAAS0AAAB+AAAAABAKAAAA==</data>
        <data>AAAS0AAAB+IAAAABAKAAAA==</data>
        <data>AAAReAAAB1AAAAABAKAAAA==</data>
        <data>AAAReAAAB1IAAAABAKAAAA==</data>
        <data>AAANcAAABaAAAAABAKAAAA==</data>
        <data>AAANcAAABaIAAAABAKAAAA==</data>
    </array>

Replace scale-resolutions in the SwitchResX override file with that.
 
Hello.
Is it even possible to enable HiDPI on 21:9 2560x1080 screen?
I have SwitchResX.
How calculate correctly other resolutions?

Thank you
 
Is it even possible to enable HiDPI on 21:9 2560x1080 screen?
I have SwitchResX.
How calculate correctly other resolutions?
2560/1080 as a reduced fraction is 64/27. Since the height is 1080, you want to try HiDPI resolutions between 540 (1080/2) and 1080 in height.

Enter the scaled resolutions listed below (skip 2560x1080 and 5120x2160). If they don't work, then try adding 2 pixels to the height (e.g. 2560x1082, 3072x1296, ..., 4608x1946)
Code:
numerator=64
denominator=27
for (( height=540; height <= 1080; height += denominator*4 )); do
    ((width=height*numerator/denominator))
    printf "%4dx%-4s HiDPI = %4dx%-4s scaled\n" $width $height $((width*2)) $((height*2))
done

Results:
Code:
1280x540  HiDPI = 2560x1080 scaled
1536x648  HiDPI = 3072x1296 scaled
1792x756  HiDPI = 3584x1512 scaled
2048x864  HiDPI = 4096x1728 scaled
2304x972  HiDPI = 4608x1944 scaled
2560x1080 HiDPI = 5120x2160 scaled
 
Enter the scaled resolutions listed below (skip 2560x1080 and 5120x2160). If they don't work, then try adding 2 pixels to the height (e.g. 2560x1082, 3072x1296, ..., 4608x1946)

Thank you very much! Now it's much more better.
But some of settings are invalid.
I tried to change adding 2 pixels to 4096x1730 and 4608x1946 but then 3072x1296 and 3584x1512 are invalid.

Xnip2020-05-02_14-03-43.jpg


@joevt Do you know how to fix it?
Thank you very much once again!
 
Thank you very much! Now it's much more better.
But some of settings are invalid.
I tried to change adding 2 pixels to 4096x1730 and 4608x1946 but then 3072x1296 and 3584x1512 are invalid.

@joevt Do you know how to fix it?
Thank you very much once again!
You are using Intel graphics which doesn't support width 4096 or greater. Therefore you must use a width that is less than 4096.

3968x1674 is a perfect 64:27 ratio.
4032x1701 is also perfect but it has an odd height so the HiDPI mode might not be perfect. I think it will work though.
4095x1728 is near to the perfect 4096x1728 option. So try that. Decrease the width further if it doesn't work.
 
You are using Intel graphics which doesn't support width 4096 or greater. Therefore you must use a width that is less than 4096.
Actually, current Intel graphics supports scaled resolutions wider than 4096 but maybe HD4000 Intel graphics does not.
I guess you should research WhateverGreen, Lilu, and Hackintool frame buffer flags.
 
Hello,

I recently bought BenQ EX3203r monitor (2560*1440) and tried to connect it with MacBook pro 2017 but I'm struggling with the blurry text.
I tried to enable 1080p HiDPI on SwitchResX but it didn't work.
I spent the last 48hrs trying to a fix the problem but I couldn't :(
Is there any possible solution? Or should I return it and get a 4k display?
 
Last edited:
4095x1728 is near to the perfect 4096x1728 option. So try that. Decrease the width further if it doesn't work.
Thank you very much! Works very good!
 
Hello,

I recently bought BenQ EX3203r monitor (2560*1440) and tried to connect it with MacBook pro 2017 but I'm struggling with the blurry text.
I tried to enable 1080p HiDPI on SwitchResX but it didn't work.
I spent the last 48hrs trying to a fix the problem but I couldn't :(
Is there any possible solution? Or should I return it and get a 4k display?
Try creating a 3840x2162 scaled resolution. Then choose 1920x1081 HiDPI mode?
 
Status
Not open for further replies.
Back
Top