View previous topic :: View next topic |
Author |
Message |
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 191 Location: Dallas, TX
|
Posted: Sun Jan 29, 2023 6:16 pm Post subject: [Solved] HiDPI framebuffer fonts |
|
|
I know I could force down the screen resolution in /etc/default/grub, but am curious as to whether someone can explain this one to me:
I have a laptop that has a 3000x2000 display.
If I boot off a liveCD (IE when initially installing gentoo), the framebuffer that loads is the efifb. According to the contents of /sys/class/graphics/fb0/modes, its running at 3000x2000. I can read the screen clearly though. The font is large enough for me to be able to see it fine without a magnifying class.
Fast forward to when I've completed my install and built my own kernel. After booting into the new kernel I get this instead:
1) The running framebuffer is now i915drmfb instead of efifb (not necessarily a problem)
2) the modes file still indicates a 3000x2000 displat
3) The fonts on the screen are microscopic. I can barely read them.
What's configured/installed in the liveCD that I'm not configuring or installing on mine that's causing the difference? Would really love to solve this without forcing the machine all the way down to a 1024x768 framebuffer display.
Last edited by JumboAg on Mon Jan 30, 2023 1:52 am; edited 1 time in total |
|
Back to top |
|
|
dbtx Tux's lil' helper
Joined: 20 Jan 2020 Posts: 117
|
Posted: Sun Jan 29, 2023 7:24 pm Post subject: |
|
|
In 1080p native here, a 16x32 font gives 120 columns and 33 lines. You would get something around 180x60. This kernel has "Terminus 16x32 font (not supported by all drivers)" (CONFIG_FONT_TER16x32=y) under "Library routines" with "Select compiled-in fonts" enabled, but no other optional fonts, so it's always using that. I also merged media-fonts/terminus-font with USE=psf and set Code: | consolefont="ter-v16b" | in /etc/conf.d/consolefont, while consolefont is left out of all runlevels and so not used unless I occasionally want to double the columns and lines in text mode on this 27" screen. You might try the same but with Code: | consolefont="ter-v32b" | which is the same as the in-kernel one (mostly if not exactly), or whatever you like. HTH _________________ quasi-religious systemic wrongism pessimizes indiscriminately |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 191 Location: Dallas, TX
|
Posted: Mon Jan 30, 2023 1:53 am Post subject: |
|
|
turning on consolefont and using your suggested font was perfect. Many thanks for the info! |
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1531
|
Posted: Mon Jan 30, 2023 9:12 am Post subject: |
|
|
Interesting. I have a 2560x1600 display and remember having microscopic fonts back when I setup my laptop and played a lot with the fb drivers. After a while I settled that part of the kernel configuration and I don't have problems with fonts. I haven't emerge terminus fonts, nor I have a consolefont file in /etc/conf.d. Currently my system loads amdgpudrmfb but when I set the graphics in discrete mode (nvidia) it loads efifb and I don't see a difference in fonts. In both cases the resolution is the same.
The only difference in both cases is the result of cat /sys/class/graphics/fb0/modes prints U:2560x1600p-0 with amdgpudrmfb and the 0 after the dash is a double digit number in discrete mode, which I don't remember what it is.
I think what caused microscopic fonts might have been either CONFIG_SYSFB_SIMPLEFB=y, CONFIG_DRM_SIMPLEDRM=m or CONFIG_FB_SIMPLE=y or some combination of them. Currently they are all disabled.
I also have the screen resolution set in /etc/default/grub which should matter only when I test new kernels since most of the time I use efi-stub boot loader, but I don't see a difference between the two either.
In the kernel configuration I have
Code: | [*] Select compiled-in fonts
[*] VGA 8x16 font
[*] Terminus 16x32 font (not supported by all drivers) |
I think you should still be able to run efifb by selecting CONFIG_SYSFB_SIMPLEFB=y and CONFIG_FB_EFIFB=y in the kernel configuration.
Best Regards,
Georgi |
|
Back to top |
|
|
|