Warning: do not use these patches alongside suspend2, since there seem to be unresolved issues with this combination.

New technologies are fine, but sometimes they just give headaches. The harddisk found in the T43p is one such case. It's connected to a SATA controller via a so called SATA-to-PATA bridge, and the problem is that powermanagement and suspend-to-RAM is not working with stock kernels from kernel.org, at least not with the currently latest version 2.6.14.

But, after reading and re-reading the page about the topic in the ThinkWiki, playing around with different combinations of patches and following bits of the discussion in the LKML and linux-ide archives, at last I got the whole thing working. But of course this is rather unsafe territory and I give no warranty whatsoever that it works for you or that there will be no loss of data, so continue at your own risk.

Used Patches

Kernel 2.6.14:

  • from this LKML posting I got the suspend-to-RAM patch, and even though there seems to be a competing implementation this one "works for me". Use the "Get diff 1" link in the menu on the left to get the patch in proper text-only format.
  • from http://rtr.ca/dell_i9300/kernel/kernel-2.6.13/ I downloaded 02_libata_passthru.patch and 03_libata_passthru_bugfix.patch so I can use hdparm and the smartmontools needed for setting powersaving parameters among other things. 02_libata_passthru.patch does not apply cleanly since a couple of things are already in the suspend-to-RAM patch from above, so I updated it and it's attached below.

In the root directory of the kernel source, apply the patches in the following order:

patch -p1 < /path/to/downloaded/suspend-to-ram-from-lkml.patch
patch -p1 < /path/to/downloaded/02_libata_passthru.fixed.patch
patch -p1 < /path/to/downloaded/03_libata_passthru_bugfix.patch

Kernel 2.6.15:

Kernl 2.6.16:

  • no more patches are needed, both a self-compiled kernel and the current kernel package in Debian unstable (linux-image-2.6.16-1-686) have no problems regarding the harddisk.

If necessary, recompile and install the kernel as shown in the kernel configuration page.

After booting into the new kernel, commands like

hdparm -I /dev/sda

to show information about the drive or

hdparm -y /dev/sda

to spin down the harddisk should work. (the -i option does not, interestingly enough)

Once that works it's time to configure suspend-to-RAM or start using the Laptop Mode Tools.

Warning: once while using the Laptop Mode Tools I had problems similar to the ones outlined in this Debian bug report, so I disabled powermanagement for the moment setting CONTROL_HD_POWERMGMT=0 in laptop-mode.conf. Also, I'm not running smartd from the smartmontools since I guess that could also lead to problems.
File 02_libata_passthru.fixed.patch20.93 KB



Anonymous's picture

I've got a question about your sata_pm patch. I tryed to patch my 2.6.16 kernel with p0 and p1 but it doesn't work. Do you know why? (I also tryed with hdaps_protect patch from wiki but same result)

Wolfgang Karall-Ahlborn's picture

no patch for SATA power management should be needed any longer, at least the release candidates did have the patch included already (also see the ThinkWiki page about SATA problems). I'm still using 2.6.15.x because I didn't have time to fiddle around with the notebook, too much work. Smile