Cannot change framebuffer video mode to 24 bits

The code is as follows:

int main(int argc, char **argv) {

retval = change_video_mode(&screen,  24);
if (retval != OK) {
	fprintf(stderr, "Error 0x%02x while changing video mode.\n\n", retval);	


unsigned int change_video_mode(Screen *screen, unsigned char mode) {

struct fb_var_screeninfo v_config;

/* Check if the mode is supported */
if((mode != 32) && (mode != 24) && (mode != 16) && (mode != 8))

/* Get variable screen configuration */
if (ioctl(fbuffer_handler, FBIOGET_VSCREENINFO, &v_config))

/* Change the video mode */
v_config.bits_per_pixel = mode;

if (ioctl(fbuffer_handler, FBIOPUT_VSCREENINFO, &v_config))

screen->bpp = v_config.bits_per_pixel;
return OK;


run the programe, you’ll see this note:
"Error 0x06 while changing video mode.

Does your monitor support 24bpp? Do you see anything from dmesg after ioctl failed?

TX2 is connected with LightCrafter 4500 with HDMI cable

The DLP LightCrafter 4500 supports three main modes of operation:
• Video mode displays images from:
– DVI input through the mini-HDMI connector
– 24-bit RGB bitmaps stored in flash memory
– 24, 20, 16, 10, and 8-bit RGB input through the system board connectors (J1, J3, J4, and J6)
– Internal test patterns
– 30-bit RGB through flat panel display (FPD) link
Pattern Sequence mode displays images from:

Tt’s User guide(


There are few things to check

  1. Is your code able to run with other monitor? I mean if you connect other monitor, is it able to change the fb bpp?
  2. What is your default bpp read from default mode?
  3. When you run the application, do you disable the ubuntu desktop or other display manager?

Hi zh_sh_y,

Is this still an issue? Any result can be shared? Thanks