Posts: 1
Joined: Thu Oct 03, 2019 4:18 pm

8 bits-per-pixel mode on the R4b

Sat Nov 09, 2019 3:56 pm

Has anyone successfully put the raspi 4b into an 8 bit-per-pixel mode?
I was successful using this code on the 3b, but the following fails for the 4b.

Code: Select all

vinfo.bits_per_pixel = 8;
if (ioctl(fbfd, FBIOPUT_VSCREENINFO, &vinfo)) {
		printf("Error setting variable information.\n");
		return 1;


Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7416
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: 8 bits-per-pixel mode on the R4b

Sun Nov 10, 2019 4:04 pm

By default previous Pi variants all used bcm2708_fb as the driver for the frame buffer.
Pi4 now defaults to using DRM / KMS for display, which emulates the frame buffer. I don't believe that emulation supports 8bpp.

You can remove the "dtoverlay=vc4-fkms-v3d" line from /boot/config.txt to drop back to bcm2708_fb, but that will disable all 3D hardware (which is used by X for composition).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Graphics programming”