Disable screen blanking on i.MX6 running Yocto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Disable screen blanking on i.MX6 running Yocto

跳至解决方案
11,653 次查看
marlonsmith
Contributor IV

Hi everyone,

I'm running a Yocto build on an i.MX6 board and I'm trying to stop the screen from shutting off after 15 minutes of inactivity.  I've tried the following things with no success:

- passing consoleblank=0 to bootargs

- modifying drivers/tty/vt/vt.c with static int blankinterval = 0;

Neither of these has had any effect.

cat /sys/module/kernel/parameters/consoleblank returns a value of 900.

My system does not have setterm.

Please help!

Thanks

Marlon

标记 (2)
1 解答
4,912 次查看
Yuri
NXP Employee
NXP Employee

Marlon,


   Perhaps the problem concerns with the fact, that the mentioned command(s) should be

issued, when all Linux sub-systems are working.  As a solution, one can run (own) special

application (at start up), which should issue the command ("echo 0 > /sys/class/graphics/fb0/blank")

after some period of time (several munutes).

~Yuri.

在原帖中查看解决方案

0 项奖励
回复
7 回复数
4,912 次查看
Yuri
NXP Employee
NXP Employee

Please try the following :

echo -e -n '\033[9]' > /dev/tty0

or

echo 0 > /sys/class/graphics/fbx/blank

fbx - is number of framebuffer (LCD, LVDS, HDMI), x =0,1,2


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

4,912 次查看
marlonsmith
Contributor IV

Yuri, I've tried both of your suggestions and neither of them is working.  The screen still goes blank after 15 minutes.

Any other ideas?

Thanks!

Marlon

0 项奖励
回复
4,912 次查看
Yuri
NXP Employee
NXP Employee

  Please try using command  "echo 0 > /sys/class/graphics/fb0/blank" under root.

~Yuri.

0 项奖励
回复
4,912 次查看
marlonsmith
Contributor IV

Yuri, if I run that command after the screen has shut off, it does turn the screen back on.  So it seems I'm on the right track.  However when I run the command in a script on startup it does not seem to prevent the screen from blanking eventually.  Any thoughts?

0 项奖励
回复
4,913 次查看
Yuri
NXP Employee
NXP Employee

Marlon,


   Perhaps the problem concerns with the fact, that the mentioned command(s) should be

issued, when all Linux sub-systems are working.  As a solution, one can run (own) special

application (at start up), which should issue the command ("echo 0 > /sys/class/graphics/fb0/blank")

after some period of time (several munutes).

~Yuri.

0 项奖励
回复
4,912 次查看
marlonsmith
Contributor IV

Thanks for the help Yuri.  What finally solved the problem was calling

echo -e '\033[9;0]' > /dev/tty1

from within my application, which runs once the rest of the system has been started.

Marlon

0 项奖励
回复
4,912 次查看
marlonsmith
Contributor IV

Thanks for the response Yuri!

I forgot that I had also already tried echo 0 > /sys/class/graphics/fbx/blank, but I will try echo -e -n '\033[9]' > /dev/tty0 and see if that works.

0 项奖励
回复