Introduction

vt(4) is the virtual terminal console driver implementation (also known as the "Newcons" project) which replaces syscons(4), adding the following features:

It was added to CURRENT in r259016 (2013-12-05) and enabled by default in GENERIC for amd64 and i386 architectures in r268045 (2014-06-30).

syscons(4) Comparison

vt(4) currently has the following features compared to syscons:un

Note: Additional vt(4) features will be implemented; this table does not represent the end goal for vt(4).

Feature

syscons(4)

vt(4)

splash screen support

Yes

Limited (see ImproveVtSplashScreenSupport)

ASCII encoding

Yes

Yes

UTF-8 encoding

No

Yes

Encodings other than ASCII/UTF-8

Yes

No

Double-width characters (for CJK)

No

Yes

VGA text mode font changing

Yes

No

VGA vesa

Yes

Limited (vt_vbefb supports the mode set by the loader)

screensaver

Yes

No

Kernel Modesetting (KMS) integration

No

Yes

More than 256 distinct characters on screen

No

Yes

support for hardware mouse cursors

Yes

No

Testing

i386/amd64

The vt and vt_vga devices are enabled by default; if using a custom kernel make sure they are included. The sc and vga devices may be omitted.

#device        vga             # VGA video card driver
#device        sc
device         vt
device         vt_vga

To test vt(4) with KMS on Intel driver

kldload i915kms

For ATI/AMD Radeon drivers

kldload radeonkms

vt_vga defaults to graphics mode. A loader tunable hw.vga.textmode can be set to use text mode instead. To enable text mode add the following to /boot/loader.conf:

hw.vga.textmode=1

PowerPC

vt(4) is enabled by default in GENERIC in -CURRENT.

Font Support

The vtfontcvt(8) tool can convert BDF and HEX format font files for use by the vt(4) console.

For example, a 16x32 version of the terminus font can be created as follows:

  1. Obtain the latest Terminus font distribution and extract it

  2. Convert it to a vt(4) .fnt file:
    % vtfontcvt -w 16 -h 32 ter-u32n.bdf ter-u32b.bdf ter-u32.fnt
  3. Load it from a console window:
    % vidcontrol -f ter-u32.fnt

TODO

Feature

Status

Generic terminal layer for the kernel

DONE

Core of the vt driver, screen buffering, drawing, etc

DONE

Make the keyboard layer accept Unicode

DONE

Migrate syscons to xterm, to ease switching between vt(4) and syscons

DONE

Make kernel mode setting work: to be investigated.

DONE

Scrollback

Works

Moused support

Works

kbdcontrol(1)

In progress: PR 204837

+--- kbdmap load

Works.

+--- kbdmux control

Works.

kbdmap(1) front end

Works.

vidcontrol(1)

In progress

+--- Font load

Works

+--- Font console attributes

Works

+--- Colormap

Not yet

+--- Clear history

Done (r361601, PR 224436)

+--- CONS_BLANKTIME

Not implemented: PR 233356

vidfont(1) front end

DONE

Switch to text when required

Works

ddb(4) debugger

Works

Integration with X11

Works

vt(4) man page

DONE

double width character support

Done

CJK fonts Newcons/Fonts

In progress

UTF-8 keymaps

DONE

Update FreeBSD Handbook

Unstarted

Keyboard and char map support for other than Unicode UTF-8

Unstarted

Font setting from loader (at kernel start)

Unstarted

Architecture / Hardware Specific

amd64

Works (VGA/i915kms/radeonkms)

ARM

Works Framebuffer.

arm64

Unknown

i386

Works (VGA/i915kms/radeonkms)

MIPS

Works

PPC

Works

SPARC

Works

VGA driver that supports at least 80x25 text mode and 640x480 graphics mode

DONE

VESA driver

Limited functionality (mode switch only by loader)

Graphics driver that works with Intel and ATI/AMD

DONE

i386/amd64 nvidia driver

Works

Xbox framebuffer driver (as a test, because it's easy to do so)

DONE

DRM notification on panic/reboot/shutdown/debugger

DONE

Screen saver

Unstarted

Known Issues

Search for PRs tagged with the vt keyword

Fixed Issues

Credits

Significant contributors to vt(4) include:


CategoryProject

Newcons (last edited 2023-09-07T15:52:03+0000 by EdMaste)