Re: configuring the console on 14-stable with hdmi-attached screen

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Fri, 25 Aug 2023 18:29:23 UTC
On Fri, 25 Aug 2023 10:04:01 -0600
Warner Losh <imp@bsdimp.com> wrote:

> On Fri, Aug 25, 2023 at 10:02 AM void <void@f-m.fm> wrote:
> 
> > In dmesg I see the following:
> >
> > VT(vga): resolution 640x480
> >    VT-x: Basic Features=0xda0400<SMM,INS/OUTS,TRUE>
> >    x86bios:  IVT 0x000000-0x0004ff at 0xfffff80000000000
> >    vtvga0: <VT VGA driver>
> >    VT(vga): resolution 640x480
> >      VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
> >      vtvga0: <VT VGA driver>
> >
> > How can I change the 640x480 to say 1920x1080 ?
> >
> 
> The only way I know is to use UEFI and control it that way...
> 
> Not sure how to do it with the BIOS boot.
> 
> Warner

How high the resolution would be depends on BIOS.
For me, the panel on the notebook is 4k, but UEFI BIOS reports 1024x768
at maximum.

With this in mind, one or more of the variables below
in /boot/loader.conf would work. Rewrite the value as you want AND the
BIOS reports available. vbe_max_resolution worked for my ThinkPad P52.
As I added them in this order one by one, kern.vt.fb.default_mode and
efi_max_resolution didn't work for me (even if I've set them to
1024x768. My previous notebook (already broken) worked with
kern.vt.fb.default_mode in conjunction with vesa.ko, IIRC.

Note that you would need specifying vt font size via screen.font
variable. Otherwise vt would use larger font automatically. I use 8x16.


## Console (vt) default mode
# kern.vt.fb.default_mode="1024*768"
kern.vt.fb.default_mode="1920*1080"

efi_max_resolution="2160p"
# efi_max_resolution="1600x900"	# Set the max resolution for EFI loader to use:
				# 480p, 720p, 1080p, 2160p/4k, 5k, or
				# specify WidthxHeight (e.g. 1920x1080)

vbe_max_resolution=1024x768


-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>