mattintosh note

どこかのエンジニアモドキの備忘録

Raspberry Piの画面解像度を再起動せずに変更する

いつも /boot/config.txtframebuffer_width とか framebuffer_height を書いて再起動していたけど fbset コマンドですぐに変更できた…orz

$ sudo fbset -g 1280 720 1280 72 24
Linux Frame Buffer Device Configuration Version 2.1 (23/06/1999)
(C) Copyright 1995-1999 by Geert Uytterhoeven


Usage: fbset [options] [mode]

Valid options:
  General options:
    -h, --help         : display this usage information
    --test             : don't change, just test whether the mode is valid
    -s, --show         : display video mode settings
    -i, --info         : display all frame buffer information
    -v, --verbose      : verbose mode
    -V, --version      : print version information
    -x, --xfree86      : XFree86 compatibility mode
    -a, --all          : change all virtual consoles on this device
  Frame buffer special device nodes:
    -fb <device>       : processed frame buffer device
                         (default is /dev/fb0)
  Video mode database:
    -db <file>         : video mode database file
                         (default is /etc/fb.modes)
  Display geometry:
    -xres <value>      : horizontal resolution (in pixels)
    -yres <value>      : vertical resolution (in pixels)
    -vxres <value>     : virtual horizontal resolution (in pixels)
    -vyres <value>     : virtual vertical resolution (in pixels)
    -depth <value>     : display depth (in bits per pixel)
    -nonstd <value>    : select nonstandard video mode
    -g, --geometry ... : set all geometry parameters at once
    -match             : set virtual vertical resolution by virtual resolution
  Display timings:
    -pixclock <value>  : pixel clock (in picoseconds)
    -left <value>      : left margin (in pixels)
    -right <value>     : right margin (in pixels)
    -upper <value>     : upper margin (in pixel lines)
    -lower <value>     : lower margin (in pixel lines)
    -hslen <value>     : horizontal sync length (in pixels)
    -vslen <value>     : vertical sync length (in pixel lines)
    -t, --timings ...  : set all timing parameters at once
  Display flags:
    -accel <value>     : hardware text acceleration enable (false or true)
    -hsync <value>     : horizontal sync polarity (low or high)
    -vsync <value>     : vertical sync polarity (low or high)
    -csync <value>     : composite sync polarity (low or high)
    -gsync <value>     : synch on green (false or true)
    -extsync <value>   : external sync enable (false or true)
    -bcast <value>     : broadcast enable (false or true)
    -laced <value>     : interlace enable (false or true)
    -double <value>    : doublescan enable (false or true)
    -rgba <r,g,b,a>    : recommended length of color entries
    -grayscale <value> : grayscale enable (false or true)
  Display positioning:
    -move <direction>  : move the visible part (left, right, up or down)
    -step <value>      : step increment (in pixels or pixel lines)
                         (default is 8 horizontal, 2 vertical)