LinuxCommandLibrary

fbset

Set framebuffer console resolution

TLDR

Show current framebuffer settings

$ sudo fbset [[-i|--info]]
copy

Set a framebuffer mode defined in /etc/fb.modes
$ sudo fbset "[800]x[600]-[60]"
copy

Set an arbitrary framebuffer mode
$ sudo fbset [[-g|--geometry]] [TTY_horizontal] [TTY_vertical] [monitor_horizontal] [monitor_vertical] [color_depth]
copy

SYNOPSIS

fbset [-fb device] [-i] [-depth n] [-vxres n] [-vyres n] [-xres n] [-yres n] [-geometry WxH[+X+Y]] [-ac accel] [-rgba r,g,b,a] [-vt n] [-script] [-all] [-noname]

PARAMETERS

-fb device
    Specify framebuffer device (default: /dev/fb0)

-i
    Display current framebuffer settings

-depth n
    Set color depth in bits per pixel

-vxres n
    Set virtual horizontal resolution in pixels

-vyres n
    Set virtual vertical resolution in pixels

-xres n
    Set visible horizontal resolution in pixels

-yres n
    Set visible vertical resolution in pixels

-geometry WxH[+X+Y]
    Set geometry (widthxheight[+x[+y]])

-ac accel
    Set acceleration architecture

-rgba r,g,b,a
    Set bit positions for red, green, blue, alpha

-vt n
    Select virtual terminal number (default: current)

-script
    Generate fb.modes script instead of setting

-all
    Apply to all virtual terminals

-noname
    Ignore video mode names

DESCRIPTION

fbset is a utility for querying and setting parameters of Linux framebuffer devices, primarily used to adjust the resolution, color depth, and geometry of console framebuffers.

The Linux framebuffer provides an abstraction layer for graphics hardware, enabling text and graphics modes on the console without a full graphical environment like X11. fbset reads or modifies settings such as virtual and visible resolutions, bit depths for RGB channels, acceleration modes, and timings.

Common use cases include switching console resolutions at boot, fixing display issues on embedded systems, or generating configuration scripts for /etc/fb.modes. It supports multiple virtual terminals (VTs) and can dump current settings for inspection. Running fbset -i displays active parameters, while options like -xres and -depth apply changes immediately, often requiring root privileges.

Though powerful, improper settings can lead to black screens, so valid modes from fb.modes(5) are recommended. It's especially useful in headless servers, kiosks, or recovery environments where dynamic display reconfiguration is needed.

CAVEATS

Requires root privileges to set parameters; invalid modes may blank the screen or cause instability. Not suitable for modern KMS/DRM drivers which prefer kernel modesetting. Test in a virtual console first.

CONFIGURATION FILE

Settings often sourced from /etc/fb.modes; use fbset -script to generate entries.

PERMISSIONS

Device nodes like /dev/fb* require CAP_SYS_ADMIN or root; check with fbset -i as user.

HISTORY

Developed in the mid-1990s as part of early Linux framebuffer support by Geert Uytterhoeven. Integrated into fbset package around 1998, it became a standard tool for console graphics until kernel modesetting (KMS) in 2.6.28+ reduced its necessity.

SEE ALSO

fb.modes(5), setfont(8), showconsolefont(8), chvt(8)

Copied to clipboard