/boot/loader.conf ignores efifb mode setting

Hi,

I am running FreeBSD 12.1-RELEASE. Since my Intel graphics card (UHD 630) does not seem to be currently supported, I am happy to use efifb and the scfb Xorg-driver. All fine.

The only thing that bothers me is the default resolution (800x600) that is selected by the VT driver (or bootloader, I don't know).

The following works and mitigates the problem:
  • When starting up, get into the bootloader prompt by pressing Escape.
  • Select a video mode by doing mode <number>, for example mode 3 for 1920x1080, which is just right.
  • Typing boot to boot the system, using exactly that mode.
Now I would like to make this mode selection (e.g. mode 3) permanent.

I tried adding mode 3 to /boot/loader.conf and /boot/loader.conf.local, but it did not have any effect. The bootloader seems to ignore this entry!

How can I change permanently the efifb video mode resolution?

Thanks!

Update: Also tried putting mode 3 in /boot/loader.rc and /boot/loader.rc.local as proposed here:

But didn't work. Mode-entry still seems to be ignored.
 
Last edited:
It would be nice if you figure out how to have the boot menu on a efi_max_resolution="480p" but then make the system switch to full resolution. The boot menu in full resolution on HiRes screens can be very small and unreadable. Should you manage to do that, please post here.
 
The boot menu in full resolution on HiRes screens can be very small and unreadable.
Like in this Thread 68435 ?

In this Asrock forum enabling/disabling the CSM (Compatility Support Module), and here on tom's hardware, has an effect on the screen resolution. Also check the UEFI if it has any dedicated screen resolution settings. Those are not widely spread, most likely absent on your system, but it doesn't hurt to check.

Here are other UEFI settings to try for setting the screen resolution.
 
Have you tried graphics/drm-fbsd12.0-kmod ? There is an older forum Thread 60159, where a user is claiming having it working (with 12-CURRENT at the time). graphics/drm-next-kmod has been moved to graphics/drm-fbsd12.0-kmod.

Thanks for the suggestion. Tried it, but no effect: module gets loaded but no mode change, no "drm" messages on boot, nothing.

In the thread you are referring to the GPU is a Intel HD Graphics 630. Mine is UHD Graphics 630. Not sure how big the difference is, though.
 
This looks strange. I'm booting UEFI method, with efi_max_resolution="480p" in /boot/loader.conf the boot menu is as large I want it to be, and the system switches to maximum high resolution later by default (hw.vga.textmode=0 by default).

You can try kern.vt.fb.default_mode or kern.vt.fb.modes.connector_name in loader.conf(5). Grep the connector names from dmesg(8). RTFM vt(4).
 
...
You can try kern.vt.fb.default_mode or kern.vt.fb.modes.connector_name in loader.conf(5). Grep the connector names from dmesg(8). RTFM vt(4).

Tried it. No effect.

As I mentioned in the original post, setting mode 3 manually in the bootloader prompt works. It's just that the bootloader seemingly ignores the contents of /boot/loader.rc.local. Could it be that the file is not accessible during boot time (I am running ZFS if that should matter)?
 
AFAIK the chain of console framebuffer mode control is UEFI->efiboot->loader (boot menu, kernel messages)->vt takes over (hw.vga.textmode)->init (rc.conf:kld_list="/boot/modules/i915kms.ko").
The correct names of the relevant files are /boot/loader.conf and /boot/loader.conf.local.
 
Does the command gop list at the loader prompt return a list?

As I mentioned in the original post, setting mode 3 manually in the bootloader prompt works. It's just that the bootloader seemingly ignores the contents of /boot/loader.rc.local.
Try: /boot/loader.conf
Code:
exec="mode 3"
 
I'm currently stuck with the same problem on a new Intel rocket lake desktop system.

The GPU isn't yet supported by i915kms (UHD 750) and using vt and scfb for Xorg just ignores any resolution I'm trying to set.
The only thing that works is hitting '3' at the loader, forcing the resolution to the native one (2560x1440) via 'set gop 0' and then 'boot'.

I've already tried in /boot/loader.conf:
exec="gop set 0"
exec="mode 0"
kern.vt.fb.default_mode="2560x1440"
efi_max_resolution="2560x1440"

All of them seem to be completely ignored, as vt _always_ boots with 1024x786
Xorg afterwards always picks up the vt resolution. When trying to set a higher resolution via xorg.conf.d/scfb.conf X fails with "no screens found" - so I am stuck with 1024x786 in Xorg unless I've manually forced the mode before boot.

The system is booted in EFI mode:
Code:
# sysctl machdep.bootmethod
machdep.bootmethod: UEFI

This behaviour is consistent on 12.2-RELEASE and 13.0-RELEASE, with the exception that the loader menu with 13.0-RELEASE is completely botched (i.e. instead of lines there are various symbols drawn).
 
13.0-RELEASE is completely botched (i.e. instead of lines there are various symbols drawn).
This is because you didn't update the efi loader. You'd better to update it.

There is someting to set the boot resolution, at least for the 13.0-RELEASE, but I don't have any of my machines on the hand. I will tell you tonight if someone doesn't answer in the meantime.
 
It was simply efi_max_resolution. Note the typo in your command.
It should work even with an old efi loader, I think.
 
Back
Top