方法一, 使用xrandr 对屏幕进行翻转
xrandr --output LVDS --rotate inverted
方法二,直接配置modesetting.conf,配置方法如下:
root@linaro-alip:/# cat /etc/X11/xorg.conf.d/20-modesetting.conf
Section "Device"
Identifier "Rockchip Graphics"
Driver "modesetting"
### Use Rockchip RGA 2D HW accel
# Option "AccelMethod" "exa"
### Use GPU HW accel
Option "AccelMethod" "glamor"
Option "DRI" "2"
### Set to "always" to avoid tearing, could lead to up 50% performance loss
Option "FlipFB" "none"
### Limit flip rate and drop frames for "FlipFB" to reduce performance lost
# Option "MaxFlipRate" "25"
Option "NoEDID" "true"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Rockchip Graphics"
Monitor "Default Monitor"
EndSection
### Valid values for rotation are "normal", "left", "right"
Section "Monitor"
Identifier "Default Monitor"
Option "Rotate" "normal"
EndSection
修改Section “Monitor” 项, “Rotate” “normal” 为默认方向,”Rotate” “inverted”即为翻转