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



## churipputori (Nov 20, 2020)

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

```
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

```
kern.vty = vt
hw.vga.textmode = 0
efi_max_resolution="1680x1050"
kern.vt.fb.default_mode="1680x1050"
exec="gop set 4"
```


----------



## chrbr (Nov 20, 2020)

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.


----------



## churipputori (Nov 21, 2020)

Thank you! Sadly, putting exactly `gop set 4` into /boot/loader.rc.local didn't seem to make much of a difference at all.


----------



## ShelLuser (Nov 22, 2020)

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.


----------



## memreflect (Nov 22, 2020)

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.


----------

