基于IDO-EVB3568的如何旋转屏幕显示方向

电子说

1.2w人已加入

描述

大家在购买开发板后,默认开机进入桌面屏幕显示方向是竖屏,有些用户想修改为横屏显示,本文就用IDO-EVB3568为例,用Debian系统演示如何旋转屏幕显示方向,此方法适用于所有RK356X系列产品。

IDO-EVB3568开发板拥有四核A55,主频高达2.0G,支持高达8GB高速LPDDR4,1T算力NPU ,4K H.265硬解码,4K HDMI2.0显示输出,支持双通道LVDS/eDP/两路MIPI DSI 等多种显示接口,支持3屏异显。板载2路千兆以太网,双频WIFI+蓝牙,支持5G或4G通信,支持2路USB3.0和7路USB2.0/SATA3.0,5路串口(TTL/RS232/RS485),2路CAN总线。

支持Android11/Debian10/Ubuntu20/Buildroot/麒麟OS/开源鸿蒙等多种操作系统。

核心板产品规格书:IDO-SOM3568-V1(邮票孔) 产品手册

IDO-SOM3568-V2(金手指) 产品手册

开发板产品规格书:IDO-EVB3568-V1 产品手册

操作系统

解决方法      

手动旋转使用xrandr命令实现:

xrandr -o left/right/normal/inverted

left/right/normal/inverted表示4个方向。

使用xrandr旋转的效果是一次性的,系统重启后屏幕显示方向会还原。如果要开机自动旋转,则需要修改配置文件:/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"         "always"

### Limit flip rate and drop frames for "FlipFB" to reduce performance lost
# Option "MaxFlipRate"    "60"

    Option "NoEDID"         "true"
    Option "UseGammaLUT"    "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"
    Identifier "DSI-1"
    Option "Rotate" "left"
EndSection

其中Section "Monitor"下的【Identifier  "DSI-1"】表示旋转屏幕DSI-1,【Option      "Rotate" "left"】表示向左旋转。这样修改后,重启设备,屏幕旋转设置生效。

当前系统中可用的屏幕ID可通过以下命令查看:

linaro@linaro-alip:~$ sudo cat /sys/kernel/debug/dri/0/summary
Video Port0: ACTIVE
    Connector: DSI-1
        bus_format[100a]: RGB888_1X24
        overlay_mode[0] output_mode[0] color_space[0]
    Display mode: 1920x1080p60
        clk[148500] real_clk[148500] type[48] flag[a]
        H: 1920 2052 2112 2200
        V: 1080 1084 1116 1125
    Smart0-win0: ACTIVE
        win_id: 0
        format: XR24 little-endian (0x34325258) SDR[0] color_space[0] glb_alpha[0xff]
        rotate: xmirror: 0 ymirror: 0 rotate_90: 0 rotate_270: 0
        csc: y2r[0] r2y[0] csc mode[0]
        zpos: 0
        src: pos[0, 0] rect[1920 x 1080]
        dst: pos[0, 0] rect[1920 x 1080]
        buf[0]: addr: 0x00000000007e9000 pitch: 7680 offset: 0
Video Port1: ACTIVE
    Connector: HDMI-A-1
        bus_format[100a]: RGB888_1X24
        overlay_mode[0] output_mode[f] color_space[0]
    Display mode: 1920x1080p60
        clk[148500] real_clk[148500] type[0] flag[5]
        H: 1920 2008 2052 2200
        V: 1080 1084 1089 1125
    Smart1-win0: ACTIVE
        win_id: 1
        format: XR24 little-endian (0x34325258) SDR[0] color_space[0] glb_alpha[0xff]
        rotate: xmirror: 0 ymirror: 0 rotate_90: 0 rotate_270: 0
        csc: y2r[0] r2y[0] csc mode[0]
        zpos: 1
        src: pos[0, 0] rect[1920 x 1080]
        dst: pos[0, 0] rect[1920 x 1080]
        buf[0]: addr: 0x00000000007e9000 pitch: 7680 offset: 0
编辑:黄飞

 

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分