Rotate the framebuffer for the textmode

Hi, we are using the Colibri iMX6DL Colibri board with the BSP7.X. I am able to rotate the display of plymouth and weston, but sometimes we are using the textmode on the display (fb0) and want to be able to rotate that text as well. I think I have to add an uboot setting but not sure which/how?

Thanks in advance, Frank

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello Frank,

Thank you for your question! As you mentioned, rotation for graphic environments like Weston and Plymouth can be handled in their configurations. However, rotating the framebuffer (fb0) for console (text) output is more limited.

The standard iMX6 Linux framebuffer driver doesn’t support hardware rotation for the text console (fb0) out-of-the-box. U-Boot does not provide a setting to rotate the Linux framebuffer display during boot or for text mode console output.

Common approaches:

  1. Kernel Parameter (video option):
    The Linux kernel’s video=... parameter offers limited features (resolution, timings), but not rotation for the framebuffer.

  2. Using fbcon Parameters:
    The fbcon=rotate:<n> kernel parameter can rotate some framebuffer consoles, but support depends on the kernel and framebuffer driver. For iMX6 (BSP 7.x), this is likely not supported since the driver typically does not implement it natively.

    Example usage (only if supported):

    fbcon=rotate:1
    

    Where 1=90°, 2=180°, 3=270°, 0=no rotation.
    You can try adding this to your kernel bootargs in U-Boot:

    setenv defargs 'fbcon=rotate:1'
    saveenv
    

    But please note this likely won’t work with the iMX6 fb driver.

  3. Patching or Using a Framebuffer Userland Tool:
    If rotation is critical, you may consider framebuffer userland tools or patches that rotate the console output. These solutions often involve running a program to copy and rotate framebuffer contents, but they’re usually meant for graphics, not text console.

Summary:

  • There is typically no U-Boot setting or standard kernel parameter to rotate the fb0 text console on iMX6 boards.
  • You can experiment with fbcon=rotate:<n>, but it is probably not supported on your current platform.

Links for further reference:

If you need display rotation only for graphical applications, your current approach (configuring Plymouth and Weston) is correct.

Best regards,
Toradex AI Assistant

Unfortunately setting defargs does not have effect when I switch to textmode. Was planning to set this rotation in a script on the linux target. So the target can be configured to use rotation or not.

Kind regards, Frank