[ltp] hotkey and hotswap
Winsley von Spee
linux-thinkpad@linux-thinkpad.org
Wed, 02 Feb 2005 18:22:37 +0100
This is what my script depends on ... it isn't to manage the swapping
itself it is just to automate this process ...
btw If you use 0xffff fn+F5 doesn't longer work guess the bios is told
to left this to the Operating System (as written in the ibm_acpi
readme ) so I wrote a Script too enable disable bluetooth and one for
wlan as well....is there something like an ibm utils package ??? Perhaps
it is worth to build one for this and other purpose ...
Am Mittwoch, den 02.02.2005, 10:02 -0600 schrieb Alejandro Bonilla:
> Hi,
>
> This is what I use.
>
> http://users.ox.ac.uk/~univ1377/c600.html
>
> Download the hotswap util, it worked perfectly with me in a Dell, maybe
> in IBM it works as well?
>
> - Alejandro
>
> Winsley von Spee wrote:
>
> >Hi All
> >
> >I just played around with the hotkey feature of the new ibm_acpi version
> >0.10 and I was happy to found out that removing the ultrabay device does
> >produce an acpi event. So I wrote a little script to automatically
> >register and unregister the device.
> >I don't have the Ulrabay Battery so if you have one try what hotswap
> >says to the battery. The man page says you don't need to register
> >batterys or floppy drives cause they are no ide devices but the script
> >doesn't hang on errors so it shouldn't be a problem.
> >
> >To use the script say ./ultrabay unregister to unregister the currently
> >inserted ide device and ./ultrabay register to register it again.
> >
> >The Script uses hotswap 0.4.0 and perhaps it's better/makes more sense
> >to use the hotswaprc file (see man hotswaprc) but so or so you have to
> >call hotswap with different arguments and write some limes for handling
> >mounted devices either for registering or for unregistering the device.
> >
> >My Thinkpad r50p (183222G) produces "ibm/bay MSTR 00000003 00000000" if
> >you unlock the bay and "ibm/bay MSTR 00000001 00000000" if you remove
> >the device or lock the bay. So if you use the script to un-/register the
> >device it will be called three times. First if you unlock the bay,
> >second if you remove the device and last if you lock the bay again.
> >You have to "echo enable > /proc/acpi/ibm/hotkey && echo 0xffff
> >
> >
> >>/proc/acpi/ibm/hotkey" in order to generate these acpi events. See man
> >>
> >>
> >acpid and the ibm_acpi readme for more details on handling acpi events.
> >
> >
> >Feedback is welcome. Obtain it from here ...
> >http://jack-son.de/thinkpad/ultrabay
> >
> >
> >Is there a way to force umounting regardless of the state of the device
> >(panic umounting or so) ???
> >
> >
> >Greetz
> >
> >
> >P.s.: If someone has to smile about my English *g* feel free to correct
> >me.
> >
> >
> >
> >
> >
> >