# Kernel Boot Resolution?



## rytz (Sep 9, 2015)

Greetings:

Running FreeBSD 10.2 base install.

My resolution is changing correctly once I hit the user login prompt by setting vesa_load and allscreens_flags accordingly.

However, I haven't found a way to change the resolution for the kernel boot text (before the login prompt).  Is there a config option for this or do I have to rebuild the kernel with a different video setting?

Thanks!


----------



## pkubaj (Sep 9, 2015)

rytz said:


> Greetings:
> 
> Running FreeBSD 10.2 base install.
> 
> ...


I believe it's not possible, unless you boot using UEFI mode, then the native resolution is used instead.


----------



## rytz (Sep 9, 2015)

Thanks for the response.  I am running in Legacy mode.  Sounds like it's hardcoded into the kernel somewhere then.


----------



## freethread (Sep 11, 2015)

Up to version 9.x (not tested on 10.x and onward) you can enable the screen saver and set an image (screen saver image) with one of the resolution you see with command `vidcontrol -i mode`, but I tested on one real machine and if I remember the maximum resolution (for that graphics card or the VESA kernel module) was 1024x768 (subsequent screen was set to 1280x1024).

All the settings go in rc.conf and /boot/loader.conf, look at /etc/defaults/rc.conf and /boot/defaults/loader.conf file for an explanation of the setings, they are grouped by category, and keep in mind the files /etc/defaults/rc.conf and /boot/defaults/loader.conf are READONLY (they aren't but they are).


----------



## rytz (Sep 11, 2015)

freethread said:


> Up to version 9.x (not tested on 10.x and onward) you can enable the screen saver and set an image (screen saver image) with one of the resolution you see with command `vidcontrol -i mode`, but I tested on one real machine and if I remember the maximum resolution (for that graphics card or the VESA kernel module) was 1024x768 (subsequent screen was set to 1280x1024).
> 
> All the settings go in rc.conf and /boot/loader.conf, look at /etc/defaults/rc.conf and /boot/defaults/loader.conf file for an explanation of the setings, they are grouped by category, and keep in mind the files /etc/defaults/rc.conf and /boot/defaults/loader.conf are READONLY (they aren't but they are).


My goal was just to get more text on the screen during boot.  With the setup for an image, would it cover up the kernel boot text completely or add a banner and "box" in the text in to the same low-res area?  Neither of these is the result I am going for.


----------



## tobik@ (Sep 11, 2015)

What graphics card do you have?


----------



## rytz (Sep 11, 2015)

tobik said:


> What graphics card do you have?


Intel HD5500.  vidcontrol(1) shows me all the video modes I want, so I know the video card can handle them.


----------



## tobik@ (Sep 11, 2015)

I thought maybe you could simply use KMS, but since you have a Broadwell card you're out of luck at the moment.

Have you tried setting the VESA mode in /boot/device.hints (see sc(4))?

```
hint.sc.0.vesa_mode=0x103
hint.sc.0.flags=0x180
```


----------



## freethread (Sep 12, 2015)

rytz said:


> My goal was just to get more text on the screen during boot.  With the setup for an image, would it cover up the kernel boot text completely or add a banner and "box" in the text in to the same low-res area?  Neither of these is the result I am going for.



Yes, the screen saver starts immediatly. Press a key on keyboard when it will be ready (after keyboard leds blink) to see the text. tobik solution is better.


----------



## rytz (Sep 12, 2015)

Thanks for the suggestions and info!


----------



## Juanitou (Sep 14, 2015)

There has been some work on this in FreeBSD-CURRENT: https://svnweb.freebsd.org/base/head/sys/boot/?view=log (see early September commits from marcel). In my ThinkPad S440 I can EFI boot in the native resolution (1600x900 instead of 640x480) by creating /boot/loader.rc.local:

```
gop set 0
```
You can explore this possibility by issuing the following command at the loader(8) prompt: `gop list`. There is also `uga`, but it is not implemented in this computer, and `mode`, which only provides switching between the native and the low resolution modes.


----------



## Antarex (Oct 11, 2016)

Hi! Sorry for my bad English...

FreeBSD-11.0-RELEASE-p1 amd64. Hardware: Mini-PC Intel NUC5PPYH CPU Intel N3700, HD Graphics. UEFI mode. If in loader mode press ESC and print "mode 0" and "boot" then text console resolution is 1920x1080 and all OK. How can I set this setting to /boot/loader.rc.local or another loader configuration file? I am try to set:

```
mode 0 or mode set 0 or gop set 0 or gop set 4
```
But no result. Please, help me.


----------



## asteriskRoss (Nov 16, 2016)

Hi Antarex.  I also had to use the mode command so I could see the console properly later with my Nvidia GeForce GTX 770M.  For me, putting the following in /boot/loader.rc.local worked.

```
mode 2
```
I needed to try several modes before I found one that gave me a useable console once booting was completed so perhaps 0 isn't the right one for you.


----------



## Antarex (Nov 20, 2016)

The problem is [SOLVED].

Problem was here: I am installed FreeBSD at GPT (UEFI) mode, this is not by default Installer mode and probably with this setting the problem with auto-setting "mode 0" or "gop set 0" in /boot/loader.rc.local is observed. Now I install FreeBSD with by default setting: GPT (Bios + UEFI) in Installer, then all OK and after add "mode 0" to /boot/loader.rc.local screen resolution is 1920x1080 in auto-mode.

Thanks! Now is all OK!


----------



## quicktrick (Mar 28, 2017)

For me another solution did the trick.


----------



## unitrunker (Mar 1, 2020)

The loader.rc.local trick did not work for me. Reading the man page for loader.conf(5) I found efi_max_resolution.

That worked.


----------

