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

sudo raspi-config

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

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

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

xrandr -o left     to rotate to the left

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

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-28
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
相关资源
相似解决方案