本帖最后由 linjc 于 2015-3-4 18:56 编辑
闲着没事,玩了一下Lubuntu显示相关的一些东西,在这里总结一下:
1.显示比例相关:
查看当前显示比例: - root@firefly:~# cat /sys/class/graphics/fb0/scale
- xscale=100 yscale=100
- left=100 top=100 right=100 bottom=100
复制代码设置显示比例: - root@firefly:~# echo 95 > /sys/class/graphics/fb0/scale
- root@firefly:~# cat /sys/class/graphics/fb0/scale
- xscale=95 yscale=95
- left=95 top=95 right=95 bottom=95
复制代码设置横向显示比例: - root@firefly:~# echo yscale=80 > /sys/class/graphics/fb0/scale
- root@firefly:~# cat /sys/class/graphics/fb0/scale
- xscale=100 yscale=80
- left=100 top=80 right=100 bottom=80
复制代码设置纵向显示比例: - root@firefly:~# echo xscale=80 > /sys/class/graphics/fb0/scale
- root@firefly:~# cat /sys/class/graphics/fb0/scale
- xscale=80 yscale=100
- left=80 top=100 right=80 bottom=100
复制代码2. HDMI显示分辨率查看当前HDMI显示分辨率: - root@firefly:~# cat /sys/class/display/display0.HDMI/mode
- 1920x1080p-60
复制代码查看支持的HDMI显示分辨率: - root@firefly:~# cat /sys/class/display/display0.HDMI/modes
- auto
- 1920x1080p-60
- 1920x1080p-50
- 1280x720p-60
- 1280x720p-50
- 720x576p-50
- 720x480p-60
复制代码设置HDMI显示分辨率(注:重启后会返回默认设置): - root@firefly:~# echo 720x480p-60 > /sys/class/display/display0.HDMI/mode
复制代码设置32位颜色显示深度
设置显示颜色深度需要用到fbset, 由于Firefly-RK3288的Lubuntu已经默认安装了,所以不需要安装,如需安装,执行:sudo apt-get install fbset 创建文件:/etc/init/fbset.conf 内容为: # fbset - run fbset to set truecolor fbmode description "run fbset ASAP" start on startup and started udev or starting lightdm task script [ -x /bin/fbset ] && /bin/fbset -a -nonstd 1 -depth 32 -rgba "8/0,8/8,8/16,8/24" end script 创建文件:/etc/X11/xorg.conf 内容为: Section "Screen" Identifier "Default Screen" DefaultDepth 24 EndSection 在启动配置文件/etc/rc.local中添加: service lightdm stop fbset -a -nonstd 1 -depth 32 -rgba 8/0,8/8,8/16,8/24 service lightdm start |