OpenPandora Main OS

Notice: Undefined index: tasklist_type in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/includes/class.tpl.php(136) : eval()'d code on line 228 Notice: Undefined index: tasklist_type in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/includes/class.tpl.php(136) : eval()'d code on line 233
  • Status Closed
  • Percent Complete
    100%
  • Task Type Feature Request
  • Category Core
  • Operating System Release 1 (Zaxxon)
  • Severity Medium
  • Reported Version Hotfix 5
Attached to Project: OpenPandora Main OS
Opened by T4b - 2011-06-21
Last edited by Michael Mrozek - 2011-11-12

FS#234 - Changeable behaviour when closing the lid

Tags:

As it was requested on forum.gp2x.de and I think it's a good idea I've written some scripts to allow the user to change what happens when the lid is opened/closed. There are 3 Settings: -The old behaviour (turning off the screen) -Go into low power mode -Shutdown Default behaviour is still the same: Turn the screen off. Maybe we could change this to low power mode? I don't know. I made a lot of changes to op_lid.sh: http://pastebin.com/GT3qxWSx (diff: http://pastebin.com/Z8GwpDj8 ) I changed line 11 in op_power.sh to: if [ $powerstate -ne 0 ]; then And wrote a gui for changing the setting using zenity: http://pastebin.com/9JvSTqfQ (I still can't upload any files, don't know if it's the fault of my browser, that's why I use this paste service)
Closed by  Michael Mrozek
Saturday, 12 November 2011, 01:35 GMT
Reason for closing:  Implemented
T4b

Tuesday, 21 June 2011, 23:29 GMT
After a longer bit of testing it sometimes awoke from low power mode when it shouldn't and other strange stuff. Somewhere there must be a bug. Will search it tomorrow.
T4b

Wednesday, 22 June 2011, 06:22 GMT
Can't find a bug though, I think the reason is not directly in the parts I changed - I don't know how my code should check if the lid was closed a long time and then, if it was, go directly back into low power mode after waking up. Is there some code which should bring it into low power mode after it's not been used for a while? This code would maybe wake it up instead because I write 2 into /tmp/powerstate and not 1, so it doesn't wake up from low power mode when opening/closing the lid if it went into it because of the power button.
T4b

Wednesday, 22 June 2011, 07:51 GMT
Hmm, my Pandora just went into low power mode without me closing the lid or pushing the power button. Now I only need to know where this code is.
T4b

Tuesday, 05 July 2011, 15:29 GMT
Please just revert the changes until I find time to rewrite some stuff so this works (it doesn't at the moment because after some time of inactivity the same script is called as when the lid is closed and there is no way to tell what just happened). I have to admit I'm just too lazy right now, it wouldn't be that much work. Maybe at the weekend. Or sooner. Or later.
T4b

Sunday, 11 September 2011, 08:30 GMT
Done, only need to post it (this will take me at /least/ another few months ^^ ). At the moment it still behaves a bit strangely because of the screensaver (when it is activated you need to close the lid and open it again to wake the Pandora up), but else it all works fine.
T4b

Monday, 12 September 2011, 17:12 GMT
Okay, here is the diff: http://pastebin.com/UtjjpR1F (I still can't upload anything here) There is still some stuff which I would like to change (there is some really dirty stuff in it right now), but then I need to change some other stuff than only this scripts and this is a but harder for me (I'll try).
T4b

Monday, 26 September 2011, 17:18 GMT
I don't know how I could be so stupid not to notice that before posting (or at least a few minute later), but there are 3 little mistakes in op_power.sh which prevent it from working: Line 9: remove the $ at the beginning of the line Between line 146 and 147: add ";;" Between line 161 and 162: add ";;"

Loading...


Notice: Undefined variable: effort in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/includes/class.tpl.php(136) : eval()'d code on line 18 Notice: Trying to get property of non-object in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/includes/class.tpl.php(136) : eval()'d code on line 18 Warning: Invalid argument supplied for foreach() in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/includes/class.tpl.php(136) : eval()'d code on line 18
Date User Effort (H:M)