25.04.1 Boot Console Screen Resolution

Greetings all,

I recently upgraded one of my TrueNAS systems from CORE (13.0-U6.7) to SCALE (25.04.1 Fangtooth.)

No issues encountered during the upgrade process. (Thanks iX developers!)

However, after completing the upgrade/install, I noticed that during the SCALE boot up sequence (which appears to be occurring post GRUB execution after the handoff to the linux O/S) that the boot console screen display resolution switches over to a much higher display resolution than it was originally when I was on CORE. Once there, it stays on this higher resolution output for the remainder of the start up sequence.

The increased boot console screen display resolution is causing an issue with my console display monitor (…which expects a lower resolution output for the console screen.)

Consequently, is there a way to tell Fangtooth to reduce the console display screen output resolution so it will be at the same resolution that it was in CORE?

All the best,
Bill

I don’t use SCALE so this is merely a suggestion. Update your grub with one of the following vga= options.

Color Depth 800x600 1024x768 1152x864 1280x1024 1600x1200
8 bit vga=771 vga=773 vga=353 vga=775 vga=796
16 bit vga=788 vga=791 vga=355 vga=794 vga=798
24 bit vga=789 vga=792 vga=795 vga=799

Note that system updates will most likely overwrite any changes to the grub.cfg file. I see someone has devised a workaround which may work for you…

Thanks for the suggestion @MikeO3. I’ll give that a try and see if it resolves my issue. I use a rack mounted display console here for my TrueNAS CLI, so replacing it would be an expensive option.

All the best,
Bill

Well… @MikeO3 's previous suggestion seemed likely to solve my issue. So I
found the original ā€œ/etc/default/grub.d/truenas.cfgā€ file as follows:

GRUB_DISTRIBUTOR=ā€œTrueNAS Scaleā€
GRUB_TIMEOUT=10
GRUB_DISABLE_RECOVERY=ā€œtrueā€
GRUB_CMDLINE_LINUX_DEFAULT=ā€œlibata.allow_tpm=1 amd_iommu=on iommu=pt kvm_amd.npt=1 kvm_amd.avic=1 intel_iommu=on zfsforce=1 nvme_core.multipath=Nā€
GRUB_TERMINAL_INPUT=ā€œconsoleā€
GRUB_TERMINAL_OUTPUT=ā€œconsoleā€
GRUB_CMDLINE_LINUX=ā€œā€

I remounted ā€œboot-pool/ROOT/25.04.1/usrā€ as rw and edited ā€œ/usr/local/bin/truenas-grub.pyā€ to add the following directives to the "config = " portion of the script:

    'GRUB_GFXMODE=1024x768',
    'GRUB_GFXPAYLOAD_LINUX="keep" ',

After saving truenas-grub.py and a reboot I found ā€œ/etc/default/grub.d/truenas.cfgā€ had added the additional directives as follows:

GRUB_DISTRIBUTOR=ā€œTrueNAS Scaleā€
GRUB_TIMEOUT=10
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=ā€œkeepā€
GRUB_DISABLE_RECOVERY=ā€œtrueā€
GRUB_CMDLINE_LINUX_DEFAULT=ā€œlibata.allow_tpm=1 amd_iommu=on iommu=pt kvm_amd.npt=1 kvm_amd.avic=1 intel_iommu=on zfsforce=1 nvme_core.multipath=Nā€
GRUB_TERMINAL_INPUT=ā€œconsoleā€
GRUB_TERMINAL_OUTPUT=ā€œconsoleā€
GRUB_CMDLINE_LINUX=ā€œā€

Looked good, so I then remounted the boot-pool as rw and ran ā€œupdate-grubā€ to update grub boot loader… Rebooted again with high hopes and… no joy. I’ll have to investigate further to see where I’m going off the rails. :frowning: <grrr…>

All the best,
Bill

1 Like

Ok here’s the addendum to the ā€˜set console display resolution’ investigation:

First, I found that ā€˜GRUB_TERMINAL_OUTPUT=ā€œconsoleā€ā€™ needed to be set as ā€˜GRUB_TERMINAL_OUTPUT=ā€œgfxtermā€ā€™ to allow the grub GFX setups to have effect.

Afterwards… still ā€˜no cigar’ on getting the linux kernel to recognize the grub GFX settings as directed.

So I next spent some time looking through the framebuffer docs and kernel command line parameters at www.kernel.org. I found on [The kernel’s command-line parameters — The Linux Kernel documentation] that there is a [video=] switch available on every linux machine with a FrameBuffer. The config parameters are documented on [https://www.kernel.org/doc/Documentation/fb/modedb.rst].

I then added the [video=1024x768@60me] switch to the default linux cmd line in the truenas-grub.py script and that solved the kernel issue.

The script generated truenas.cfg file in /etc/default/grub.d/ is now:

GRUB_DISTRIBUTOR=ā€œTrueNAS Scaleā€
GRUB_TIMEOUT=10
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=ā€œkeepā€
GRUB_DISABLE_RECOVERY=ā€œtrueā€
GRUB_CMDLINE_LINUX_DEFAULT=ā€œlibata.allow_tpm=1 amd_iommu=on iommu=pt kvm_amd.npt=1 kvm_amd.avic=1 intel_iommu=on zfsforce=1 nvme_core.multipath=N video=1024x768@60meā€
GRUB_TERMINAL_INPUT=ā€œconsoleā€
GRUB_TERMINAL_OUTPUT=ā€œgfxtermā€
GRUB_CMDLINE_LINUX=ā€œā€

I then did an ā€œupdate-grubā€ to activate the changes in grub and we’re now in business.

I still need to rewrite the ā€˜advanced serial console’ portion of the truenas-grub.py script so that the serial portion runs correctly in ā€œconsoleā€ mode rather than ā€œgfxtermā€ mode when serial output is selected (…though I don’t use a serial console here.) It would be nice to be able to input the console resolution parameters in the web UI and have it propagate over to the low level system. (Perhaps a feature request is up coming?) :slight_smile:

I’m still not sure why the GRUB2 parameters devoted to this purpose (i.e.: GRUB_GFXMODE and GRUB_GFXPAYLOAD_LINUX) aren’t passing gfx cfgs over to the kernel. However, it all works now and my console monitor is running at the correct screen resolution.

All the best,
Bill