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?
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?
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:
Kernel Parameter (video option):
The Linux kernel’s video=... parameter offers limited features (resolution, timings), but not rotation for the framebuffer.
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.
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.
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.
Were you able to solve the issue? I’ve tested some commands I found searching on the Internet, but none of them worked. It is possible that the framebuffer driver for iMX6 does not include rotating, as the Toradex AI said.
No, I was not able to solve it. Since the textmode was needed in a small part of the application, I made a QT6 wrapper calling the script en forward it’s output to the QT6 application.
Yes, that did work. But I use weston/wayland as platform for my QT app and setting up weston.ini will enable you to rotate the screen. I set item “transform” in the weston.ini to transform=rotate-180 or transform=normal.
I have no experience with creating applications with QT, but ChatGPT helped out perfectly for such a simple application.
Hopefully this works out for you, good luck. Frank