# How to rotate display screen

OS: BPI-M3 Ubuntu15.10 (Kernel3.4)

Version: 1.0 HDMI

1.Add Command in your /etc/rc.local:

`echo 1 > /sys/class/graphics/fbcon/rotate_all`

2.Edit /etc/X11/xorg.conf with this content:

```
Section "Device"
     Identifier "Raspberry Pi FBDEV"
     Driver "fbturbo"
     Option "fbdev" "/dev/fb0"
     Option "SwapbuffersWait" "true"
     Option "rotate" "cw"
 EndSection
```

Parameter Description

```
  "rotate" "cw"   // clockwise 90°
  "rotate" "ud"   // clockwise 180°
  "rotate" "ccw"  //clockwise 270°
```

clockwise 90°

![](https://3925975408-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRJQoosYe3-dUmx%2F-M2HWuG855qPFbpCRkE5%2F-M2HXIcdGc3dBD_cXxHZ%2Frotate%201.jpg?generation=1584080184055243\&alt=media)

clockwise 180°

![](https://3925975408-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtRJQoosYe3-dUmx%2F-M2HWuG855qPFbpCRkE5%2F-M2HXIcfXHEGfzws98au%2Frotate%202.jpg?generation=1584080185854242\&alt=media)
