@allen 发表于 2018-1-4 17:45:34

S500 Linux 系统X-server 旋转,翻转90 180 270 度

本帖最后由 @allen 于 2018-1-5 14:55 编辑


有些项目可能需要翻转画面。下面的操作可以实现固定一个翻转,虽然做不到手机那样的动态翻转,不过也足够了。
下图是翻转270度的效果



1.备份旧的,拷贝新的库

在板子操作:
cp /usr/local/XSGX/lib/xorg/modules/drivers/pvr_drv.so/usr/local/XSGX/lib/xorg/modules/drivers/pvr_drv.so.back

下载附件,解压库文件
cp pvr_drv.so /usr/local/XSGX/lib/xorg/modules/drivers/pvr_drv.so


2. 修改xorg.conf

vi /etc/xorg.conf
配置如果下:# X.Org X server configuration file

Section "Device"
      Identifier      "Video Device"
      Driver          "pvr"
      Option          "FlipChain"   "false"
      #Option         "SWcursor"      "true"
     Option          "Rotate"      "CCW"
EndSection

Section "Monitor"
      Identifier      "Monitor"
EndSection

Section "Screen"
      Identifier      "Screen"
      Monitor         "Monitor"
      Device          "Video Device"
EndSection主要改动是添加了 Option          "Rotate"      "CCW", CCW 逆时针旋转270度(顺时针旋转90度),CW逆针旋转90度,UD旋转180度,即上下翻转。


3. 重启生效。

4. 参数解释

Option "Rotate" "string" Enable rotation of the display. The supported values are "CW" (clockwise, 90 degrees), "UD" (upside down, 180 degrees) and "CCW" (counter clockwise, 270 degrees). Implies use of the shadow framebuffer layer.   Default: off.

参考:https://www.mankier.com/4/fbturbo

所以目前S500 Linux 的X-server 能同时支持桌面加速和翻转功能。不过FB 是没做翻转,如果跑一些写FB 的程序,画面还是原来的。切记!

ahha007 发表于 2018-1-5 04:26:21

干货,有图有真相,顶一顶!!
页: [1]
查看完整版本: S500 Linux 系统X-server 旋转,翻转90 180 270 度