Author Topic: Automatic Wake Up When Opened  (Read 4041 times)

jamesannan

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Automatic Wake Up When Opened
« 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

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Automatic Wake Up When Opened
« Reply #1 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
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Automatic Wake Up When Opened
« Reply #2 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.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Automatic Wake Up When Opened
« Reply #3 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
« Last Edit: September 16, 2007, 05:58:38 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Automatic Wake Up When Opened
« Reply #4 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Automatic Wake Up When Opened
« Reply #5 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
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Automatic Wake Up When Opened
« Reply #6 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Automatic Wake Up When Opened
« Reply #7 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Automatic Wake Up When Opened
« Reply #8 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...
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Automatic Wake Up When Opened
« Reply #9 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?
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Automatic Wake Up When Opened
« Reply #10 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)
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware