Re: What are people using for Dock/Undocking scripts for their X60/61's?

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Thomas Hood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Theodore Ts'o wrote in July 2008:

> I'm curious what people have been using for docking/undocking scripts
> for their X60/61 laptops.   I've found the dockutils at:
>
>     http://sourceforge.net/projects/dockutils
>
> to be useful as a starting point, although it hasn't been updated in two
> years and I had to make some changes to support the X61 and because it
> was relying on hal properties that no longer exist.  I also had to add
> an explicit "hdparm -Y" to spin down the disk before undocking it.
>  

I checked this link and it led to http://en.opensuse.org/Dockutils
which, as you say, hasn't been updated since 2007.

Have you found something better in the meantime?
--
Thomas Hood
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Daniel Castro-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/3/5 Thomas Hood <jdthood@...>
Theodore Ts'o wrote in July 2008:
I'm curious what people have been using for docking/undocking scripts
for their X60/61 laptops.   I've found the dockutils at:

   http://sourceforge.net/projects/dockutils

to be useful as a starting point, although it hasn't been updated in two
years and I had to make some changes to support the X61 and because it
was relying on hal properties that no longer exist.  I also had to add
an explicit "hdparm -Y" to spin down the disk before undocking it .
 

I checked this link and it led to http://en.opensuse.org/Dockutils
which, as you say, hasn't been updated since 2007.

Have you found something better in the meantime?
I recently did this tutorial for t61 and t61p. Might help...
http://ubuntuforums.org/showthread.php?t=1076486

--
Thomas Hood
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad




--
________________________

Daniel Castro, M.Sc.
+353 083-318-2058
dancasmo@...
castromd@...
________________________

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by tytso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Mar 05, 2009 at 02:41:50PM +0000, Daniel Castro wrote:
> > I checked this link and it led to http://en.opensuse.org/Dockutils
> > which, as you say, hasn't been updated since 2007.
> >
> > Have you found something better in the meantime?

With the latest bleeding edge kernel and with Ubuntu 8.10, pushing the
request-to-undock button seems to do the trick automatically for me.
I haven't had a chance to track exactly *how* this magic is performed,
since it's missing some pieces that I would like to add.
Specifically, before actually allowing the undock to proceed, I want
to be able to find any filesystems mounted on the hard drive in the
bay, and unmount them, then if LVM is running run "vgchange -an
/dev/<vggroup>" to deactivate the LVM volumes before proceeding with
the mount.

> I recently did this tutorial for t61 and t61p. Might help...
> http://ubuntuforums.org/showthread.php?t=1076486

Am I right?  It *looks* like your scripts run after the laptop is
undocked.  What I'm trying to figure out is how to place a hook
*before* the laptop is undocked, and then if it turns out the
filesystem can't be unmounted (because it's busy, for example), to
refuse the undock.

That is, I want the script to return an error code, and then for the
system not to proceed with the undock operation.

You can trigger the undock operation from a shell script like this:

echo 1 > /sys/devices/platform/dock.0/undock

So I assume what happens is something is catching the event, and then
running that shell script.  If we can add some logic to detect whether
or not it is safe to undock, then the user will be able to see if the
he/she has permission to undock by looking at the green arrow or the
red "forbidden" light by the docking latch.

                                        - Ted
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Daniel Castro-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



2009/3/5 Theodore Tso <tytso@...>
On Thu, Mar 05, 2009 at 02:41:50PM +0000, Daniel Castro wrote:
> > I checked this link and it led to http://en.opensuse.org/Dockutils
> > which, as you say, hasn't been updated since 2007.
> >
> > Have you found something better in the meantime?

With the latest bleeding edge kernel and with Ubuntu 8.10, pushing the
request-to-undock button seems to do the trick automatically for me.
I haven't had a chance to track exactly *how* this magic is performed,
since it's missing some pieces that I would like to add.
Specifically, before actually allowing the undock to proceed, I want
to be able to find any filesystems mounted on the hard drive in the
bay, and unmount them, then if LVM is running run "vgchange -an
/dev/<vggroup>" to deactivate the LVM volumes before proceeding with
the mount.

> I recently did this tutorial for t61 and t61p. Might help...
> http://ubuntuforums.org/showthread.php?t=1076486

Am I right?  It *looks* like your scripts run after the laptop is
undocked.  What I'm trying to figure out is how to place a hook
*before* the laptop is undocked, and then if it turns out the
filesystem can't be unmounted (because it's busy, for example), to
refuse the undock.
oh sorry... yes my scripts are to run stuff after dock/undock...


That is, I want the script to return an error code, and then for the
system not to proceed with the undock operation.

You can trigger the undock operation from a shell script like this:

echo 1 > /sys/devices/platform/dock.0/undock

