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:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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
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
Thanks for clarifying Dayo!
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
ScreenWis. Basically, need to track changes toegScreenWidthto 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.Message happens because the detected "screen width" is less than 1921px
Log can add the detected dimension indeed
Last edit: dakanji 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?
GOPFix hsa force_hidpi but master does not.
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..
The source code in the zip that goes with the release binary doesn't have
force_hidpiCheck the file
refind.conf-sampleyea 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.
Yes, I had the
force_hidpipartially 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.OK ... Took a closer look at the code and the issue is a RefindPlus issue.
Will resolve there presently
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.
ForceHiDPIwill not work to resolve this in the current code base btw. So you can save yourself the trouble of building for now.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).2561 seems a good number to go for instead of 1921.
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).
Thanks but going with 2561 for now in RefindPlus.
Will revisit later. Probably if/when rEFInd makes changes.
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.
Could be that using the height as the benchmark might be better indeed.
Would discuss with you on our other channel.
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
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.
otherwise known as "scaling"
How does Refind accomplish hidpi rendering and scaling?
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
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).
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.
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..