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

Theodore Tso linux-thinkpad@linux-thinkpad.org
Tue, 7 Jul 2009 18:20:17 -0400

On Tue, Jul 07, 2009 at 05:58:33PM -0300, Henrique de Moraes Holschuh wrote:
> > 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?

I'd been a while, but I'm pretty sure it affects both inserting and
ejecting the Ultrabay as well as docking and undocking the media slice
on an X61s.  One of the things I should try doing is to do dock/undock
with the ultrabay slot empty; that might help localize the cause of
the resume failure.

> 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... :)

Well how about a large number of confusing messages (something about
unable to open file descriptor 63) each time you issue you an LVM
command?  :-)

It is possible to clear it by doing a vgchange -an, followed by a
vgchange -ay, but until you do that, it will keep complaining each
time you issue a command such as "lvs" or "pvs".  Ideally, if none of
the devices were actually in use, it should just print one warning
message and then be done with it, but that's a very minor annoying
compared with the problem with suspend/resume.  Fortunately with an
SSD a reboot takes not very long, so if I've ever docked or undocked I
just grin and bear it and just halt the system instead of suspending
the next time I need to unplug from the AC and move from point A to B.

						- Ted