Notice: Trying to access array offset on value of type bool in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/scripts/details.php on line 649 FS#234 : Changeable behaviour when closing the lid

OpenPandora Main OS

  • 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 - 21.06.2011
Last edited by Michael Mrozek - 12.11.2011

FS#234 - Changeable behaviour when closing the lid

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
12.11.2011 01:35
Reason for closing:  Implemented
T4b commented on 21.06.2011 23:29
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 commented on 22.06.2011 06:22
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 commented on 22.06.2011 07:51
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 commented on 05.07.2011 15:29
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 commented on 11.09.2011 08:30
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 commented on 12.09.2011 17:12
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 commented on 26.09.2011 17:18
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...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing