'gop set <mode>' being ignored in /boot/loader.conf

Hi, FreeBSD newbie here, coming from Debian so I'm not too terribly in the dark.

So, I've been trying to figure out how to change my display resolution to native. In the UEFI loader, I can cancel out to the OK prompt and type 'gop set 4' to change it to the proper resolution. Of course this works perfectly, but the problem is that trying to do that automatically: even with exec="gop set 4" in /boot/loader.conf and /boot/loader.conf.local, the loader seems to just want to stay on 1024x768! After a few restarts, I started to notice that it would seem to go to native resolution, just long enough for a couple lines that says "OK" in a nice, crisp font, before the full loader comes up in all its blurry glory. Could it be some other setting overriding the just set mode?

Here's my /boot/loader.conf
Code:
security.bsd.allow_destructive_dtrace=0
opensolaris_load="YES"
zfs_load="YES"
zfs_load=YES
nvidia_load="YES"
exec="gop set 4"
And here's /boot/loader.conf.local
Code:
kern.vty = vt
hw.vga.textmode = 0
efi_max_resolution="1680x1050"
kern.vt.fb.default_mode="1680x1050"
exec="gop set 4"
 
Dear churipputori,
welcome to FreeBSD! Please try to add the line gop set 4 to /boot/loader.rc.local. At the time when I have had to use this command the file has not been existing by default. I have had created the file with just that single line.
 
Thank you! Sadly, putting exactly gop set 4 into /boot/loader.rc.local didn't seem to make much of a difference at all.
 
Commands in the ok prompt only apply to the loader and not the whole system which comes behind it. When in doubt of what you can use in a system file such as loader.conf then simply take a look at its default system version: /boot/defaults/loader.conf.

So, solution for this issue: vt(4), configure the console driver and tell it to use a higher resolution, you will find examples in the manpage I just referred to.
 
Since you're using UEFI, you may also have a look at efi_max_resolution, which is documented in loader.conf(5). I had to use this when booting because I have a 1080p display that would be detected, which made my console font difficult to read. While I could have used the largest console font available on a fresh install (Terminus BSD Console, size 32), I chose to limit the resolution to 1024x768 instead.

That setting is only for the EFI framebuffer, so if you load a different display driver during startup in rc.conf(5) (e.g. i915kms), then you'll instead be relying on settings like kern.vt.fb.default_mode documented in vt(4). I'm not sure why my system's EFI framebuffer didn't respect kern.vt.fb.default_mode (or maybe it did, but it switched too late? I didn't document my work…), but efi_max_resolution fixed my issue with the framebuffer resolution changing at startup time.
 
Back
Top