[ltp] What are people using for Dock/Undocking scripts for their X60/61's?

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Tue, 7 Jul 2009 17:58:33 -0300


Hi Theodore!

On Tue, 07 Jul 2009, Theodore Tso wrote:

> On Tue, Jul 07, 2009 at 11:55:08AM -0300, Henrique de Moraes Holschuh wrote:
> > Heh, hotunplug of device trees done properly has NOT been around a long time
> > in Linux :-(  Just like resume from suspend to disk done properly still
> > doesn't exist (init the ACPI firmware twice?  No wonder it croaks on so many
> > systems...)
> > 
> > It should work with a very NEW kernel (certainly no older than 2.6.27) if
> > userspace doesn't screw up.  Basically, you need to umount any storage that
> > is in the dock and inside devices in the dock, then tell the notebook to
> > eject the dock writing "1" to the correct node in
> > /sys/bus/platform/devices/dock.*/undock
> 
> This mostly works for me (if you're using LVM you need you use
> vgchange -an to tell LVM to let go of the physical device; it's not
> enough to unmount any filesystems stored on the Ultrabay device);
> however after docking or undocking, suspend-to-ram is broken.  The
> laptop will suspend, but upon resume it will hang and not come back to
> life.
> 
> Annoying, and since the failure is on the resume side, it's darned
> hard to debug.

I can imagine.  Does it affect bays or just the docks?

Also, I hope that nowadays we throw suitably scary messages when a device is
offlined with LVM/mounted stuff still active, and then proceed to clean up
instead of doing Bad Things... :)

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh