[ltp] T42p + acpi + suspend

hutch@midwales.com linux-thinkpad@linux-thinkpad.org
Wed, 27 Apr 2005 17:31:05 +0100


On Wednesday 27 Apr 2005 11:20, Jacek Wuwer wrote:
> Since I have upgraded my laptop to t42p (2373-P2U) I have been
> struggling to use all its features under Debian sarge. Recently
> I had some time and wanted to get suspend to work with acpi (as
> id did work on my previous T30 with APM).
> After significant googling around I have targetted 2.6.10 (with
> Debian patches) and software suspend2. I thought it would be
> resonable to start with suspend-to-ram have installed ibm-acpi
> configured scrips, added "pci=noacpi acpi_sleep=s3_bios" to
> grub conf. used radeon tool, etc.
> My T42p happily enters S3, but upon resume I'm getting flood
> of:
>
> had: task_out_intr: status=0x51 {DriveReady SeekComplete Error}
>      task_out_intr: error=0x04 {Drive Status Error}
>
> Only cold reboot helps at this point.
>
> Does anyone experienced this error ? - or - have any idea where
> it comes from and how to work around it ? It's independent from
> X (I'm using VESA for now).
>
> On the other front I have tried hiberate script 1.06, but since
> I had troubles patching my kernel source with
> software-suspend-2.1.7-for-2.6.10 (due to Debian patches I
> guess) I could not enter S4. I probably need to start with
> fresh sources from kernel.org. Has anyone got hibernate working
> on Debian 2.6.10 kernel ?

Yes, I have.
http://packages.debian.org/unstable/base/kernel-image-2.6.10-1-386
http://packages.debian.org/unstable/devel/kernel-source-2.6.10

installed both with
dpkg -i kernel-image-2.6.10-1-386_2.6.10-6_i386.deb
dpkg -i kernel-source-2.6.10_2.6.10-6_all.deb

booted into the new kernel
unpacked /usr/src/kernel-source-2.6.10.tar.bz2
made a link
ln -s /usr/src/kernel-source-2.6.10 /usr/src/linux

went into the Makefile and added the date to EXTRAVERSION in the form of 
yyyymmdd

made a little script

#!/bin/sh
rev="10.01.Custom"
cd /usr/src/linux
make menuconfig    # just accept the defaults for now
make-kpkg --initrd --revision $rev --added-patches suspend2 buildpackage

then install the new kernel-image with dpkg -i
boot into the new kernel, and if it runs

install the new source as well
point /usr/src/linux to it
cd /usr/src/linux
make menuconfg
make

This opens up the source so that you can install ipw2200-1.0.3 and 
ibm-acpi-0.11. Read the README and INSTALL files

This kernel comes with ibm-acpi-0.8 but the more recent 0.11 is better

reboot into the custom kernel
check that /proc/acpi/ibm exist
ls -l /proc/acpi/ibm

cat /proc/acpi/ibm/hotkey
echo enable > /proc/acpi/ibm/hotkey

this enables Fn keys, although some of them already work

next have a good look at /etc/hibernate and /etc/acpi
hibernate.conf handles 'hibernate' key Fn F12
edit it according to the comments, there are 3 different configs, I am using 
suspend2. 

UseSwsusp2 yes
Reboot no
EnableEscape yes
defaultConsoleLevel 1
suspendDevice swap:dev/hda5    # edit to match

in global set 
SaveClock yes
Loadmodules auto
DownInterfaces auto
UpInterfaces auto
SwitchToTextMode yes
LogVerbosity 4
and set where the log goes


/etc/hibernate/sleep.conf handles sleep mode Fn F4
UseACPISleep 3

same global settings as above except
OnResume 20 /etc/acpi/actions/battery.sh   # still playing with this

UseSysfsPowerState mem works as well


Fn F3 runs /etc/acpi/actions/blank.sh

I added Option "dpms" to the "Monitor" section in /etc/X11/XF86Config-4

Not working for me yet, dpms does not appear to be supported using xset, 
although RADEON swallows it happily, or says it does in dmesg.

I also added ibm-acpi and synaptics to /etc/modules
ibm-synaptics is a debian package, it made the touchpad work a lot better

Of the 3, sleep mode works well, though I'm still testing, especially on 
battery.

hibernate mode is still temperamental, works when on AC but crashes on battery

I have also installed ifplugd and am monitoring what it does

TODOs
try the different settings, especially suspend2, working on the presumption 
that it has been written to make up for inadequacies in the other 2

find a way to put the screen to bed, not just screensaver
ditto wifi, especially when on battery. probably means removing the ipw2200 
module with modprobe -r

Let the list know how it goes ;-)

HTH

-- 

-----------------------------------------------------------------
R. R. Hutchinson
Midwales dot com
web: http://midwales.com
email: hutch@midwales.com
phone: 0 (44) 1686 412144

This email has been scanned for Viruses by http://efe.me.uk,
a service provided by Midwales dot com.
-----------------------------------------------------------------