linux内核怎么修改屏幕旋转方向_树莓派4—屏幕旋转
配置:樹莓派4+raspberry pi系統(tǒng),HDMI顯示,非觸屏。
問題:想將屏幕旋轉(zhuǎn)90°,按網(wǎng)上說的,
方法一:在config.txt文件中添加display_rotate=1,或者添加display_hdmi_rotate=1,保存后reboot系統(tǒng)。不管用?
方法二:修改GPU顯存,官方文檔說如果顯存小于16M,反轉(zhuǎn)屏幕是不起作用的。
Note that the 90 and 270 degree rotation options require additional memory on the GPU, so these will not work with the 16MB GPU split.顯存設(shè)置為64M,reboot。不管用??
繼續(xù)翻看官方文檔,發(fā)現(xiàn)在樹莓派4之前的版本上,屏幕旋轉(zhuǎn)用的是修改config.txt文件,而在樹莓派4上,因為改了驅(qū)動程序,再修改config.txt文件就不起作用了。
最新方法一:在“application menu”→“preferences”→“screen configuration”中點擊“configure”,然后在“screen”→“HDMI”→“orientation”中選擇要轉(zhuǎn)動的方向,然后確認(rèn)就行了。
最新方法二:使用xrandr命令設(shè)置屏幕旋轉(zhuǎn)的方向,下面命令分別對應(yīng)0°、-90°、+90°、180°的旋轉(zhuǎn)方向:
xrandr --output HDMI-1 --rotate normalxrandr --output HDMI-1 --rotate left
xrandr --output HDMI-1 --rotate right
xrandr --output HDMI-1 --rotate inverted
設(shè)置好命令就可以了。
文檔鏈接如下:
https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
總結(jié)
以上是生活随笔為你收集整理的linux内核怎么修改屏幕旋转方向_树莓派4—屏幕旋转的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 分类和聚类有什么区别?
- 下一篇: 如何设置Linux时区为东八区