Author Topic: Anybody Working On Wakeup?  (Read 5814 times)

develd

  • Newbie
  • *
  • Posts: 20
    • View Profile
Anybody Working On Wakeup?
« on: September 13, 2005, 08:49:20 pm »
Hi users,

is anybody allready working on a wakeup solution for OpenBSD on a Zaurus?

I've just read the pdaXrom thread:

Ko/pi Alarm Applet Needed

They suggest to grep the next at event (maybe checking cron would be nice too) and then do an apmsleep till some seconds before this event.

I couldn't find apmsleep nor apm in the ports tree. It's must be in a system package.

When holding the power button for some seconds the Zaurus fell into sleep. It seems to be a kernel thing because it's still functioning with a moved /usr/sbin/apm. So how to use apmsleep for this? Any suggestions?

  Oliver

PS: My snapshot installation of 3.8beta from 09/02 is working like a charm on a C3100. Growing up the system from the ports tree is much of fun.

PPS: If you like working on a console - try ratpoison! Why loosing 5% of the tiny screen for titlebars and a panel?  (thanks barryg for this suggestion on your website)

obscurite

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Anybody Working On Wakeup?
« Reply #1 on: September 19, 2005, 03:34:10 pm »
I'm pretty sure apmsleep is just zzz or apm -S on openbsd, but I could be wrong. There's a thread somewhere on oesf about hardware support for a timer for wakeups, if you're curious.
« Last Edit: September 19, 2005, 03:34:52 pm by obscurite »
C3100, 5500, former C860 owner

develd

  • Newbie
  • *
  • Posts: 20
    • View Profile
Anybody Working On Wakeup?
« Reply #2 on: September 25, 2005, 08:11:22 pm »
Hi,

till now I've just viewed the source of apm.c for Linux and apm.c for OpenBSD and realized major differences. The only source of apmsleep.c I found, is based on apm for Linux.

Oh, oh, big work waiting for me? I'll go into deep with this next month, when having some spare time. But I can't promise anything - my experiences with C are years ago and my kernel knowledge is 'make ...' if everything is prepared.

  Kind regards,

  Oliver

PS@obscurite: 'apm -S' is light suspend and zzz is a synonym for 'apm -z' - deep suspend. Nothing deals with wakeup times, but thanks anyway.

darkloran

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://freeloran.free.fr/zaurus.html
Anybody Working On Wakeup?
« Reply #3 on: October 19, 2005, 01:00:01 am »
Hello,

talking of apm -z and zzz, the date (clock) often stays where/when i suspended my Z other than going on... example : i use zzz in the morning at 6:12am, when i wake up my Z at evening 7pm, the date is still 6:12am. It's not really useful for crontab.

And as i'm using my Z to wake up in the morning, i've got to let it plugged on AC power and running to be sure it wakes me up !

Has someone got the same problem? any idea how to correct this?

Loran
SL-C3000 -- Cacko1.23b1
CE-RH2 remote / Belkin usblan / Asus WL-110 / Sandisk SD UII 256MB / Sandisk CF UII 1GB
STOREX OTG Club 40GB / Belkin IR Keyboard / Logitech mouse

mwebb

  • Newbie
  • *
  • Posts: 1
    • View Profile
Anybody Working On Wakeup?
« Reply #4 on: November 10, 2005, 07:53:14 am »
How do you get the resume to happen?
I do the apm -S and it sleeps - but it's the sleep of the dead.

sudo apm -S
System will enter standby mode momentarily.

That's the last I see..  Power on button does nothing. I end up having to take the battery out to get the Z to respond again.

The only odd thing that I'm doing is running openBSD off a compact flash card.

One partition for /, one for swap.  at the boot prompt, I have to change the root to /wd1a from the default of wd0a  at boot - haven't worked out how to to avoid this yet.. (read OpenBSD newbie)
My thought is that the apm stuff is looking for root on wd0a on the resume - and that fails so nothing happens...

Any suggestions welcome..

Thanks

M

dmesg
OpenBSD 3.8 (GENERIC) #149: Sat Sep 10 17:23:43 MDT 2005
    deraadt@zaurus.openbsd.org:/usr/src/sys/arch/zaurus/compile/GENERIC
