Subject: APM problem on i386: Does not wake up properly
To: Current-users <current-users@NetBSD.ORG>
From: Kjetil B. Thomassen <email@example.com>
Date: 10/27/1997 19:50:11
I have an APM problem with my self-compiled current kernel on
my (i386) Compaq LTE 5200 laptop. The sources are from, I believe,
14 September. I booted this from Windows 95 after having hit F8
during boot and disabled everything. The difference between the
GENERIC kernel and mine is:
- BIOSEXTMEM to 39936 (due to 1.2 install floppy boot blocks).
- MAXUSERS to 64
It has a SystemSoft BIOS for OPTI Viper 557/558N 1.01 (2450-59)(Version 05.20)
SystemSoft Plug-n-Play BIOS.
This computer has two PC Card slots and APM. In addition to this
I have a docking station with ed2 in it.
The computer and/or docking station does not have a proper power
switch, but only a soft one that triggers something in the PC.
I then get a dialogue box asking if it is ok to shut down. Then
I press return, and the computer shuts down.
I am afraid I cannot send-pr since I don't have any NetBSD boxes
around with a working sendmail setup.
Now to the problem.
I configured apm0 in my kernel, and started apmd. Everything seemed to
be ok until I restarted from suspend mode (entered with apm -z).
Then I got the following error:
wd0: wdc_ata_start: timeout waiting for drq
The drive kept trying to spin up, but it failed, and this went
on for at least a couple of minutes. The telnet session to the
box hung and nothing happened/could be done in that window.
After a while I got the following error message:
wd0a: soft error (corrected) writing fsbn 125328 of 120208-120217
(wd0 bn 1661520; cn 1648 tn 5 sn 21)
and then the console seemed to work ok again. The telnet session
into it was still hanging.
I tried to kill the man session I had on the telnet session, and
I got the following error message and the console seemed to hang:
/netbsd: ed2: remote transmit DMA failed to complete
Then I got a connection closed by foreign host from the telnet
Trying to reconnect to the box timed out.
Also, the soft power switch didn't work, so I belive this is
a complete hang.
I had to unplug the power.
The apm0 device probes as:
apm0 at mainbus0: Power Management spec V1.1
apm0: battery life expectancy: 50%
apm0: A/C state: on
apm0: battery charge state: high critical
And, that is not the end of the story.
I have now upgraded the BIOS to 7.20, and it looks a bit more
Again I did an apm -z and woke it up again. This time I did not
get the error message from the drive, but it still didn't spin
up correctly. There was an improvement, though. It took less
than a minute for it to spin up.
I also got this error message:
APM nonstandard event code 201
And everything seemed to work.
I did an apm -S, and when that woke up again, I was asked if I
wanted to shut down the computer, so I pressed ESC in order
not to shut down.
Again I had an APM nonstandard event code 201.
I decided to stop there, and did a shutdown -h now.
Here is the result:
vm_fault(0xf88c4300, 0, 1, 0) -> 1
kernel: page fault trap, code=0
Stopped at _pmap_pte+0x16: testb $0x1,0(%edx,%eax,4)
_pmap_pte(f80047b0,f8e29000,0,fb979efc) at _pmap_pte+0x16
_pmap_etner(f80047b0,f8429000,2798000,7,1) at _pmap_enter+0x39
_vm_pager_map_pages(fb979ef8,1,1,1,fb979ef8) at _vm_pager_map_pager+0x145
_vnode_pager_io(f89716c0,fb979ef8,1,1,0) at _vnode_pager_io+0x3e
_vnode_pager_getpage(f8978580,fb979ef8,1,1,f8977500) at _vnode_pager_getpage+0x19
_vm_pager_get_pages(f8978580,fb979ef8,1,1,fb979f54) at _vm_pager_get_pages+0x4a
_vm_pager_get(f8978580,f84086a8,1) at _vm_pager_get+0x14
_vm_fault(f88c4300,1000,1,0) at _vm_fault+0x2af
_trap() at _trap+0x454
--- trap (number 6) ---
On a reboot it said that it was syncing the discs, but seemed
to hang. That is the state I left it in. I will get back to
it later today to check the condition.
So, does anyone have any idea if this is a problem with the BIOS
or with the APM code in NetBSD.
Have there been any changes during the last month or so?
I tried to build a new kernel from sources yesterday, but that
failed. See a separate email about that problem.
I would very much like to try out any ideas you may have.
dmesg available upon request.
Finally, I am sorry I haven't reported this problem before, but
I have been very busy at work, and I have also been on a two week
trip to the USA/Canada.
I hope we can solve this problem during the 1.3 release cycle
as apm is something that is very useful to have.