Although I haven't tried it, this should work, since CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
is in the default kernel config, at least for the 64-bit 5.10.52 I checked.1 Another clue would be the existence of /sys/class/graphics/fbcon/rotate
and rotate_all
, which is how the rotation can be changed -- eg. from sudo bash
(because sudo
does not apply to a normal redirect)
echo 1 > /sys/class/graphics/fbcon/rotate_all
Should do a quarter clockwise rotation (valid values are 0, 1, 2, 3). The difference between rotate
and rotate_all
is that each virtual console (there are 6 accessible by default) has its own framebuffer, and the former only rotates the current one (which should be fine, but if you want to automate this at boot you should have it apply to all).
To do that, from a writable directory:
sudo modprobe configs
cp /proc/config.gz .
gunzip config.gz
grep FRAMEBUFFER_CONSOLE config
You should get something like:
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set