OESF Portables Forum

General Forums => General Discussion => Topic started by: jamesannan on September 13, 2007, 12:20:25 am

Title: Automatic Wake Up When Opened
Post by: jamesannan on September 13, 2007, 12:20:25 am
Is there an easy way (or even a difficult way) to achieve this on the 3100 (Sharp ROM)? Since it takes a second or two to wake up fully (ie respond to keystrokes) and I wouldn't open it if I didn't want to switch it on, it would seem logical for it to switch on automatically as on opening (at least, for this to be possible). There's an option for switching off (or not) when closed, after all...

James
Title: Automatic Wake Up When Opened
Post by: Da_Blitz on September 13, 2007, 05:15:48 am
posibly, however as far as i amaware it would need a kernel patch.

i belive the open close screen hindge buttons are connected to the GPIOs rather tahn the keyboard scanning matrix, if it is then it shouldnt be to hard to tell them to cause an interupt on a level change (close open)

funnily enough on my c3000 i can wake up from suspend by pushing one of the round buttons (home calender or one of them) dont know if this is a bug or a feature
Title: Automatic Wake Up When Opened
Post by: Mickeyl on September 15, 2007, 08:03:07 pm
As far as I remember, the GPIO where the hinge is connected to can't be configured as a wake-up source.
Title: Automatic Wake Up When Opened
Post by: speculatrix on September 16, 2007, 05:58:01 pm
Quote
As far as I remember, the GPIO where the hinge is connected to can't be configured as a wake-up source.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=167414\"][{POST_SNAPBACK}][/a][/div]

thanks Mickey, I have wondered about this myself.

so, you could only have resume-on-open by not fully suspending the zaurus and leave kernel running in some slowed-down state to poll, and thereby losing significant battery life
Title: Automatic Wake Up When Opened
Post by: Capn_Fish on September 16, 2007, 07:26:00 pm
On a related note, can you have the device NOT turn on if it is closed (and not suffer battery loss)? I have issues with my C3100 turning on in my pocket, which is quite annoying.
Title: Automatic Wake Up When Opened
Post by: pelrun on September 16, 2007, 11:56:42 pm
It should be pretty trivial to write an /etc/apm/resume.d script which calls chkhinge and resuspends if required, maybe something like this:

Code: [Select]
#!/bin/sh
chkhinge
if [ $? = 3 ]; then
   apm -s
fi
Title: Automatic Wake Up When Opened
Post by: Capn_Fish on September 17, 2007, 07:47:45 am
Awesome. I'll probably need more specific instructions later (never done anything with /etc/apm/resume.d), though.
Title: Automatic Wake Up When Opened
Post by: Capn_Fish on September 17, 2007, 06:51:33 pm
OK, I copied that script, put it in /etc/apm/resume.d, and chmodded it, but it still turns on when the lid is closed (and doesn't resuspend). Do I need to put something in /etc/apm/scripts or something?

Thanks.
Title: Automatic Wake Up When Opened
Post by: Meanie on September 17, 2007, 07:52:33 pm
Quote
OK, I copied that script, put it in /etc/apm/resume.d, and chmodded it, but it still turns on when the lid is closed (and doesn't resuspend). Do I need to put something in /etc/apm/scripts or something?

Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=167465\"][{POST_SNAPBACK}][/a][/div]

that's because the new pdaXrom that you are using no longer supports chkhinge...
Title: Automatic Wake Up When Opened
Post by: Capn_Fish on September 17, 2007, 08:52:47 pm
Quote
Quote
OK, I copied that script, put it in /etc/apm/resume.d, and chmodded it, but it still turns on when the lid is closed (and doesn't resuspend). Do I need to put something in /etc/apm/scripts or something?

Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=167465\"][{POST_SNAPBACK}][/a][/div]

that's because the new pdaXrom that you are using no longer supports chkhinge...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=167467\"][{POST_SNAPBACK}][/a][/div]
No wonder "which chkhinge" returned nothing.

Is there an alternate way to do this?
Title: Automatic Wake Up When Opened
Post by: Da_Blitz on September 20, 2007, 07:34:05 am
dont know if its handy to anyone but i did have a chkhinge script that turns the PDA off when the lid is clesed but not if my music was playing

also have another one to pause the music when you close the lid and suspend (otherwise when i resumed it and had removed the headphones the teded to be a bit of embaressment)