Configure Screen Rotation RaspberryPI

I have been playing with my Raspberry PI quite a lot lately, but one annoyance is that with some of the Operating Systems you can run on it, you cant change the screen rotation.  I use my Raspberry PI on a Dell Monitor that I have rotated 90 degrees.  Most of the time this monitor is used for producing documents on it, hence the rotation, but its a nice monitor with lots of inputs, so its great to use with the Raspberry PI.  Unfortunatly the OS I run (RISC OS 5) doesn’t support screen rotation natively.  However the Raspberry PI output can be rotated quite easily by simply telling the GPU to rotate the output.  You do this by editing one of the files in the root of the SD Card, config.txt.

Depending on which Operating System your running on your Raspberry PI will depend on how simple or complex this file is.  For RISC OS its very light, but for Ubuntu it is quite lengthy.  If your configuring for Ubuntu or one of the other Linux Operating Systems, you just have to change a default setting.

Configure Screen Rotation RaspberryPI

To do this, mount the SD Card, and in the root look for the file config.txt and open in an editor.  Search in the file for display_rotate

You should find a section that looks like:


## display_rotate
## Rotate the display clockwise or flip the display.
## The 90 and 270 degrees rotation options require additional memory on GPU,
## so won't work with the 16M GPU split.
##
## Value Description
## -------------------------------------------------------------------------
## 0 0 degrees (Default)
## 1 90 degrees
## 2 180 degrees
## 3 270 degrees
## 0x10000 Horizontal flip
## 0x20000 Vertical flip
##
#display_rotate=0
## dispmanx_offline
## Set to "1" to enable offline compositing
##
## Default 0
##
#dispmanx_offline=0

 

Simply remove the # and change the 0 to which ever configuration you need.  For example:

##
display_rotate=3

 

Save the file and re-insert into your Raspberry PI and boot the OS.  Your screen should now be rotated to suit your monitor.

To do this on RISC OS, you will have to add the entry manually.  You dont have the display_rotate section already pre entered.

Open up the config.txt file and you will see something similar:

fake_vsync_isr=1
framebuffer_swap=0
gpu_mem=64
init_emmc_clock=100000000
kernel=RISCOS.IMG

The options are the same as shown above. Pick which one suits your configuration:

0 degrees (Default)
1 90 degrees
2 180 degrees
3 270 degrees
0x10000 Horizontal flip
0x20000 Vertical flip

You simply add the following to the config.txt file:


display_rotate=3

Your file will look like this when updated:


fake_vsync_isr=1
framebuffer_swap=0
gpu_mem=64
display_rotate=3
init_emmc_clock=100000000
kernel=RISCOS.IMG

Once you re-inster the SD Card and boot the Raspberry PI your screen will be rotated.

Screen Rotation RaspberryPI

, ,

One Response to Configure Screen Rotation RaspberryPI

  1. Vas July 10, 2016 at 2:56 pm #

    Thanks buddy just what I was looking for not for documents but for some vertical games.

    It is very strange that even though every website and written document is made to work best with a vertical monitor we still view most things on a 16:9 16:10 monitor using movie aspect ratio as our guide when in reality most computers spend most of their time in web pages and and work related apps.

    But that’s just me rambling thanks for the info much appreciated

Leave a Reply

Copyright David Hill Group Limited

Powered by WordPress. Designed by Woo Themes