So I assume what happens is something is catching the event, and then
running that shell script.  If we can add some logic to detect whether
or not it is safe to undock, then the user will be able to see if the
he/she has permission to undock by looking at the green arrow or the
red "forbidden" light by the docking latch.

                                       - Ted
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad




--
________________________

Daniel Castro, M.Sc.
+353 083-318-2058
dancasmo@...
castromd@...
________________________

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Karsten König :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag 05 März 2009 17:08:44 schrieb Theodore Tso:
> > I recently did this tutorial for t61 and t61p. Might help...
> > http://ubuntuforums.org/showthread.php?t=1076486
>
> Am I right?  It *looks* like your scripts run after the laptop is
> undocked.  What I'm trying to figure out is how to place a hook
> *before* the laptop is undocked, and then if it turns out the
> filesystem can't be unmounted (because it's busy, for example), to
> refuse the undock.

The undock event that udev generates happens on pressing the undock button,
afterwards your system is registered as undocked while it still is in the
dock. Undocking the system afterwards just pulls out powercord and whatever
might still be connected (ethernet for example).
(You can track the events with 'udevadm monitor')

> That is, I want the script to return an error code, and then for the
> system not to proceed with the undock operation.

Windows blinks the dock led until it is safe to remove, no idea if that is
currently possible with linux (accessing these leds that is)



Karsten


--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Richard Neill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Karsten König wrote:
>
> Windows blinks the dock led until it is safe to remove, no idea if that is
> currently possible with linux (accessing these leds that is)
>

That's quote easy - you can beep or flash with thinkpad-acpi.

Write to /proc/acpi/ibm/beep  or  /proc/acpi/ibm/led  or
/proc/acpi/ibm/light


Richard
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Henrique de Moraes Holschuh-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 07 Mar 2009, Karsten König wrote:
> Windows blinks the dock led until it is safe to remove, no idea if that is
> currently possible with linux (accessing these leds that is)

I suppose I could try to add the required functionality in
thinkpad-acpi, as long as the firmware sends events about it.

No promises about doing it anytime soon, but please describe to me in
*DETAIL* what happens when you dock and undock.  Oh, and also for bay
eject.

I know how the bay behaves in the T43 (and Windows doesn't blink the
bay led), but I never owned a dock...

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by tytso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Mar 07, 2009 at 01:33:04AM +0100, Karsten König wrote:

> > Am I right?  It *looks* like your scripts run after the laptop is
> > undocked.  What I'm trying to figure out is how to place a hook
> > *before* the laptop is undocked, and then if it turns out the
> > filesystem can't be unmounted (because it's busy, for example), to
> > refuse the undock.
>
> The undock event that udev generates happens on pressing the undock button,
> afterwards your system is registered as undocked while it still is in the
> dock. Undocking the system afterwards just pulls out powercord and whatever
> might still be connected (ethernet for example).
> (You can track the events with 'udevadm monitor')

Um, no.  I *have* tracked things using udevadm monitor, dbus-monitor,
and lshal --monitor, and the problem is that right after you push the
button, it disconnects the hard drive right away.  It is true that it
doesn't disconnect the ethernet port, yes --- but that's because it is
just a matter of routing wires.  But anything with an electronic
interface, such as the UltraBay hard drive, or the USB hubs, etc., are
all disengaged after pressing the undock button.

                                                        - Ted
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Thomas Hood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Theodore Tso wrote:
> the problem is that right after you push the
> button, it disconnects the hard drive right away.
>  

That is, pressing the undock button causes immediate (electronic)
disconnection.  And this causes an immediate hang in the kernel.

Assuming we want undocking to be as effortless as possible there
are two solutions.

1. Change Linux so that it does not hang when the Ultrabay Slim
drive disappears without warning.

or

2. Avoid using the "undock" button on the UltraBase; instead hook
a hotkey such as Fn-F9 to do something like:

    echo 1 >  /sys/class/scsi_device/1:0:0:0/device/delete
    echo eject > /proc/acpi/ibm/bay
    echo 1 > /sys/devices/platform/dock.0/undock

Correct?
--
Thomas

--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Henrique de Moraes Holschuh-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 07 Mar 2009, Thomas Hood wrote:

> Theodore Tso wrote:
>> the problem is that right after you push the
>> button, it disconnects the hard drive right away.
>
> That is, pressing the undock button causes immediate (electronic)
> disconnection.  And this causes an immediate hang in the kernel.
>
> Assuming we want undocking to be as effortless as possible there
> are two solutions.
>
> 1. Change Linux so that it does not hang when the Ultrabay Slim
> drive disappears without warning.

This is obviously a big bad bug, and needs fixing. libata has eject
support, and that should be *ALSO* properly connected to the ACPI
bay/dock driver if needed, so that dumb things don't happen.

And all of this needs to be taught about thinkpads, which are well
engineered and have two-stage undocking ("request", "undock").

