Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: Can I have a rotated framebuffer console?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gw
Apprentice
Apprentice


Joined: 03 Dec 2006
Posts: 215

PostPosted: Tue Jun 30, 2009 7:54 am    Post subject: SOLVED: Can I have a rotated framebuffer console? Reply with quote

Hi,

I'm using my monitor in portrait orientation which, under X, is done with:
Code:
xrandr -o left

Yet everytime on booting and rebooting I have to physically turn the monitor, because the display falls back to normal (landscape) after leaving the X environment. That is really annoying!
Is it possible to tell the framebuffer console to work in a rotated-to-portrait mode?

Thanks for your help

gw


Last edited by gw on Tue Jun 30, 2009 10:56 am; edited 1 time in total
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1646
Location: Poland => Lodz

PostPosted: Tue Jun 30, 2009 8:14 am    Post subject: Reply with quote

In menuconfig there is an option for support of rotating the fb, but I have no idea what userspace programs you'd need.
Back to top
View user's profile Send private message
gw
Apprentice
Apprentice


Joined: 03 Dec 2006
Posts: 215

PostPosted: Tue Jun 30, 2009 10:55 am    Post subject: Reply with quote

szczerb wrote:
In menuconfig there is an option for support of rotating the fb, but I have no idea what userspace programs you'd need.

Yes, I had this already:
Code:
root@linux:~> zcat /proc/config.gz|grep -i framebuffer
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y

But I had no idea how to activate it. The answer is simple, checkout linux kernel documentation fbcon.txt!
Quote:
C. Boot options

The framebuffer console has several, largely unknown, boot options
that can change its behavior. [...]

4. fbcon=rotate:<n>

This option changes the orientation angle of the console display. The
value 'n' accepts the following:

0 - normal orientation (0 degree)
1 - clockwise orientation (90 degrees)
2 - upside down orientation (180 degrees)
3 - counterclockwise orientation (270 degrees)

The angle can be changed anytime afterwards by 'echoing' the same
numbers to any one of the 2 attributes found in
/sys/class/graphics/fbcon

rotate - rotate the display of the active console
rotate_all - rotate the display of all consoles

Console rotation will only become available if Console Rotation
Support is compiled in your kernel.

NOTE: This is purely console rotation. Any other applications that
use the framebuffer will remain at their 'normal'orientation.
Actually, the underlying fb driver is totally ignorant of console
rotation.

So in grub.conf I add a fbcon declaration:
Code:
kernel /boot/kernel-2.6.29-gentoo-r5 root=/dev/sda5 console=tty1 video=uvesafb:mtrr:3,ywrap,1280x1024-32@60 fbcon=rotate:3,scrollback=2048k

And it works!

thanks

gw
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum