Hi ! I would like to force my screen to enter in the framebuffer sleep mode for saving energy when my board is not used. I know I have to use the following command lines to force enter in the fb sleep mode : echo 1 > /sys/class/graphics/fb0/blank And in order to force my screen to get out of the sleep mode : echo 0 > /sys/class/graphics/fb0/blank And the following command line has exactly no consequences : echo -e '\033[9;1]' > /dev/ttySAC0 Unfortunately my board doesn’t enter in sleep mode after a delay. I think I have to code something in my Qt app so that after a certain time of inactivity the first command is launched thanks to a QProcess. And once a somebody put his finger in the touchscreen the second command will have to be lauched too in order to get back to a normal screen mode... But it looks very dirty ... Have you experienced something like that ? And do you know a way to solve this problem without using Qt stuff, only by configuring the system ? Thanks !
Screen sleep mode
The display only switches into a power saving mode, if the framebuffer console is using it. If the framebuffer console is not used, you need to switch off it by yourself (you already found out how). And why do you expect anything display related happens when you output something to your serial console (e.g. /dev/ttySAC0)? This sequence will be sent out at your RS232 connector (an maybe hits your host but never your local display). Enable the framebuffer console in the kernel and you will get a system that behaves as you expect it.
Indeed, you're very right ! /dev/ttySAC0 is not the good device .... I'll do as you said (modifying the kernel configuration and using the right tty device). I keep you in touch
The kernel I am using is configured with the framebuffer console (CONIFG_FRAMEBUFFER_CONSOLE=y) I tried several commands : echo -e '\033[9;1]' > /dev/pts/0 and echo -e '\033[9;1]' But nothing happens after 1min delay
Maybe QWS is blocking the sleep mode ? But that would be very weird because I can force the sleep mode without any problem when using QT apps of my own
QWS can block the console sleep mode, as it disables the console and switches to graphics mode when it starts. But not sure. Simply run your system without any Qt app running, only the plain console enabled. Does it switch off in this case? Or did you already test it with your "2012-03-11 23:56:54" report.
No I forgot to test this. In console mode the sleep mode is entered after 1min delay as it should do... I think QWS blocks the sleep mode.
I found these env variables : http://qt-project.org/doc/qt-4.8/qt-embedded-envvars.html But nothing matches the problem.
I also found this : http://linux.die.net/man/3/qwsserver This is interesting, it permits to use a screensaver. However I would rather use the sleep mode in order to save more energy when the board is not used.