[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

APM de-hibernation not always succeeds



Hello!

The problem has been reported before, but AFAIK no solutions to it have
been found.

I have a SIS630-based Mitac 7521 with a Phoenix BIOS and a correctly
configured hibernation partition.

If I hit the Fn+F12 hibernation sequence, the laptop goes through its
BIOS hibernation procedure with its nice progress status bars and the
laptop correctly shuts down.  When I power it up again, it goes through
de-hibernation and linux comes up again, executes its /etc/apm/event.d
scripts and often keyboard and mouse remain locked.

Kernel is 2.4.15, but it happened with any 2.4 kernel I've tried.
Here's the APM-related kernel .config:

CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
CONFIG_APM_CPU_IDLE=y
CONFIG_APM_DISPLAY_BLANK=y
CONFIG_APM_RTC_IS_GMT=y
CONFIG_APM_ALLOW_INTS=y
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

The problem shows up even if I disable CONFIG_APM_ALLOW_INTS.  In fact
it seems to have no effect.

Here's what's on console during a hibernation-dehibernation cycle:

H mitac:~# usb-ohci.c: USB suspend: usb-00:01.2
D usb-ohci.c: USB restart: usb-00:01.2
D usb.c: USB disconnect on device 1
D hub.c: USB hub found
D hub.c: 3 ports detected
D sis900.c: v1.08.01  9/25/2001
D PCI: Found IRQ 11 for device 00:09.0
D PCI: Sharing IRQ 11 with 00:01.6
D eth0: SiS 900 Internal MII PHY transceiver found at address 1.
D eth0: Using transceiver found at address 1 as default
D eth0: SiS 900 PCI Fast Ethernet at 0x1800, IRQ 11, 00:40:d0:1a:de:3c.
D eth0: Media Link Off
D PCI: Found IRQ 5 for device 00:01.4
D ALSA card-trident.c:192: Trident 4DWave PCI soundcard not found or device busy
D PCI: Found IRQ 5 for device 00:01.4

Lines marked with 'H' appear during hibernation, lines marked with 'D'
appear after de-hibernation.

I added this script at the last one to be executed in /etc/apm/event.d:

#!/bin/sh
exec > /root/hibernate.log 2>&1
echo "`date`: APM event $*"
echo "lsmod:"
lsmod
echo "ifconfig:"
ifconfig

Here's its output:

Mon Nov 26 00:57:55 CET 2001: APM event resume suspend
lsmod:
Module                  Size  Used by    Tainted: P 
snd-seq-midi            3328   0  (autoclean) (unused)
snd-synth-trident       7040   0  (autoclean) (unused)
snd-seq-instr           4224   0  (autoclean) [snd-synth-trident]
snd-ainstr-simple       1620   0  (autoclean) [snd-synth-trident]
snd-seq-midi-emul       4416   0  (autoclean) [snd-synth-trident]
snd-seq-oss            22656   0  (unused)
snd-seq-midi-event      2808   0  [snd-seq-midi snd-seq-oss]
snd-seq                37680   2  [snd-seq-midi snd-synth-trident snd-seq-instr snd-seq-midi-emul snd-seq-oss snd-seq-midi-event]
snd-pcm-oss            34784   0  (unused)
snd-mixer-oss           8928   0  [snd-pcm-oss]
snd-card-trident        1728   0 
snd-trident            19520   0  [snd-synth-trident snd-card-trident]
snd-pcm                45472   0  [snd-pcm-oss snd-trident]
snd-timer               9440   0  [snd-seq snd-pcm]
snd-ac97-codec         22688   0  [snd-trident]
snd-util-mem            1232   0  [snd-trident]
snd-mpu401-uart         2544   0  [snd-card-trident snd-trident]
snd-rawmidi            12064   0  [snd-seq-midi snd-mpu401-uart]
snd-seq-device          3808   0  [snd-seq-midi snd-synth-trident snd-seq-oss snd-seq snd-trident snd-rawmidi]
snd                    24232   0  [snd-seq-midi snd-synth-trident snd-seq-instr snd-seq-oss snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-card-trident snd-trident snd-pcm snd-timer snd-ac97-codec snd-util-mem snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore               3556   6  [snd]
sis900                 11300   1 
nfsd                   64736   8  (autoclean)
lockd                  46720   1  (autoclean) [nfsd]
sunrpc                 58068   1  (autoclean) [nfsd lockd]
irtty                   5504   2  (autoclean)
irda                   81132   1  (autoclean) [irtty]
floppy                 45280   0  (autoclean)
serial                 44864   1  (autoclean)
usb-ohci               17728   0  (unused)
hid                    18816   0  (unused)
mousedev                3808   0  (unused)
evdev                   4128   0  (unused)
wacom                   4000   0  (unused)
input                   3360   0  [hid mousedev evdev wacom]
usbcore                48320   1  [usb-ohci hid wacom]
rtc                     5528   0  (autoclean)
ifconfig:
eth0      Link encap:Ethernet  HWaddr 00:40:D0:1A:DE:3C  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:0 (0.0 b)  TX bytes:840 (840.0 b)
          Interrupt:11 Base address:0x1800 

irda0     Link encap:IrLAP  HWaddr 5d:3b:1a:38  
          UP RUNNING NOARP  MTU:2048  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:8 
          RX bytes:0 (0.0 b)  TX bytes:181629 (177.3 Kb)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:63 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4643 (4.5 Kb)  TX bytes:4643 (4.5 Kb)

As you can see, the hibernation event has not been caught by apmd.
I tried manually calling /etc/apm/apmd_proxy suspend user before
hibernating, and putting in /etc/apm/event.d commands to bring down the
network interfaces and remove most modules, but it seems not to have an
influence on the possibility of a freeze after de-hibernation.

Do you have any suggestions on why is this happening, on what could I do
to have reliable hibernation or on what else could I do to further
investigate on the issue?

Short resume of the current status:
 - random de-hibernation console freezes (did not try to access from the
   network)
 - apmd not noticing the hibernation event

Bye, Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico@debian.org>



Reply to: