当前位置:   article > 正文

【触觉智能分享】RK3568+Debian系统如何旋转屏幕显示方向_debian系统方向旋转

debian系统方向旋转

大家在购买开发板后,默认开机进入桌面屏幕显示方向是竖屏,有些用户想修改为横屏显示,本文就用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/开源鸿蒙等多种操作系统。 

解决办法

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

xrandr -o left/right/normal/inverted

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

使用xrandr旋转的效果是一次性的,系统重启后屏幕显示方向会还原。 如果要开机自动旋转,则需要修改配置文件:/etc/X11/xorg.conf.d/20-modesetting.conf。

  1. Section "Device"
  2. Identifier "Rockchip Graphics"
  3. Driver "modesetting"
  4. ### Use Rockchip RGA 2D HW accel
  5. # Option "AccelMethod" "exa"
  6. ### Use GPU HW accel
  7. Option "AccelMethod" "glamor"
  8. Option "DRI" "2"
  9. ### Set to "always" to avoid tearing, could lead to up 50% performance loss
  10. Option "FlipFB" "always"
  11. ### Limit flip rate and drop frames for "FlipFB" to reduce performance lost
  12. # Option "MaxFlipRate" "60"
  13. Option "NoEDID" "true"
  14. Option "UseGammaLUT" "true"
  15. EndSection
  16. Section "Screen"
  17. Identifier "Default Screen"
  18. Device "Rockchip Graphics"
  19. Monitor "Default Monitor"
  20. EndSection
  21. ### Valid values for rotation are "normal", "left", "right"
  22. Section "Monitor"
  23. # Identifier "Default Monitor"
  24. Identifier "DSI-1"
  25. Option "Rotate" "left"
  26. EndSection

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

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

  1. linaro@linaro-alip:~$ sudo cat /sys/kernel/debug/dri/0/summary
  2. Video Port0: ACTIVE
  3. Connector: DSI-1
  4. bus_format[100a]: RGB888_1X24
  5. overlay_mode[0] output_mode[0] color_space[0]
  6. Display mode: 1920x1080p60
  7. clk[148500] real_clk[148500] type[48] flag[a]
  8. H: 1920 2052 2112 2200
  9. V: 1080 1084 1116 1125
  10. Smart0-win0: ACTIVE
  11. win_id: 0
  12. format: XR24 little-endian (0x34325258) SDR[0] color_space[0] glb_alpha[0xff]
  13. rotate: xmirror: 0 ymirror: 0 rotate_90: 0 rotate_270: 0
  14. csc: y2r[0] r2y[0] csc mode[0]
  15. zpos: 0
  16. src: pos[0, 0] rect[1920 x 1080]
  17. dst: pos[0, 0] rect[1920 x 1080]
  18. buf[0]: addr: 0x00000000007e9000 pitch: 7680 offset: 0
  19. Video Port1: ACTIVE
  20. Connector: HDMI-A-1
  21. bus_format[100a]: RGB888_1X24
  22. overlay_mode[0] output_mode[f] color_space[0]
  23. Display mode: 1920x1080p60
  24. clk[148500] real_clk[148500] type[0] flag[5]
  25. H: 1920 2008 2052 2200
  26. V: 1080 1084 1089 1125
  27. Smart1-win0: ACTIVE
  28. win_id: 1
  29. format: XR24 little-endian (0x34325258) SDR[0] color_space[0] glb_alpha[0xff]
  30. rotate: xmirror: 0 ymirror: 0 rotate_90: 0 rotate_270: 0
  31. csc: y2r[0] r2y[0] csc mode[0]
  32. zpos: 1
  33. src: pos[0, 0] rect[1920 x 1080]
  34. dst: pos[0, 0] rect[1920 x 1080]
  35. buf[0]: addr: 0x00000000007e9000 pitch: 7680 offset: 0

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/374099
推荐阅读
相关标签
  

闽ICP备14008679号