Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Best approach to set console fonts with UEFI & HiDPI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Sat Jul 15, 2017 1:28 am    Post subject: Best approach to set console fonts with UEFI & HiDPI Reply with quote

Hi guys,

I've been reading far and wide about setting the framebuffer from boot to get readable init messages on my 4K UHDPI screen and think that I need to make sure I have the right FB kernel options built in and then pass a VGA command in the kernel boot line; or as a first step I could find the correct place to pass an environment/bash profile config to effectively
Code:
setfont setfont /usr/share/consolefonts/latarcyrheb-sun32.psfu.gz
(which seems to work great) - I have emerged the Terminus fonts and they work well too - but that 32 seems to be the best.

I've been searching through various resources via https://duckduckgo.com/?q=hidpi+console+font+size&t=ffab&atb=v71-3&ia=web etc...

I've tried some of the Gentoo threads and wiki pages but can't get things to work - I keep falling back to typing setfont
_________________
]8P
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Sat Jul 15, 2017 4:30 am    Post subject: Reply with quote

Going to see if this helps next time I reboot. I start my kde session with startx so it will help from login anyway even if the init script text is still small.
Code:
xps15 /home/will # cat /etc/conf.d/consolefont
# The consolefont service is not activated by default. If you need to
# use it, you should run "rc-update add consolefont boot" as root.
#
# consolefont specifies the default font that you'd like Linux to use on the
# console.  You can find a good selection of fonts in /usr/share/consolefonts;
# you shouldn't specify the trailing ".psf.gz", just the font name below.
# To use the default console font, comment out the CONSOLEFONT setting below.
#consolefont="default8x16"
consolefont="ter-v32n"
# consoletranslation is the charset map file to use.  Leave commented to use
# the default one.  Have a look in /usr/share/consoletrans for a selection of
# map files you can use.
#consoletranslation="8859-1_to_uni"

# unicodemap is the unicode map file to use. Leave commented to use the
# default one. Have a look in /usr/share/unimaps for a selection of map files
# you can use.
#unicodemap="iso01"
xps15 /home/will # rc-update add consolefont boot
 * service consolefont added to runlevel boot
xps15 /home/will # rc-service consolefont start
 * Executing: /lib64/rc/sh/openrc-run.sh /lib64/rc/sh/openrc-run.sh /etc/init.d/consolefont start
 * Setting console font [ter-v32n] ...                                       [ ok ]
xps15 /home/will #

_________________
]8P
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Sat Jul 15, 2017 7:13 am    Post subject: Reply with quote

Try dmesg | grep -i console. It should tell you something about "dummy device" and "frame buffer device".
Does it? Settings are in make menuconfig near to CONFIG_FRAMEBUFFER_CONSOLE.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Sat Jul 15, 2017 7:59 am    Post subject: Reply with quote

Code:
xps15 /etc/wpa_supplicant # dmesg | grep -i console
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled
[    1.936323] Console: switching to colour frame buffer device 480x135
[    1.954423] Console: switching to colour dummy device 80x25
[    1.954556] [drm] Replacing VGA console driver
[    3.146909] Console: switching to colour frame buffer device 480x135
[    3.178491] console [netcon0] enabled
[    3.178504] netconsole: network logging started

_________________
]8P
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Sat Jul 15, 2017 9:23 am    Post subject: Reply with quote

Edit:

Those values seem to be ok for an external >27" monitor.

What if booting ( with lid closed ! ) with a low-resolution external screen attached? You should get different values then.


Last edited by charles17 on Sat Jul 15, 2017 10:20 am; edited 3 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sat Jul 15, 2017 9:34 am    Post subject: Reply with quote

stardotstar,

Pastebin the entire dmesg, so we can see which framebuffer driver you are using.
It may switch several times during the boot process.

You really mean console fonts here, as in before your GUI starts or when you use Ctl-Alt-Fn to switch back to the console?.
Terminal emulaters running inside your GUI have their own settnigs.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Sat Jul 15, 2017 11:33 am    Post subject: Reply with quote

Thanks guys,
yes I really mean the console.
it is my desire to boot the system to a console and then startx.
Now the current configuration whereby the font has been specified actually works really well -even for the boot messages - very readable now wth consolefont added to boot run level.

Here is the pastbin of my dmesg:

https://paste.pound-python.org/show/Toea9ZqNiDGmpmLG5QdL/
_________________
]8P
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sat Jul 15, 2017 2:07 pm    Post subject: Reply with quote

stardotstar,

For the first two seconds, until
Code:
[    1.928074] Console: switching to colour frame buffer device 480x135
the kernel uses the 80x25 character display.
You don't have any control over that, except to turn it off.

Then it switches to the efifb but only for about 50ms before it switches to
Code:
[    1.946186] fb: switching to inteldrmfb from EFI VGA


You can either add some parameters to the kernel command line, to not use your 4k display in its native resolution,
Code:
video=inteldrmfb:mtrr,ywrap,1024x768-32@60

That's 1024x768, 24 bit colour (yes it says 32) and 60Hz refresh rate. You will probably want to change the 1024x768 part.

Or you can use /etc/conf.d/consolefont to set a font of your choosing.
Read the comments in the file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Sun Jul 16, 2017 3:40 am    Post subject: Reply with quote

thank you NeddySeagoon, coonsolefont is woking well i will experiment with the kernel command line
_________________
]8P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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