[ltp] How to turn your T42p into a brick with ACPI...

Bjørn Mork linux-thinkpad@linux-thinkpad.org
Mon, 11 Apr 2005 10:50:24 +0200


"David A. Desrosiers" <desrod@gnu-designs.com> writes:

>> I don't have a docking station, so I can't help with that, but I 
>> have been using ACPI with my T42p for ages. Suspend works fine. I've 
>> never had anything like the trouble you described.
>
> 	Lets level-set. What are your BIOS versions and EC versions? 

suspend-to-ram has been working all the time on my T42 too.  Resuming
used to require a radeon work-around (and maybe still does? - haven't
tested without it): acpi_sleep=s3_bios on the kernel command line (in
/etc/lilo.conf or similar grub config)

My current BIOS and EC versions are:

obelix:/tmp# dmidecode 
# dmidecode 2.6
SMBIOS 2.33 present.
61 structures occupying 2126 bytes.
Table at 0x000E0010.
Handle 0x0000
        DMI type 0, 20 bytes.
        BIOS Information
                Vendor: IBM
                Version: 1RETDHWW (3.13 )
                Release Date: 10/29/2004
                Address: 0xDC000
                Runtime Size: 144 kB
                ROM Size: 1024 kB
[..]
Handle 0x0029
        DMI type 11, 5 bytes.
        OEM Strings
                String 1: IBM ThinkPad Embedded Controller -[1RHT71WW-3.04    ]-


Everything used to work with BIOS 3.12 and EC 3.03 too.  

Although I can't see any relevance to your problem, I'd like to point
out that the swsusp2 patches aren't really necessary to get software
suspend on these laptops.  It's working with the software suspend
driver in the standard kernels (at least with 2.6.9, 2.6.10 and 2.6.11).
I'm currently using an unpatched 2.6.11 kernel with this PM config:

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION="/dev/hda7"

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
CONFIG_ACPI_IBM=m
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM is not set



and this kernel command line:

obelix:/tmp# cat /proc/cmdline 
auto BOOT_IMAGE=Linux ro root=305 resume=/dev/hda7 acpi_sleep=s3_bios


and both suspend-to-ram and software suspend works flawlessly, even
though I'm skipping all the recommended module unloading:

obelix:/tmp# cat /etc/acpi/suspend.sh 
#!/bin/sh
# $Id: suspend.sh,v 1.1 2005/01/21 19:04:18 bjorn Exp $

echo "ACPI: Suspending to RAM"

# save system clock to hardware clock
/etc/init.d/hwclock.sh stop

sync

echo -n mem > /sys/power/state

/etc/init.d/hwclock.sh start

# ac power status may have changed while we were offline...
if [ -x /usr/sbin/laptop_mode ]; then
  /usr/sbin/laptop_mode auto
fi

echo "ACPI: Resuming from RAM"


obelix:/tmp# cat /etc/acpi/hibernate.sh 
#!/bin/sh
# $Id: hibernate.sh,v 1.3 2005/01/07 07:38:40 bjorn Exp $

echo "ACPI: Suspending to disk"

# save system clock to hardware clock
/etc/init.d/hwclock.sh stop

sync

echo -n disk > /sys/power/state

/etc/init.d/hwclock.sh start

# ac power status may have changed while we were offline...
if [ -x /usr/sbin/laptop_mode ]; then
  /usr/sbin/laptop_mode auto
fi

echo "ACPI: Resuming from disk"



This all works with this list of loaded modules:

obelix:/tmp# lsmod
Module                  Size  Used by
snd_pcm_oss            48416  0 
ibm_acpi               28416  0 
ntfs                  105712  0 
usbhid                 32896  0 
nls_cp437               5440  2 
smbfs                  62328  0 
ipt_conntrack           2112  0 
ipt_limit               1920  0 
ipt_REJECT              5568  1 
iptable_nat            19804  0 
ip_conntrack           38168  2 ipt_conntrack,iptable_nat
iptable_filter          2304  1 
ip_tables              18496  5 ipt_conntrack,ipt_limit,ipt_REJECT,iptable_nat,iptable_filter
nsc_ircc               18812  0 
ppp_async               9088  0 
ppp_generic            24468  1 ppp_async
slhc                    6528  1 ppp_generic
ircomm_tty             34632  0 
ircomm                 19396  1 ircomm_tty
rfcomm                 34524  0 
l2cap                  20740  5 rfcomm
bluetooth              42564  2 rfcomm,l2cap
pcmcia                 18824  4 
binfmt_misc             8776  1 
evdev                   7488  1 
irtty_sir               7552  0 
sir_dev                15148  1 irtty_sir
irda                  185724  5 nsc_ircc,ircomm_tty,ircomm,irtty_sir,sir_dev
crc_ccitt               1792  2 ppp_async,irda
rtc                     9656  0 
yenta_socket           20104  2 
rsrc_nonstatic          9216  1 yenta_socket
pcmcia_core            41716  3 pcmcia,yenta_socket,rsrc_nonstatic
snd_intel8x0m          15108  2 
snd_intel8x0           28672  0 
snd_ac97_codec         75000  2 snd_intel8x0m,snd_intel8x0
snd_pcm                81032  6 snd_pcm_oss,snd_intel8x0m,snd_intel8x0,snd_ac97_codec
snd_timer              20356  1 snd_pcm
snd_page_alloc          7684  3 snd_intel8x0m,snd_intel8x0,snd_pcm
hw_random               4372  0 
ehci_hcd               30664  0 
uhci_hcd               29520  0 
usbcore               107576  4 usbhid,ehci_hcd,uhci_hcd
ath_pci                53344  0 
ath_rate_onoe           6856  1 ath_pci
wlan                  107868  3 ath_pci,ath_rate_onoe
ath_hal               146512  2 ath_pci
snd_mixer_oss          17600  1 snd_pcm_oss
snd                    45796  9 snd_pcm_oss,snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer,snd_mixer_oss
soundcore               7008  1 snd
radeon                 75648  0 
drm                    59220  1 radeon
nvram                   7048  1 
ide_cd                 37956  0 
cdrom                  38496  1 ide_cd


Although it should be noted that there are some problems with power
management and nsc_ircc (The IrDA FIR driver). I just don't care about
IrDA at the moment.  The rest of the drivers works after resuming,
giving a nice uptime for a laptop that is moved around all the time:

obelix:/tmp# uptime
 10:48:47 up 34 days, 18:46, 13 users,  load average: 0.00, 0.02, 0.00



Bjørn