Re: apm doesn't sleep/suspend desktop

2008-01-18 Thread Jan Stary
On Dec 11 00:30:15, Chris Zakelj wrote:
 Curious problem here, though I'm probably missing something obvious.  I 
 have apm enabled through /etc/rc.conf.local (apmd_flags=), and when I 
 issue 'shutdown -h -p now', the system powers off correctly.  However, 
 if I try to use sleep or suspend ('apm -S' or 'apm -z'), the system acts 
 like it's going to power down, blinks the monitor momentarily, then 
 wakes right back up like nothing ever happened.  Where to look next?
 
 # dmesg
 OpenBSD 4.2-stable (GENERIC) #0: Fri Dec  7 23:23:20 EST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
 cpu0: AMD Opteron(tm) Processor 154  (AuthenticAMD 686-class, 1024KB 
 L2 cache) 2.82 GHz
 cpu0: 
 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3
 cpu0: AMD erratum 89 present, BIOS upgrade may be required
 real mem  = 535261184 (510MB)
 avail mem = 509927424 (486MB)
 mainbus0 at root
 bios0 at mainbus0: AT/286+ BIOS, date 05/30/06, BIOS32 rev. 0 @ 0xfa850, 
 SMBIOS rev. 2.2 @ 0xf (39 entries)
 bios0: vendor Phoenix Technologies, LTD version 6.00 PG date 05/30/2006
 bios0: http://www.abit.com.tw/ KN8 Series(NF-CK804)
 apm0 at bios0: Power Management spec V1.2
 apm0: AC on, battery charge unknown
 apm0: flags 70102 dobusy 1 doidle 1

What is flags 070102?
apm(4) says the low two bytes are the V1.2 spec,
but only mentions 0x1 (disable interrupts during APM BIOS calls)
and 0x2 (alter battery life estimations). What is 0x4?

Jan



Re: apm doesn't sleep/suspend desktop

2007-12-11 Thread Nick Guenther
On 12/11/07, Chris Zakelj [EMAIL PROTECTED] wrote:
 Nick Guenther wrote:
  On Dec 11, 2007 12:30 AM, Chris Zakelj [EMAIL PROTECTED] wrote:
 
  Curious problem here, though I'm probably missing something obvious.  I
  have apm enabled through /etc/rc.conf.local (apmd_flags=), and when I
  issue 'shutdown -h -p now', the system powers off correctly.  However,
  if I try to use sleep or suspend ('apm -S' or 'apm -z'), the system acts
  like it's going to power down, blinks the monitor momentarily, then
  wakes right back up like nothing ever happened.  Where to look next?
 
  Run apmd with -d?
 
  -Nick
 No luck.  Running apmd_flags=-d results in

 ===
 starting local daemons: smbd nmbd mysqld.
 standard daemons: apmdStarting mysqld daemon with databases from
 /var/www/var/mysql
 (things hang here...)
 ^C cron.
 Tue Dec 11 21:35:42 EST 2007

 OpenBSD/i386 (imhotep.***.dyndns.org) (ttyC0)
 ===

 Worthy of note is that when I run apmd_flags=, I do not get the
 Starting mysql... message in the boot messages, but the server does
 start correctly, and the boot proceeds normally.


h, sorry. I thought you'd check the manpage before trying it. -d
makes it run 'do not detach'|'debug'. I meant, don't start it at boot,
but instead run it from a terminal, and watch it's debug messages.

As for mysql... no clue. Seems like one thing is stepping on another thing.

-Nick



Re: apm doesn't sleep/suspend desktop

2007-12-11 Thread Chris Zakelj

Nick Guenther wrote:

On Dec 11, 2007 12:30 AM, Chris Zakelj [EMAIL PROTECTED] wrote:
  

Curious problem here, though I'm probably missing something obvious.  I
have apm enabled through /etc/rc.conf.local (apmd_flags=), and when I
issue 'shutdown -h -p now', the system powers off correctly.  However,
if I try to use sleep or suspend ('apm -S' or 'apm -z'), the system acts
like it's going to power down, blinks the monitor momentarily, then
wakes right back up like nothing ever happened.  Where to look next?


Run apmd with -d?

-Nick

No luck.  Running apmd_flags=-d results in

===
starting local daemons: smbd nmbd mysqld.
standard daemons: apmdStarting mysqld daemon with databases from 
/var/www/var/mysql

(things hang here...)
^C cron.
Tue Dec 11 21:35:42 EST 2007

OpenBSD/i386 (imhotep.***.dyndns.org) (ttyC0)
===

Worthy of note is that when I run apmd_flags=, I do not get the 
Starting mysql... message in the boot messages, but the server does 
start correctly, and the boot proceeds normally.




Re: apm doesn't sleep/suspend desktop

2007-12-11 Thread Chris Zakelj

Nick Guenther wrote:

On 12/11/07, Chris Zakelj [EMAIL PROTECTED] wrote:
  

Nick Guenther wrote:


On Dec 11, 2007 12:30 AM, Chris Zakelj [EMAIL PROTECTED] wrote:

  

Curious problem here, though I'm probably missing something obvious.  I
have apm enabled through /etc/rc.conf.local (apmd_flags=), and when I
issue 'shutdown -h -p now', the system powers off correctly.  However,
if I try to use sleep or suspend ('apm -S' or 'apm -z'), the system acts
like it's going to power down, blinks the monitor momentarily, then
wakes right back up like nothing ever happened.  Where to look next?


Run apmd with -d?

-Nick
  

No luck.  Running apmd_flags=-d results in

===
starting local daemons: smbd nmbd mysqld.
standard daemons: apmdStarting mysqld daemon with databases from
/var/www/var/mysql
(things hang here...)
^C cron.
Tue Dec 11 21:35:42 EST 2007

OpenBSD/i386 (imhotep.***.dyndns.org) (ttyC0)
===

Worthy of note is that when I run apmd_flags=, I do not get the
Starting mysql... message in the boot messages, but the server does
start correctly, and the boot proceeds normally.


h, sorry. I thought you'd check the manpage before trying it. -d
makes it run 'do not detach'|'debug'. I meant, don't start it at boot,
but instead run it from a terminal, and watch it's debug messages.

As for mysql... no clue. Seems like one thing is stepping on another thing.

-Nick
Did read, just wasn't expecting that behavior (noob thing on my part).  
Anyways, here's what I get now...

(ttyC0)
# tail -f /var/log/messages 
 (boot remnants)

(ttyC1)
# apmd -d
 (silence)
(ttyC0)
Dec 11 22:34:00 imhotep apmd: battery status: unknown. external power 
status: connected. estimated battery live 0%

# apm -S
System will enter standby mode momentarily.  (blink)
# Dec 11 22:35:02 imhotep apmd: system resumed from APM sleep
apm -z
System will enter suspend mode momentarily.  (blink)
# Dec 11 22:35:43 imhotep apmd: system resumed from APM sleep
_

Seems to me like something is waking it up as soon as it goes into sleep 
mode.  Could I have something in the BIOS messed up or otherwise causing 
a wake-up signal too early?