__fbufsize - Linux


Overview

fbufsize is a Linux command that configures and displays the framebuffer size for text-based consoles. It allows users to customize the display resolution and set the number of console lines.

Syntax

fbufsize [options] <width> <height>

Options/Flags

| Option | Description | Default |
|—|—|—|
| -a | Automatically detect framebuffer size | – |
| -f | Disable auto resize (preserve existing size) | – |
| -h | Print help message and exit | – |
| -s | Display current framebuffer size | – |
| -v | Verbose output, including driver information | – |

Examples

Set framebuffer size to 1024×768:

fbufsize 1024 768

Display current framebuffer size:

fbufsize -s

Common Issues

  • Error: Framebuffer not found

    • Ensure that a framebuffer driver is loaded and active.
    • Check kernel log for errors related to framebuffer initialization.
  • Framebuffer size not changing

    • Make sure the -f option is not specified.
    • Verify that the requested size is within the supported range of the display device.

Integration

Use with setterm to configure console settings:

setterm -resolution 1024x768

Create a custom script to automate framebuffer configuration:

#!/bin/bash

set -e

# Set framebuffer size
fbufsize 1024 768

# Configure console settings
setterm -resolution 1024x768

echo "Framebuffer and console settings configured."

Related Commands

  • setterm – Configure console settings and modes
  • fbset – Manage framebuffer settings for graphical interfaces