> 2. Avoid using the "undock" button on the UltraBase; instead hook
> a hotkey such as Fn-F9 to do something like:
>
>    echo 1 >  /sys/class/scsi_device/1:0:0:0/device/delete
>    echo eject > /proc/acpi/ibm/bay
>    echo 1 > /sys/devices/platform/dock.0/undock

Ugly bandaid from hell.  Let's just fix the damn bugs.  The kernel
KNOWS which ACPI node belongs to which device, it is high time it
learned to do smart things with that information... in fact, it
already tries to AFAIK, so there must be something broken instead of
just missing...

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Richard Neill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Henrique de Moraes Holschuh wrote:

> On Sat, 07 Mar 2009, Thomas Hood wrote:
>> Theodore Tso wrote:
>>> the problem is that right after you push the
>>> button, it disconnects the hard drive right away.
>> That is, pressing the undock button causes immediate (electronic)
>> disconnection.  And this causes an immediate hang in the kernel.
>>
>> Assuming we want undocking to be as effortless as possible there
>> are two solutions.
>>
>> 1. Change Linux so that it does not hang when the Ultrabay Slim
>> drive disappears without warning.
>
> This is obviously a big bad bug, and needs fixing. libata has eject
> support, and that should be *ALSO* properly connected to the ACPI
> bay/dock driver if needed, so that dumb things don't happen.
>

What do we do if the disk is in use when it's ejected?  Eg a mounted
DVD-ROM with open files, or even a hard-drive?

Seems that we should beep like crazy at the first stage of pulling out
the lever (there is a very loud sound available as one of the options in
   echo X > /proc/acpi/ibm/beep      where X is a number between 1-20.)

Hopefully, that will make the user stop for long enough to read a
message on screen (popup via hal/dbus?) about what's wrong, and
specifically which process has the device open.(fuser)

After that, we still need to cope(i.e. not crash) when the user blindly
removes a disk which is mid-way through writing data.

Richard







--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by tytso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Mar 07, 2009 at 09:28:18AM +0100, Thomas Hood wrote:
>
> That is, pressing the undock button causes immediate (electronic)
> disconnection.  And this causes an immediate hang in the kernel.

At least with a 2.6.29-rc7 kernel, and using LVM, it doesn't cause a
hang for me.  LVM does complain a lot if I don't unmount the
filesystem and run "vgchange -an <vgname>" first, though.

> Assuming we want undocking to be as effortless as possible there
> are two solutions.
>
> 1. Change Linux so that it does not hang when the Ultrabay Slim
> drive disappears without warning.

It doesn't for me; what filesystem did you have mounted, and what were
you accessing at the time?

> or
>
> 2. Avoid using the "undock" button on the UltraBase; instead hook
> a hotkey such as Fn-F9 to do something like:
>
>    echo 1 >  /sys/class/scsi_device/1:0:0:0/device/delete
>    echo eject > /proc/acpi/ibm/bay
>    echo 1 > /sys/devices/platform/dock.0/undock

There are older Ultrabay scripts out there which unmount the
filesystem first, but yes.

It should also be possible to hook the undock button so that scripts
can be run and then the OS can either confirm the undock or refuse the
undock request.  That's what Windows does, so it's definitely
possible.  I'm not sure if it will require kernel changes in the
thinkpad and/or dock ACPI drivers, though.  Not my area of expertise,
and I haven't had time to really drill into it.

                                                - Ted
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Henrique de Moraes Holschuh-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 07 Mar 2009, Richard Neill wrote:
>> This is obviously a big bad bug, and needs fixing. libata has eject
>> support, and that should be *ALSO* properly connected to the ACPI
>> bay/dock driver if needed, so that dumb things don't happen.
>
> What do we do if the disk is in use when it's ejected?  Eg a mounted  
> DVD-ROM with open files, or even a hard-drive?

We are to clean up, send an nasty warning to the user that he just Did
Something Really Bad (like we do if you hotunplug SATA or USB with open
filesystems), and don't crash.

> Seems that we should beep like crazy at the first stage of pulling out  
> the lever (there is a very loud sound available as one of the options in
>   echo X > /proc/acpi/ibm/beep      where X is a number between 1-20.)

The correct behaviour per the ThinkVantage UI, as far as I know, is to:

1. Issue a specific "failure" beep (low pitch) if the action CANNOT
proceed (e.g.  mounted filesystems).

2. Issue a specific "done" beep (high pitch) if the action was carried
out properly, and the bay is now disabled.

> After that, we still need to cope(i.e. not crash) when the user blindly  
> removes a disk which is mid-way through writing data.

