Menu

rEFInd not recognizing my 4k monitor as HiDPI

Steve
2020-11-23
2020-11-29
1 2 > >> (Page 1 of 2)
  • Steve

    Steve - 2020-11-23

    I just started using rEFInd. Its awesome. but one question, it does not seem to to want to scale my 4k monitor in HiDPI mode as it should. I ran it in DEBUG mode and saw the following messages:

     15:582   0:057  Set Screen Resolution:
     15:671   0:088    - BestMode: GOP Mode[0] @ 3840x2160
     18:281   2:610    - Switch to GOP Mode[0] ...Success
     18:312   0:030  Screen Resolution Set
    
     18:342   0:029  INFO: Implemented Graphics Output Protocol
    
     18:390   0:048  INFO: Implement Text Renderer ...Success
    
     18:420   0:029  Setup Screen...
     18:450   0:029  Prepare for Graphics Mode Switch:
     18:478   0:028    - HiDPI Not Detected ...Maintain Icon Scale
    

    It is correctly identifying my monitor 4k 16:9 resolution. But then later says "HiDPI Not Detected". Is this a bug in rEFInd, or is there some configuration I need to try to get it to detect my monitor and scale it HiDPI? Without HIDPI, I can barely read the fonts.

    Machine specs: MacPro 5,1 with latest firmware, RX580

     

    Last edit: Steve 2020-11-23
  • dakanji

    dakanji - 2020-11-25

    Just for background, rEFInd does not have a DEBUG mode and does not produce a log. This is currently only available in RefindPlus, a modified version of rEFInd, which is what you are actually using.

    You have been advised of the two tools being different on a different channel if you recollect and if you revisit that channel, you will notice the tool is always described as "RefindPlus" and not "rEFInd".

    Key differences between the two tools (additions to rEFInd in RefindPlus) are listed here: https://github.com/dakanji/RefindPlus#headline-features. You will note it adds a debug mode with logging as well as enables Pre-Boot Configuration Screen AKA bootscreen on "Semi Compatible" GPUs such as your RX580.

    I don't know the reason for this issue, but just clearing this confusion up for you as the rEFInd developer might be confused by your log and statement about DEBUG mode.

    I do know however, that the details of this HiDPI detection have not being changed in RefindPlus from rEFInd in the version of RefindPlus you are running which I believe is 0.12.0.L.

     

    Last edit: dakanji 2020-11-25
  • Steve

    Steve - 2020-11-25

    Thanks for clarifying Dayo!

     
  • joevt

    joevt - 2020-11-25

    You can go to https://github.com/dakanji , search for "HiDPI Not Detected" in the repository, and see why that message happens.

    I think the debug log needs to tell us what it thinks ScreenW is. Basically, need to track changes to egScreenWidth to see when it gets assigned someting other than the expected 3840.

    It looks like there will be a new option added to refind.conf file for RefindPlus that will allow you to force HiDPI resizing: force_hidpi true. You'll have to wait for the next release or try building it yourself.

     
    • dakanji

      dakanji - 2020-11-25

      You can go to https://github.com/dakanji , search for "HiDPI Not Detected" in the repository, and see why that message happens.

      Message happens because the detected "screen width" is less than 1921px

      I think the debug log needs to tell us what it thinks ScreenW is. Basically, need to track changes to egScreenWidth to see when it gets assigned something other than the expected 3840.

      Log can add the detected dimension indeed

       

      Last edit: dakanji 2020-11-25
  • Steve

    Steve - 2020-11-25

    Thanks for that info. i will try to build it. Do you know if the GOPFix tag has the fix for force_hidpi, or should I build from master HEAD?

     
    • joevt

      joevt - 2020-11-25

      GOPFix hsa force_hidpi but master does not.

       
  • Steve

    Steve - 2020-11-25

    Actually it looks to me that it was released 22 days ago, v 0.12.0.L

    which includes the following commit:

    https://github.com/dakanji/RefindPlus/commit/93c9aaeb0926026cfc92d397f73c7f9f71fa3e52

    The release has a binary...I should talk to Dayo first, but seems like that might be worth a try..

     
    • joevt

      joevt - 2020-11-25

      The source code in the zip that goes with the release binary doesn't have force_hidpi
      Check the file refind.conf-sample

       
  • Steve

    Steve - 2020-11-25

    yea my mistake I was looking at the 33 commits SINCE v12. So..next release will have it.

    I'll try to build this from the GOPFix tag tomorrow.

     
  • dakanji

    dakanji - 2020-11-25

    Yes, I had the force_hidpi partially completed on the back burner and pushed it in recently. Not sure if it will resolve this issue but it might. Even if it does, it will just be a workaround to the real issue which needs resolving.

     
  • dakanji

    dakanji - 2020-11-25

    OK ... Took a closer look at the code and the issue is a RefindPlus issue.
    Will resolve there presently

     
  • dakanji

    dakanji - 2020-11-25

    OK ... Got a fix but don't like the outcome with giant icons on my screen and need to find a way to disable HiDPI as I prefer the smaller ones.

    ForceHiDPI will not work to resolve this in the current code base btw. So you can save yourself the trouble of building for now.

     
    👍
    1
    • joevt

      joevt - 2020-11-25

      maybe the option should be hidpi = true|false|# where # is a screen resolution width where you want HiDPI to be on, such as 1921 or 3840 (but probably 2561 should be the number used - for people that have 1440p displays or like my Apple 30" Cinema display. But it should be adjustable. Wide screen displays are not HiDPI so people may want to use 5121 for those. Thinking about that, maybe # should be a height - so it will work for both wide screen and non-wide screen displays (there aren't any portrait displays or there aren't any HiDPI portrait displays probably).

       
      • dakanji

        dakanji - 2020-11-25

        2561 seems a good number to go for instead of 1921.

         
        • joevt

          joevt - 2020-11-26

          I think you need to go with height comparison to handle wide screen displays (if the EFI drivers can do wide screen but it will work for non-wide screen). Therefore, 1601 is the number I would use (except laptop machines have low res hidpi displays of 2560x1600 - so people will have to pick a number for themselves anyway so this discussion of a default value may be moot).

           
          • dakanji

            dakanji - 2020-11-26

            Thanks but going with 2561 for now in RefindPlus.
            Will revisit later. Probably if/when rEFInd makes changes.

             
          • joevt

            joevt - 2020-11-26

            If you can get at the EDID then you can get the display size which can be used to get the ppi then that could be used to determine HiDPI.

             
            • dakanji

              dakanji - 2020-11-26

              Could be that using the height as the benchmark might be better indeed.
              Would discuss with you on our other channel.

               
    • Steve

      Steve - 2020-11-25

      Thanks for looking into it. Will look forward to seeing that new binary.

      Most likely I won't love icons that are 4x the size of existing ones either...but still better then what I see now too tiny.

      I don't know if its possible to use HiDPI mode while also setting the resolution to a value larger then your actual display. Might depend on the GPU...but maybe that is a way to scale it down less than full Retina mode.

      In OSX, I generally have my monitor running at 75% of full resolution, but in HiDPI mode. That works out to be "normal" sized fonts and so forth on a 32" display and looks pretty good, not quite as good as full Retina mode...but good enough and about the right size. That is 2880x1620hidpi.

      I know that internally, that only works because the GPU can support it, for one thing, and what OSX does is to think of it as a 5760x3240 internal canvas, and then the video card scales that back down to HiDPI. I think?

      Anyway I have no idea of GOP or semi-GOP can even do that kidn of stuff outside of OSX/Windows...but anyway it might be worth a try to turn on hidpi and also set the resolution in the config to a larger size...which maybe could result in 75% or 60% scaling instead of 50%

      or something along those lines...

       

      Last edit: Steve 2020-11-25
      • joevt

        joevt - 2020-11-26

        I've never seen GOP do any scaling - all the scaling is done by the display during EFI. There's no function in GOP to setup a frame buffer that differs from the output resolution.

        One interesting thing I've found recently is that GOP can do dual DisplayPort SST for 5K to my Dell UP2715K from Nvidia Titan X (Maxwell) on my Z170X Gaming 7 motherboard with CSM disabled, and prefered GPU set to iGPU (but no display connected to iGPU). I should try to figure out how that works - if the iGPU driver is involved somehow to create a meta GOP of two 2560x2880 connections into one 5120x2880 framebuffer.

         
        • Steve

          Steve - 2020-11-26

          I've never seen GOP do any scaling - all the scaling is done by the display during EFI. There's no function in GOP to setup a frame buffer that differs from the output resolution.

          otherwise known as "scaling"

          How does Refind accomplish hidpi rendering and scaling?

           
          • joevt

            joevt - 2020-11-26

            HiDPI is not a special hardware mode. Things are just drawn in rectangles that are twice as wide and tall as non-HiDPI. rEFInd has drawing functions to scale bitmaps into any size rectangle.

            Most of the icons in rEFInd are png files with size 128x128 (os icons). Some are 48x48 (tool icons). Some are 32x32 (badge icons). You can use a tool icon as an os icon (using a manual stanza) and rEFInd will scale it up. Probably same is true for badge icons. Some tool icons are larger than 48x48 but are scaled to the same size as the other tool icons.

            The refind.conf file has settings to change the icon size already so you don't need a hidpi setting to icons drawn larger or smaller than usual

            small_icon_size 96
            big_icon_size 256
            

            To change the font size, I suppose you could just scale the font png file (make it an integer multiple of 96 in width because that's how many characters the font picture should have and the characters need to be mono spaced).

             
            • Steve

              Steve - 2020-11-26

              HiDPI is not a special hardware mode. Things are just drawn in rectangles that are twice as wide and tall as non-HiDPI. rEFInd has drawing functions to scale bitmaps into any size rectangle.

              Alright. In my view, what you just described is not "HiDPI" or anything remotely related to "HiDPI", it is simply "Scaling". Which is totally fine and makes more sense to me that it would work that way, but its not "HiDPI".

              Now that I understand that ReFind uses some kind of simple scaling. the question is what does it do when it detects my 4k display at 3840x2160? It sounds like it determines that my display is larger then 1920, so it does NOT need to be scaled with larger rectangles (ie, scaled down). Unfortunately that does result in everything being too small, but very crisp, since all the rectangles are not being drawn larger (ie scaled).

              I have tried changing the "resolution" setting in refind.conf to 2560x1440, that resulted in moving the icons towards the top left corner, but nothing got bigger. Weird. I will try changing resolution to 1920 x 1080 to see if that some how causes reFind to scale it after all.

              I also saw some stuff last night to use EFI shell to run a command to find out the GOP modes on my system, in order to specify one of those. But the question is what will cause rEFInd to double the size of the rectangles..I think it will happen only if it detects the display is 1920 or smaller?

              I don't really care about the icon sizes...its the font sizes that are problem.

               
              • Steve

                Steve - 2020-11-26

                changing resolution to 1920 in refind.conf also didn't solve the issue, it also moved the icons up torwards the top left corner without resizing them. Maybe I need to specify 1919, hehe. not sure at this point..

                 
1 2 > >> (Page 1 of 2)

Log in to post a comment.