Pages

Sunday, December 22, 2019

Framebuffer

Just some quick notes about framebuffer.

Clear screen

To clear the screen, write zeros on the framebuffer device with dd:

# dd if=/dev/zero of=/dev/fb0
dd: writing to '/dev/fb0': No space left on device
301+0 records in
300+0 records out
153600 bytes (154 kB, 150 KiB) copied, 0.00251834 s, 61.0 MB/s


X

To run X on the framebuffer device, check first if the framebuffer X driver is installed:

# Xorg -configure
...
List of video drivers:
        modesetting
...


If not, install it on Armbian with:

# apt install xserver-xorg-video-fbdev
...


And recheck:

# Xorg -configure
...
List of video drivers:
        modesetting
        fbdev
...


Configure your xorg.conf like the following:

# vi /etc/X11/xorg.conf
Section "Device"
        Identifier      "ODROID"
        Driver          "fbdev"
        Option          "fbdev"         "/dev/fb0"
        Option          "Debug"         "false"
        Option          "DPMS"          "false"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "ODROID"
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Option          "BlankTime"     "0"
        Option          "StandbyTime"   "0"
        Option          "SuspendTime"   "0"
        Option          "OffTime"       "0"
EndSection

Section "DRI"
        Mode            0666
EndSection


LightDM

To enable autologin into X and Fluxbox, configure LightDM:

# vi /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf
[Seat:*]
autologin-user=karellen
autologin-user-timeout=0
user-session=fluxbox


Then restart LightDM:

# systemctl start lightdm


Framebuffer device information

Current framebuffer device settings can be checked with:

# fbset -i -fb /dev/fb0

mode "1920x1080"
    geometry 1920 1080 1920 1080 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode

Frame buffer device information:
    Name        : DRM emulated
    Address     : 0
    Size        : 8294400
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 7680
    Accelerator : No


Resolution

The rsolution can be changed with the fbset command, e.g.:

# fbset -fb /dev/fb0 -xres 1366 -yres 768  -match

No comments:

Post a Comment