Low Power Mode Problem (With Gles)


crow_riot

Well-Known Member
Joined
Sep 21, 2009
Messages
1,763
Location
.at
a user of audiorace reported a problem, when being at the startscreen and then setting the pandora to low power mode and returning back, the application stalls.

can anyone explain what happens to the system when the low power mode gets turned on and how to deal with this especially with opengles applications?

the only thing i was able to track down, was, that also the vsync-wait fails with an ioctl return value of -1 during this; it's only a guess but maybe eglSwapBuffers stalls.

it's pretty hard to debug, because wifi drops - is there a way to keep it up?

thx

*edit*
just to note:
i'm on hotfix 5 rc1
and this also happens to frogatto (so it's not specific to my game)
 
hm, other question ...

where is the power button / low power mode handled ? i took a quick look in the git repository, but didn't find anything (just browsing online).
maybe i could just give it a try and block the switching to the low power mode while in swapbuffers ...
 
http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blob;f=arch/arm/mach-omap2/board-omap3pandora-input.c

this what you searching for?
 
mcobit said:
http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blob;f=arch/arm/mach-omap2/board-omap3pandora-input.c

this what you searching for?

no, sorry.

i want to know where the handler code for the power button resides, the one that shuts down the display, the wifi and clocks the cpu down ...
maybe it's just a script, i dont know :)
 
Last edited by a moderator:
Have a look in /usr/pandora/scripts/op_power.sh

or here: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=blob;f=testdata/scripts/op_power.sh;h=aabc8bd15fa2b8c88f52aa9a9b0437923e3fbd04;hb=558f910df59d2f912cf17f89d261e934f4b71095
 
mcobit said:
Have a look in /usr/pandora/scripts/op_power.sh

or here: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=blob;f=testdata/scripts/op_power.sh;h=aabc8bd15fa2b8c88f52aa9a9b0437923e3fbd04;hb=558f910df59d2f912cf17f89d261e934f4b71095

thanks mate, that's what i was looking for :)

*edit*
so ... SIGSTOP is sent to all running pnds when the low power mode is activated and SIGCONT when it's returning again.
this should be enough to deal with it hopefully :)
 
Last edited by a moderator:
Maybe you can make a new topic when you find a solution, so that anyone can adapt.
 
i've a tested now with a modified op_power.sh script and was able to to track the problem down to

Code:
66     echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank

i've commented this line in the low-power-enabling branch and also the re-enabling version in the low-power-disabling branch, and everything works as expected. there's no stall anymore.
seems that blank thing does some ugly stuff to the gles driver.

i can reproduce the problem with audiorace and frogatto; using my modified version of op_power works fine with both, where using the built-in version just kills both on the first try.

just filed a bug report...
 
continued to investigate...

if you create the gles context using the framebuffer, the freeze is gone and the game restores fine.

is there a way to stop framebuffer fighting between the desktop and any other app?

*sigh*
 
well i love answering my own posts ;-)

the solution to stop framebuffer fighting is to use a black fullscreen window that stays on top of the desktop; seems to work out nice.
but if the framebuffer is used, vsync (fbio_waitforvsync) does not work anymore for me. i get ugly glitches across the screen.
 
ok... another few hours later; as if there wasn't anything funnier than trial+error:

re-initializing the gles context while using x11 after receiving SIGCONT helps sometimes, but not always <_< .

so i guess it has nothing todo with the context per-se.
the problems seems to lie a little deeper, (only guessing) that when the framebuffer gets blanked while eglSwapBuffers is active, the stall happens.

i give up finding a solution. if anyone finds one, let me know!
 
Back
Top