Make boot use High Resolution VGA Console



  • I'm hoping one of the gurus here can help (or at least give me some good hints).

    I normally interact with the shell over SSH, but there are times (during the boot process when ssh isn't available) when it would be convenient to have a higher resolution VGA console.

    Using vidcontrol in the shell, my hardware reports the following 2 high resoultion mode:

    MODE_282 - 1280 x 1024 x 16
    MODE_283 - 1280 x 1024 x 32

    Both seem to work, and at the shell I didn't notice any difference. I assume the (32) will use double the shared video memory.

    2 questions:

    1. Can I make a simple change to allow the boot process to use a higher resolution? If so, how?
    2. If so, should I use Mode 282 or 283.

    Additional Information
    Before performing an upgrade I built a stick and booted it just to make sure everything was working, and the characters were a lot smaller. I'm not sure what mode it used, but I think it may have been one of these
    higher resolution modes.

    dmesg - Boot
    vgapci0: <VGA-compatible display> port 0xf080-0xf087 mem 0xd0000000-0xd03fffff,0xc0000000-0xcfffffff irq 16 at device 2.0 on pci0
    vgapci0: Boot video device

    pciconf -lv
    vgapci0@pci0:0:2:0: class=0x030000 card=0x0f318086 chip=0x0f318086 rev=0x0e hdr=0x00
    vendor = 'Intel Corporation'
    device = 'Atom Processor Z36xxx/Z37xxx Series Graphics & Display'
    class = display
    subclass = VGA

    Thanks in advance for any help/suggestions


  • Netgate Administrator

    Try adding the following to /boot/loader.conf.local:

    i915kms_load="YES" 
    drm.i915.enable_unsupported=1
    

    It may detect the native resolution of your attached monitor with the driver loaded but if it doesn't you can try also adding:

    kern.vt.fb.default_mode="1024x768" 
    

    or whatever resolution you want there.

    You will need to be running >2.4.4 to load that driver.

    Steve



  • Thanks for the attempt Steve @stephenw10 - Unfortunately that was really nasty as the VGA disappeared completely and the router stopped functioning.

    @stephenw10 said in Make boot use High Resolution VGA Console:

    Try adding the following to /boot/loader.conf.local:

    i915kms_load="YES" 
    drm.i915.enable_unsupported=1
    

    It may detect the native resolution of your attached monitor with the driver loaded but if it doesn't you can try also adding:

    kern.vt.fb.default_mode="1024x768" 
    

    or whatever resolution you want there.

    You will need to be running >2.4.4 to load that driver.

    Steve

    Here is what I tried for /boot/loader.conf.local:

    /boot/loader.conf.local
    kern.cam.boot_delay=10000
    kern.vty=sc
    i915kms_load="YES"
    drm.i915.enable_unsupported=

    Fortunately I able to use a USB stick and get to the console and get the router working again.

    One thing that I can confirm is that the 2.4.4-RELEASE-p1 USB Installer does use a high resolution console, but when I do a normal upgrade I still have a crappy 80x25 console.

    I just mounted the USB stick and took a look at /boot/loader.conf and it didn't appear to be loading any modules. Here's what it looks like:

    /boot/loader.conf from USB
    kern.cam.boot_delay=10000
    autoboot_delay="3"
    kern.ipc.nmbclusters="1000000"
    kern.ipc.nmbjumbop="524288"
    kern.ipc.nmbjumbo9="524288"
    hw.usb.no_pf="1"

    The one thing I did notice is that the stick appears to be set up for EFI boot (but AFAIK my BIOS doesn't have EFI enabled).

    Any suggestions?


  • Rebel Alliance Developer Netgate

    If you have kern.vty=sc then you can't use the VT options that @stephenw10 posted.

    You could try this:

    kern.vty=sc
    hint.sc.0.flags="0x180"
    hint.sc.0.vesa_mode="283"
    

    Or you could mess around with vidcontrol like vidcontrol -f vgarom-thin-8x16



  • @jimp said in Make boot use High Resolution VGA Console:

    If you have kern.vty=sc then you can't use the VT options that @stephenw10 posted.

    You could try this:

    kern.vty=sc
    hint.sc.0.flags="0x180"
    hint.sc.0.vesa_mode="283"
    

    Thanks @jimp you are the man! That got it, the video mode switches very early into the boot process.

    I'm assuming that based on your answer that of the two modes 283 is the best choice.

    Or you could mess around with vidcontrol like vidcontrol -f vgarom-thin-8x16

    I looked at the man pages for vidcontrol, but it doesn't give me enough background to really understand the significance. Does this approach offer any advantages over the above suggestion?


  • Rebel Alliance Developer Netgate

    @guardian said in Make boot use High Resolution VGA Console:

    Thanks @jimp you are the man! That got it, the video mode switches very early into the boot process.

    I'm assuming that based on your answer that of the two modes 283 is the best choice.

    That's a matter of preference, use whichever one looks better for you.

    Or you could mess around with vidcontrol like vidcontrol -f vgarom-thin-8x16

    I looked at the man pages for vidcontrol, but it doesn't give me enough background to really understand the significance. Does this approach offer any advantages over the above suggestion?

    That will change the font size/spacing without changing the resolution.



  • @jimp said in Make boot use High Resolution VGA Console:

    @guardian said in Make boot use High Resolution VGA Console:

    Thanks @jimp you are the man! That got it, the video mode switches very early into the boot process.

    I'm assuming that based on your answer that of the two modes 283 is the best choice.

    That's a matter of preference, use whichever one looks better for you.

    Thanks @jimp - I can't really see any difference. I assume the difference is 16 vs 32 colors. Does pfSense make use of anything over 16 colors?

    Am I correct in assuming the difference is an extra 4 bits of video memory x the screen resolution ( 1280x1024x4/8=640K ) for 640K of memory?

    Or you could mess around with vidcontrol like vidcontrol -f vgarom-thin-8x16

    I looked at the man pages for vidcontrol, but it doesn't give me enough background to really understand the significance. Does this approach offer any advantages over the above suggestion?

    That will change the font size/spacing without changing the resolution.

    Where does this get applied? Sorry I'm clueless about the BSD boot sequence. Does this statement get added to some config file, or is it just applicable after boot is complete?


  • Rebel Alliance Developer Netgate

    @guardian said in Make boot use High Resolution VGA Console:

    Thanks @jimp - I can't really see any difference. I assume the difference is 16 vs 32 colors. Does pfSense make use of anything over 16 colors?

    The only console thing that uses colors is the prompt, and that's only a few. Doesn't really matter AFAIK.

    Am I correct in assuming the difference is an extra 4 bits of video memory x the screen resolution ( 1280x1024x4/8=640K ) for 640K of memory?

    Probably, not sure it matters in the grand scheme of things, since that is probably minuscule by compared to typically available video memory on systems.

    Where does this get applied? Sorry I'm clueless about the BSD boot sequence. Does this statement get added to some config file, or is it just applicable after boot is complete?

    That takes effect only when run manually. You would need run the full command in a boot-time script every boot, you could make your own and drop it in /usr/local/etc/rc.d/ if you like what it does.



  • @jimp I have Qotom J1900 4xLAN box with the following error

    netmap: loaded module
    module_register_init: MOD_LOAD (vesa, 0xffffffff81209800, 0) error 19
    random: registering fast source Intel Secure Key RNG
    

    I read in various freebsd threads and some on here, that after the 2.4.4 people couldn't boot with this hardware.

    The recommended workarounds, are to switch to sc or use i915 driver.
    The i915 driver causes a complete freeze of the system within LAN initialization, so that is not an option.
    I tried switching to sc and have seen conflicting statements re kern.vty=sc or "sc".
    I have tried both, and get the same results.

    boot up shows the EFI framebuffer info, address, dimension, stride, masks...then stops displaying.
    System boots and functions, but i loose RGB display.

    any ideas


  • Netgate Administrator

    Can you try booting legacy instead of UEFI? That has helped some systems.

    Steve



  • @stephenw10 yep, change to mbr and it is responding per the instructions. vesa error gone, with 1280 after initial boot pass


Log in to reply