View Single Post
Old 03-16-2012, 05:34 PM   #11
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by thomass View Post
Code:
lipc-set-prop com.lab126.powerd preventScreenSaver 1
initvar # init global vars
spoxbrane # eink moire pattern art  

dd if=/dev/fb0 of=/mnt/us/spoxbrane.raw
lipc-set-prop com.lab126.powerd preventScreenSaver 0
Rather than doing a lipc command to stop the screensaver, I usually prevent all display overwrites by pausing the framework like this:

killall -stop Xorg cvm 2>/dev/null # pause framework
spoxbrane # draw stuff on framebuffer
killall -cont cvm Xorg 2>/dev/null # resume framework

Pausing and resuming the framework is almost instant, unlike a very slow "normal" framework stop and restart like the way other native apps (like Qt) do it. The downside of doing it my way is that the paused framework still consumes a lot of memory, while a full stop frees up all that memory. We do not need much memory, so I like just transparently and instantly pausing and resuming the framework as shown above.

On a K4 or earlier, you can remove "Xorg" from those "killall" commands.

Last edited by geekmaster; 03-16-2012 at 06:09 PM.
geekmaster is offline   Reply With Quote