OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio


Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> Anybody Working On Wakeup?, maybe using apmsleep
post Sep 13 2005, 04:49 PM
Post #1

Group: Members
Posts: 20
Joined: 3-February 05
Member No.: 6,399

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?


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)
Go to the top of the page
+Quote Post
post Sep 19 2005, 11:34 AM
Post #2

Group: Members
Posts: 125
Joined: 5-October 04
Member No.: 4,882

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.
Go to the top of the page
+Quote Post
post Sep 25 2005, 04:11 PM
Post #3

Group: Members
Posts: 20
Joined: 3-February 05
Member No.: 6,399


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,


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.
Go to the top of the page
+Quote Post
post Oct 18 2005, 09:00 PM
Post #4

Group: Members
Posts: 92
Joined: 19-November 04
From: here or there.. it changes so often ;-)
Member No.: 5,525


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?

Go to the top of the page
+Quote Post
post Nov 10 2005, 04:53 AM
Post #5

Group: Members
Posts: 1
Joined: 10-November 05
Member No.: 8,507

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..



OpenBSD 3.8 (GENERIC) #149: Sat Sep 10 17:23:43 MDT 2005
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
Go to the top of the page
+Quote Post
post Nov 11 2005, 06:47 PM
Post #6

Group: Members
Posts: 72
Joined: 12-December 04
Member No.: 5,903

QUOTE(mwebb @ Nov 10 2005, 08:53 AM)
Any suggestions welcome..


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 wink.gif
Go to the top of the page
+Quote Post
post Feb 5 2006, 03:53 AM
Post #7

Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928

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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 24th May 2018 - 09:38 AM