11

I want to rotate my console (not X Server) by 90 degrees (clockwise).

The following seems to work for me: echo 1 > /sys/class/graphics/fbcon/rotate; however, I'd prefer to use a kernel option in Grub, rather than including the above in the /etc/rc.local script.

The fbcon documentation outlines the following option that can be passed to the kernel: fbcon=rotate:<n>. Unfortunately, when I modify /etc/default/grub and modify the GRUB_CMDLINE_LINUX line like this:

GRUB_CMDLINE_LINUX="fbcon=rotate_all:1"

... it doesn't work. I also ran update-grub before rebooting.

I've also tried this:

GRUB_CMDLINE_LINUX="fbconsole=rotate_all:1"

Still nothing. Any thoughts?

  • Why don't you want to edit rc.local? – Emanuel Berg Mar 19 '13 at 23:05
10

Figured this out. You may need to add video=efifb to ensure that the framebuffer console is used:

GRUB_CMDLINE_LINUX="video=efifb fbcon=rotate:1"

EDIT: The efifb driver is designed for EFI firmware only, especially Intel-based Apple computers. However, as I've found out, it also works for non-Apple PCs. I am running the proprietary nVidia drivers on my Linux system, and the efifb driver works quite well. I assume it works for me because I am using nVidia drivers, and the "native" fbdev driver conflicts with them.

To be honest, I don't fully understand why the efifb driver makes things work, but if someone else does (or if you can get things working with another framebuffer driver with nVidia drivers installed), please comment below. Thanks!

  • 2
    Big caveat: This only applies if your machine ships with an EFI-enabled BIOS. – aperezbios Jan 12 '15 at 23:47
  • Thanks for posting your solution! If this did indeed solve it for you, please accept it so the question can be marked as answered. – terdon Jan 12 '15 at 23:50
  • @aperezbios - Are you sure that's the case? I'm pretty sure that I've seen this working on a conventional BIOS system. – BMiner Jan 16 '15 at 19:31
  • @BMiner +1. With the option "video= efi fb" it stands to reason this only works on efi BIOS. Possibly, there is a different command for non-efi BIOS. – MariusMatutiae Nov 29 '16 at 9:58
  • @MariusMatutiae - Indeed. The video=efifb part isn't necessary if you are running a BIOS firmware or booted in BIOS compatibility mode with an EFI firmware, though it probably doesn't hurt either. Technically speaking, there is no such thing as "EFI BIOS", just EFI firmware or BIOS firmware. – BMiner Dec 5 '16 at 14:43
0

There is a small but important difference between the documentation and what you have written in your config file:

…the following option that can be passed to the kernel: fbcon=rotate:<n>

While you have written

fbcon=rotate_all:1

rotate_all is not a valid keyword. If you leave out the _all suffix, it should work:

GRUB_CMDLINE_LINUX="fbcon=rotate:1"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.