Indeed.

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Thomas Hood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Theodore Tso wrote:
> On Sat, Mar 07, 2009 at 09:28:18AM +0100, Thomas Hood wrote:
>  
>> That is, pressing the undock button causes immediate (electronic)
>> disconnection.  And this causes an immediate hang in the kernel.
>>    
> At least with a 2.6.29-rc7 kernel, and using LVM, it doesn't cause a
> hang for me.  LVM does complain a lot if I don't unmount the
> filesystem and run "vgchange -an <vgname>" first, though.
>  

I have a very standard Ubuntu Intrepid-upgraded-to-Jaunty
system which has a 2.6.28-8 kernel and no lvm.

Does lvm make the kernel more tolerant of disappearing disks?

>> Assuming we want undocking to be as effortless as possible there
>> are two solutions.
>>
>> 1. Change Linux so that it does not hang when the Ultrabay Slim
>> drive disappears without warning.
>>    
> It doesn't for me; what filesystem did you have mounted, and what were
> you accessing at the time?
>  

My X61 hangs when undocked (unless
"echo 1 > /sys/class/scsi_device/1:0:0:0/device/delete" is done
 first) even though nothing is mounted and the Ultrabay Slim
drive hasn't been used since the system was powered on.
--
Thomas
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Karsten König :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Samstag 07 März 2009 06:21:41 schrieb Theodore Tso:

> On Sat, Mar 07, 2009 at 01:33:04AM +0100, Karsten König wrote:
> > > Am I right?  It *looks* like your scripts run after the laptop is
> > > undocked.  What I'm trying to figure out is how to place a hook
> > > *before* the laptop is undocked, and then if it turns out the
> > > filesystem can't be unmounted (because it's busy, for example), to
> > > refuse the undock.
> >
> > The undock event that udev generates happens on pressing the undock
> > button, afterwards your system is registered as undocked while it still
> > is in the dock. Undocking the system afterwards just pulls out powercord
> > and whatever might still be connected (ethernet for example).
> > (You can track the events with 'udevadm monitor')
>
> Um, no.  I *have* tracked things using udevadm monitor, dbus-monitor,
> and lshal --monitor, and the problem is that right after you push the
> button, it disconnects the hard drive right away.  It is true that it
> doesn't disconnect the ethernet port, yes --- but that's because it is
> just a matter of routing wires.  But anything with an electronic
> interface, such as the UltraBay hard drive, or the USB hubs, etc., are
> all disengaged after pressing the undock button.

Ouch, that happens when you track the undock event with nothing connected to
the dock except monitor and ethernet + ps/2 mouse and some usb sticks you
don't mind, I didn't had anything important connected/mounted so I thought is
has been taken care of instead of ripped out.
Sorry for the confusion


Karsten
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: Re: What are people using for Dock/Undocking scripts for their X60/61's?

by cyberdude :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Henrique de Moraes Holschuh-2 wrote:
On Sat, 07 Mar 2009, Karsten König wrote:
> Windows blinks the dock led until it is safe to remove, no idea if that is
> currently possible with linux (accessing these leds that is)

I suppose I could try to add the required functionality in
thinkpad-acpi, as long as the firmware sends events about it.

No promises about doing it anytime soon, but please describe to me in
*DETAIL* what happens when you dock and undock.  Oh, and also for bay
eject.

I know how the bay behaves in the T43 (and Windows doesn't blink the
bay led), but I never owned a dock...

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Any update on this? I'm battling with getting the undocking to work on my installation. I would have thought that by now docking / undocking of laptops would have been sorted. Laptops and docks have been around long enough. i tried the solution provided in the thinkwiki (http://www.thinkwiki.org/wiki/X6_UltraBase) but it's not working for me.
 
Thinkpad X60s, openSUSE 11.1, KDE 4.2.4

Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Henrique de Moraes Holschuh-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 06 Jul 2009, cyberdude wrote:
> Any update on this? I'm battling with getting the undocking to work on my

Update on what?  blinking the dock leds?  I never got the information I
requested...

> installation. I would have thought that by now docking / undocking of
> laptops would have been sorted. Laptops and docks have been around long
> enough. i tried the solution provided in the thinkwiki
> (http://www.thinkwiki.org/wiki/X6_UltraBase) but it's not working for me.

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

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: What are people using for Dock/Undocking scripts for their X60/61's?

by tytso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

                                                - Ted
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Henrique de Moraes Holschuh-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

Re: What are people using for Dock/Undocking scripts for their X60/61's?

by Steven King-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 07 July 2009 09:38:43 Theodore Tso 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.

With my X61 tablet and x6 ultrabase, as long as I leave the ultrabay empty I'm
able to dock/undock, suspend/hibernate/resume without any problems.  For a
while I thought I could suspend to disk after undocking with a drive in the
ultrabay, but that doesnt work anymore...

> Annoying, and since the failure is on the resume side, it's darned
> hard to debug.

Indeed.
--
Steven King -- sfking at fdwdc dot com
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
< Prev | 1 - 2 | Next >