Changing console resolution in FreeBSD 10 with vt(4)

Since FreeBSD 10 you can choose between the traditional sc(4) console and the newer vt(4) terminal console driver. While the latter is needed to have a working suspend / resume on Intel hardware newer than Ivy Bridge, it lacks the ability to use vidcontrol(8) to dynamically change the screen resolution (on the console, not in X!).

If you need to set a higher resolution on a vt(4) console you can either start X and switch back to the console with Ctrl+Alt+F1 or without starting X just by loading the i915kms kernel module:

# kldload i915kms

To load the module at boot time (a short time after the kernel is loaded), add this to /boot/loader.conf:

i915kms_load="YES"

If for some reason you need to set a different resolution than the display's native resolution, you can set a tunable before loading the module:

# kenv kern.vt.fb.default_mode="800x600"

Or any other valid resolution for your display.

You probably want to set tunable at boot time, so add this to /boot/loader.conf:

kern.vt.fb.default_mode="800x600"

Should you like to set a fixed mode on a specific output device, you can specify it:

 kern.vt.fb.LVDS-1="1024x768"

This sets the resolution for the internal notebook display. For a list of valid output device names use dmesg(8):

 # dmesg | grep drm
 info: [drm] Connector LVDS-1: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.LVDS-1
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector VGA-1: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.VGA-1
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector HDMI-A-1: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.HDMI-A-1
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector DP-1: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.DP-1
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector HDMI-A-2: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.HDMI-A-2
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector HDMI-A-3: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.HDMI-A-3
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector DP-2: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.DP-2
 info: [drm]   - kern.vt.fb.default_mode
 info: [drm] Connector DP-3: get mode from tunables:
 info: [drm]   - kern.vt.fb.modes.DP-3
 info: [drm]   - kern.vt.fb.default_mode

That's it, now you can actually work on the console. :-)

Thanks to dumbbell@ for his insights on the topic!