Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] HiDPI framebuffer fonts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 191
Location: Dallas, TX

PostPosted: Sun Jan 29, 2023 6:16 pm    Post subject: [Solved] HiDPI framebuffer fonts Reply with quote

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
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Sun Jan 29, 2023 7:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 191
Location: Dallas, TX

PostPosted: Mon Jan 30, 2023 1:53 am    Post subject: Reply with quote

turning on consolefont and using your suggested font was perfect. Many thanks for the info!
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1531

PostPosted: Mon Jan 30, 2023 9:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum