Framebuffer in 2160p

I’m trying to set up a command line program with 4K graphics, written in C++. To check the framebuffer modes available I run:

cat /sys/class/graphics/fb0/modes

and the output includes the following lines:

U:3840x2160p-60
U:4096x2160p-60

However, attempts to use fbset from the command line, or FBIOPUT_VSCREENINFO ioctl calls from within code to set the resolution to 3840x2160 on /dev/fb0 result in a dead display.

I am able to set the resolution back to 1920x1080 in code, and the display returns.

Is there some trick to using a 4K framebuffer in C++?

hi generatrix,

Have you tried to blank/unblank the framebuffer before/after mode change?

Yes, I’ve tried that. Still won’t accept the resolution settings.

Originally I had bits per pixel set to 32 (RGBA), which resulted in the TX1 freezing. I now have it set to 24 (RGB), and the call to set the resolution fails gracefully and falls back to 1080p. So, still no luck setting it to 2160p, but at least I’m spending less time resetting the device now.

Hi generatrix,

What would happen if you change fb setting by following steps?

  1. cat /sys/class/graphics/fb0/modes

  2. echo 4 >/sys/class/graphics/fb0/blank

  3. select mode from list of support modes above >/sys/class/graphics/fb0/mode -> Could you change to a mode without crashing or falling back?

  4. turn display back on: echo 0 >/sys/class/graphics/fb0/blank

/sys/class/graphics/fbX/mode is not a very good interface. It doesn’t permit options to be set, and depends a lot on the previous state.

It would appear that the issue was with the output device…

I tested other inputs on it and it was able to accept the 4K signal. However, when I tried a different monitor with the TX1 it was able to switch to a 4K framebuffer with no problems. So it would appear the problem is with this specific hardware combination.

Thank you for the help.

You may want to try this:
https://devtalk.nvidia.com/default/topic/985264/jetson-tx1/black-consoles-on-l4t-64-bits-r24-rev-2-1/post/5108028/#5108028