[ltp] T42p + suspend2 + acpi + hotplug Ultrabay working (fwd)

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Sun, 17 Apr 2005 15:42:41 +0100 (BST)


On Sun, 17 Apr 2005, David A. Desrosiers wrote:

> 	Through much testing this morning, I decided to try to get
> suspend2 working instead of apm. 
>
> 	The results were successful, and my laptop suspends to swap in
> about 2 seconds, and comes back out of suspend in about 4 seconds.
> There is one minor buglet, where my wallpaper in X gets corrupted
> coming out of suspend (24bpp, non-ATI driver), but that's very minor.

Bit confused here - by suspend2 you mean swsusp2?  From the times you
give, it looks to me as if you are still talking about
suspend-to-ram, not swsusp2's suspend-to-disk.  I wish you'd specify
which you meant...

> 	/bin/sync && /bin/sync
> 	/usr/bin/hotswap -c 1 unregister-ide
>
> 	..and the following in my "insert" event:
>
> 	/bin/sleep 2
> 	/bin/sync && /bin/sync
> 	/usr/bin/hotswap -c 1 rescan-ide
>
> 	This worked perfectly, and lets me put my secondary IDE drive
> in the Ultrabay _or_ the DVD/CD drive. There's one problem though, and
> I believe it lies deep in the kernel... once you unregister the IDE
> interface, you lose DMA, and you can't get it back until/unless you
> reboot with a device in the bay that supports DMA. Ugh.

Yes this has been well-document on the linux-kernel list, way back
last year - Alan Cox has some suggestions to fix this but they didn't
work for me.  It might be fixed in the latest kernels - which are you
using?

For me hotswap/idectl/hdparm have all stopped working in swapping my
Ultrabay Slim DVD for a hard drive - haven't had time to
investigate.  They certainly used to work, caveat same problem as
yours with DMA, which is a showstopper.

I suspect kernel version are critical here.

> 	Lastly, keyboard hotkeys, and this is partly where I'm stuck
> at the moment.. I've got the "Back" and "Forward" keys working fine
> via xmodmap, but I can't seem to hook suspend2 into Fn-F12 or suspend
> to RAM (via acpi, potentially deadly on my particular hardware) to
> Fn-F4. Bluetooth (Fn-F5) works (always has, without acpi), Fn-F7 works
> (always has, even without acpi or any event trapping), and the various
> other hotkeys work... except Fn-F4 to suspend to RAM and Fn-F12 to
> hibernate to disk.
>
> 	Anyone know how to do that?

Google ibm-acpi or look it up in the list archives - depending on how
much ACPI you have working - there are examples on how to do just
this in the ibm-acpi distribution tarball.

Honey