real mem  = 67108864 (65536K)
avail mem = 53383168 (52132K)
using 844 buffers containing 3457024 bytes (3376K) of memory
mainbus0 (root)
cpu0 at mainbus0: PXA27x rev 4 (XScale core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 32KB(32b/l,32way) I-cache, 32KB(32b/l,32way) wr-back-lock D-cache
pxaip0 at mainbus0: CPU clock = 415.999 MHz
pxaintc0 at pxaip0 addr 0x40d00000: Interrupt Controller
pxagpio0 at pxaip0 addr 0x40e00000: GPIO Controller
pxadmac0 at pxaip0 addr 0x40000000 intr 25: DMA Controller
saost0 at pxaip0 addr 0x40a00000
saost0: SA-11x0 OS Timer
com0 at pxaip0 addr 0x40100000 intr 22: pxa2x0, 32 byte fifo
com1 at pxaip0 addr 0x40200000 intr 21: pxa2x0, 32 byte fifo
com2 at pxaip0 addr 0x40700000 intr 20: pxa2x0, 32 byte fifo (SIR)
pxaudc0 at pxaip0: USB Device Controller
ohci0 at pxaip0, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: PXA27x OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
lcd_pxaip0 at pxaip0
wsdisplay0 at lcd_pxaip0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1 added (std, vt100 emulation)
zkbd0 at pxaip0
wskbd0 at zkbd0: console keyboard, using wsdisplay0
scoop0 at pxaip0: PCMCIA/GPIO controller
scoop1 at pxaip0: PCMCIA/GPIO controller
pxapcic0 at pxaip0: 2 slots
pcmcia0 at pxapcic0
pcmcia1 at pxapcic0
zssp0 at pxaip0
apm0 at pxaip0
zts0 at pxaip0
wsmouse0 at zts0 mux 0
zaudio0 at pxaip0: I2C, I2S, WM8750 Audio
audio0 at zaudio0
clock: hz=100 stathz=64
wdc0 at pcmcia0 function 0 "HITACHI, microdrive" port 0x0/16: irq 138
wd0 at wdc0 channel 0 drive 0: <HMS360404D5CF00>
wd0: 32-sector PIO, LBA, 3906MB, 7999488 sectors
wd0(wdc0:0:0): using BIOS timings
wdc1 at pcmcia1 function 0 "1GB,  " port 0x0/16: irq 137
wd1 at wdc1 channel 0 drive 0: <Flash Card>
wd1: 1-sector PIO, LBA, 999MB, 2046240 sectors
wd1(wdc1:0:0): using BIOS timings
aue0 at uhub0 port 2
aue0: SMC, Inc USB Ethernet Adapter, rev 1.10/1.01, addr 2
aue0: address 00:04:e2:89:63:8e
acphy0 at aue0 phy 1: AC_UNKNOWN 10/100 PHY, rev. 0
boot_file: 'bsd'
boot device: wd0.
root device (default wd0a): wd1a
swap device (default wd1b):
root on wd1a
rootdev=0x1010 rrootdev=0x1010 rawdev=0x1012
WARNING: using filesystem date -- CHECK AND RESET THE DATE!
aue0: 1 usb errors on intr: IOERROR
aue0: 1 usb errors on intr: IOERROR
aue0: 1 usb errors on intr: IOERROR
# date
Thu Nov 10 01:14:56 EST 2005

Sequethin

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Anybody Working On Wakeup?
« Reply #5 on: November 11, 2005, 09:47:50 pm »
Quote
Any suggestions welcome..

Thanks

What I've been doing to work around the time lapses is just run ntpd -s whenever I get to the Internet. Since I normally use the zaurus where that's possible, it hasn't been too much of a problem. It is annoying though

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Anybody Working On Wakeup?
« Reply #6 on: February 05, 2006, 06:53:32 am »
I took a trawl through the OpenBSD kernel source and found that the pxa stuff does actually have rtc_alarm stuff built in, however, this seems to only be being used for debugging apm at the moment and there's no interface from 'userland' down to that stuff.

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card