I have a 16bit (565) display attached to a Pi with the DPI interface. The problem is that the framebuffer that gets set up is still 32bit and it looks like it's just dropping the LSBs to truncate the output to the screen. This leads to really nasty banding when there is a colour gradient to display.

How can I force the framebuffer to be 16bit?

I've tried setting framebuffer_depth=16 in the config.txt but still end up with a 32bit framebuffer.

And my dpi_output_format is set to 0x70013 which should be mode 3 565 output.

fbset output:

mode "320x480"
    geometry 320 480 320 480 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24

Frame buffer device information:
    Name        : BCM2708 FB
    Address     : 0x1eb62000
    Size        : 614400
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 1280
    Accelerator : No
  • What makes you think that setting up 16-bit framebuffer will prevent color distortion? Whatever app you're using is obviously trying to output 32-bit graphics, and I don't see how truncating that to 16-bit at framebuffer level would help. Commented Aug 15, 2019 at 12:12
  • I can generate output at 16bit, that is scaled better than just chopping off the LSBs, Either way there must be a way to get a 16bit FB as I can get one with a SPI display and fb_tft
    – hardillb
    Commented Aug 15, 2019 at 12:18
  • Are you saying that you generate a 16-bit output which then gets converted to 32-bit, written into the framebuffer, and then converted back to 16-bit, and that's where the color aliasing appears? Commented Aug 15, 2019 at 12:21
  • Ignore the the input, how to I convince the kernel to give me a 16bit framebuffer.
    – hardillb
    Commented Aug 15, 2019 at 13:01
  • by loading a video driver supporting that bpp. From userspace you can then fbset -depth 16 but that will only work if the driver honors your request. Commented Aug 15, 2019 at 13:19

1 Answer 1


Framebuffer color depth can be changed by fbset

fbset -fb /dev/fb0 -depth 16 ...

Writing the desired framebuffer configuration in /etc/fb.modes could help making the change permanent, but I never tried that personally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.