Dietpi: "fbset" used with RPi only; necessary at all?

Created on 18 Apr 2018  ·  7Comments  ·  Source: MichaIng/DietPi

I found the command/package fbset just used a single time with RPi devices at DietPi-Boot, if HDMI is chosen to be disabled: https://github.com/Fourdee/DietPi/blob/testing/dietpi/boot#L269

If didn't oversee something, then all other devices ignore the related dietpi.txt setting and use other methods, e.g. config.txt for resolution changed, same as RPi for all other choices than headless.

At least this means we should be able to install fbset only on RPi devices. Possibly we can leave setting framebuffer geometrie to 16 16 16 16 8 to config.txt as well and can completely skip fbset, or was there some reason to go with the command instead?

Ref: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

Enhancement Question

Most helpful comment

Hmm ... can be wrong, a long time ago, but it was something withfbset and LCD panels support like this:

Added support for more LCD panels in v.123

All 7 comments

@MichaIng

At least this means we should be able to install fbset only on RPi devices. Possibly we can leave setting framebuffer geometrie to 16 16 16 16 8 to config.txt as well and can completely skip fbset, or was there some reason to go with the command instead?

Its been a few years, can't honestly remember why we didn't just config.txt 16x16. I'll try it and send commit.

Yep works fine without fbset. Completed.

@Fourdee
Nice, that was fast 😃.

There are also max value settings available, but honestly I have no idea what they are for:

FRAMEBUFFER_WIDTH
The framebuffer_width command specifies the console framebuffer width in pixels. The default is the display width minus the total horizontal overscan.

FRAMEBUFFER_HEIGHT
The framebuffer_height command specifies the console framebuffer height in pixels. The default is the display height minus the total vertical overscan.

MAX_FRAMEBUFFER_HEIGHT, MAX_FRAMEBUFFER_WIDTH
Specifies the maximum dimensions that the internal frame buffer is allowed to be.

FRAMEBUFFER_DEPTH
Use framebuffer_depth to specify the console framebuffer depth in bits per pixel. The default value is 16.
  • "console framebuffer" vs "internal framebuffer", or just boot value vs max. value that can be set afterwards (e.g. by plugging another screen?) or are those the related settings for fbset -vxres -vyres virtual resolutions?

MAX_FRAMEBUFFER_HEIGHT, MAX_FRAMEBUFFER_WIDTH
Specifies the maximum dimensions that the internal frame buffer is allowed to be.

Maybe this changes the output resolution. As FRAMEBUFFER_HEIGHT still runs at 1080p, regardless of setting.
I'll have to run a test later 👍

Hmm ... can be wrong, a long time ago, but it was something withfbset and LCD panels support like this:

Added support for more LCD panels in v.123

@k-plan @Fourdee
Ohhh, important point. The package fbset does not only provide the command fbset to adjust the framebuffer geometry, but also con2fbmap to connect consoles to screens (?). And we use this on enabling/disabling the panels: https://github.com/Fourdee/DietPi/blob/testing/dietpi/func/dietpi-set_hardware#L671
Ref.: http://manpages.ubuntu.com/manpages/trusty/man1/con2fbmap.1.html

The same can be achieved by adding e.g. fbcon=map:12 to RPi cmdline.txt or boot.ini bootargs on Odroids, to in this case map tty1 to /dev/fb1 and tty2 to /dev/fb2 (http://lkml.iu.edu/hypermail/linux/kernel/0409.1/0646.html). For my impression this is also the preferred way compared to con2fbmap somewhere after/during boot. There might be other commands we currently run via systemd service, that would be better placed within kernel command line.
€: Ah this is also used for RPi's, to map in this case tty1 to fb1 (panel) and tty2 to fb0 (HDMI?): https://github.com/Fourdee/DietPi/blob/200da7982072c37d0077b967b5dcaaf3c6ca2ae0/dietpi/func/dietpi-set_hardware#L736

But using this, a reboot is needed. To change current resolution and map consoles without reboot, fbset with related commands is needed, as far as I could see. So for my impression for permanent fb settings, we should use kernel/boot arguments, but we may want to provide direct changes? In this case we need to add fbset as pre-req to install on demand like xinput-calibrator: https://github.com/Fourdee/DietPi/blob/200da7982072c37d0077b967b5dcaaf3c6ca2ae0/dietpi/func/dietpi-set_hardware#L592

Further ref.: https://github.com/notro/fbtft/wiki/Boot-console


For the record: We don't use modeline2fb, the 3rd command provided by fbset package 😉: https://packages.debian.org/stretch/armhf/fbset/filelist

Ah add to prereq already there :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oshank picture oshank  ·  3Comments

1021683053 picture 1021683053  ·  3Comments

k-plan picture k-plan  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

pfeerick picture pfeerick  ·  3Comments