树梅派屏幕旋转方法

旋转你的树莓派屏幕之前,首先要看你的树莓派用的是哪种显示驱动:

sudo raspi-config

打开树莓派的设置,进入Advanced Options - GL Driver

查看目前正在用哪种驱动,不同版本的raspbian的目录稍有差别,自己看就好了。

情况一:使用的是实验版的openGL驱动:
使用 xrandr  命令来旋转屏幕

xrandr -o left     to rotate to the left

我用这个命令直接就是可以用的了xrandr -o right     to rotate to the right

xrandr -o normal     to go back to a normal screen

xrandr -o inverted     to flip the screen upside down

注意:这个命令的效果是一次性的,重启之后就会恢复正常。

情况二:使用传统的驱动
修改启动配置文件

sudo nano /boot/config.txt

添加以下的某一行:

display_rotate=0           不旋转 Normal

display_rotate=1           转90 degrees

display_rotate=2           转180 degrees

display_rotate=3           转270 degrees

display_rotate=0x10000        左右翻转horizontal flip

display_rotate=0x20000        上下翻转vertical flip

链接:https://www.jianshu.com/p/657f6e113666

人就像是被蒙着眼推磨的驴子,生活就像一条鞭子;当鞭子抽到你背上时,你就只能一直往前走,虽然连你也不知道要走到什么时候为止,便一直这么坚持着。
原文地址:https://www.cnblogs.com/guochaoxxl/p/14842963.html