Hi,
I am trying to setup the framebuffer for a control application with littel GUI requirements. I would like to use the framebuffer for the GUI instead of a full OpenGL framework. Threrefore I would like to use the framebuffer with a depth of 32 bits. But I get only a 16 bits per pixel resolution.
I tried to configured the framebuffer in the config.txt file under /boot/config.txt or /boot/firmware/config.txt by adding the lines:
framebuffer_width=1920
framebuffer_height=1080
framebuffer_depth=32
When I open the framebuffer device in my C++-program, the
// Get variable screen information
if(ioctl(hScreenBuffer, FBIOGET_VSCREENINFO, &vinfo))
will still report a 16bpp for the vinfo.bits_per_pixel field.
Next try to change the framebuffer depth in the C++-program does not work either.
// Change variable info
vinfo.bits_per_pixel = 32;
vinfo.xres = 1920;
vinfo.yres = 1080;
if(ioctl(hScreenBuffer, FBIOPUT_VSCREENINFO, &vinfo)) {
printf("Error setting variable information.\n");
}
results in an error. So that does not work as well.
Also the change of the used monitor on HDMI-1 connection did not work.
I tried it on the latest Raspbian OS desktop variant (Dezemer 2023 version) in booted to headless / terminal only.
On older versions of the Raspbian Lite OS it worked. What is to change? I could not find any helpful entry in the documentation or the topics here.
Many thanks for your help!
I am trying to setup the framebuffer for a control application with littel GUI requirements. I would like to use the framebuffer for the GUI instead of a full OpenGL framework. Threrefore I would like to use the framebuffer with a depth of 32 bits. But I get only a 16 bits per pixel resolution.
I tried to configured the framebuffer in the config.txt file under /boot/config.txt or /boot/firmware/config.txt by adding the lines:
framebuffer_width=1920
framebuffer_height=1080
framebuffer_depth=32
When I open the framebuffer device in my C++-program, the
// Get variable screen information
if(ioctl(hScreenBuffer, FBIOGET_VSCREENINFO, &vinfo))
will still report a 16bpp for the vinfo.bits_per_pixel field.
Next try to change the framebuffer depth in the C++-program does not work either.
// Change variable info
vinfo.bits_per_pixel = 32;
vinfo.xres = 1920;
vinfo.yres = 1080;
if(ioctl(hScreenBuffer, FBIOPUT_VSCREENINFO, &vinfo)) {
printf("Error setting variable information.\n");
}
results in an error. So that does not work as well.
Also the change of the used monitor on HDMI-1 connection did not work.
I tried it on the latest Raspbian OS desktop variant (Dezemer 2023 version) in booted to headless / terminal only.
On older versions of the Raspbian Lite OS it worked. What is to change? I could not find any helpful entry in the documentation or the topics here.
Many thanks for your help!
Statistics: Posted by foxeuro — Sun Dec 17, 2023 11:28 am