如何保存fbset设置? [英] How to save fbset setting?

查看:133
本文介绍了如何保存fbset设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Qt进行嵌入式Linux项目,当Qt程序运行时,它不在7 LCD的中间,所以我使用 fbset -move -step移动它,然后

I am working on a embedded Linux project using Qt, when the Qt program runs, it does not sit on the middle of the 7" LCD,so I used "fbset -move -step" to move it,then it is ok.

但是当板子再次关闭又重新打开时,设置丢失了,Qt程序仍然不在LCD的中间。 /fb.modes,我也对其进行了修改,但是问题仍然存在。有人可以帮助我吗?

But when the board is switched off and on again, the setting is lost, the Qt program still not sit on the middle of the LCD. I checked the etc/fb.modes, and I also modified it, but the problem still remains. Can anyone help me?

推荐答案

您可以输出通过运行 fbset 而不使用 -s / / -show -fb

You can output the current settings by running fbset with no arguments other than -s/--show or -fb:

# fbset

mode "1024x768-60"
    # D: 65.003 MHz, H: 48.365 kHz, V: 60.006 Hz
    geometry 1024 768 1024 768 16
    timings 15384 160 24 29 3 136 6
    hsync high
    vsync high
    rgba 5/11,6/5,5/0,0/0
endmode

您可以将其写入文件:

fbset >>/etc/local.fb.modes

编辑以重命名模式,添加您想要的任何评论;然后可以将新文件与 -db 参数一起使用:

Edit to rename the mode, add any comments you want; you can then use your new file with the -db argument:

fbset -db /etc/local.fb.modes --all "1024x768-60"

您可以将该命令放入您的 /etc/rc.local 中,使每次引导生效。

You can put that command into your /etc/rc.local to take effect every boot.

这篇关于如何保存fbset设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