How to hotswap the UltraBase

From ThinkWiki
Revision as of 23:56, 14 July 2006 by RichardNeill (Talk | contribs)
Jump to: navigation, search

Introduction

Here is how I set up an X22 to allow hot ejection/removal of the ultrabase. See also this related page for the UltraBay. These instructions are well-tested, but ymmv.

Features

  • Uses lt_hotswap to preserve DMA on re-insert
  • Idiot-proof (relatively)

System

  • X22 thinkpad + ultrabase + DVD-R
  • lt_hotswap version 0.3.9
  • kernel-2.6.17.1
  • xorg 6.9.0

Files

rc.local

First, make sure the lt_hotswap module is loaded. Add this to /etc/rc.local (or use modprobe.preload, if you prefer)

echo "Loading lt_hotswap module"
modprobe lt_hotswap hdc_dock=1

/etc/acpi/events/lths

Disable the existing lths script. Here is the modified /etc/acpi/events/lths:

# Call the LTHS script
event=lths.*
#action=/usr/local/sbin/lths.sh %e
action=echo "Not invoking lths.sh; this is now done by the ultrabase_eject and insert scripts instead."

/etc/acpi/events/ultrabase_eject

Respond to an ultrabase eject event. Here is /etc/acpi/events/ultrabase_eject

#Ultrabase eject button has been pressed
#We can be triggered by an ibm/bay event if NOT using lt_hotswap, or an lt_hotswap event if we are.
event=ibm/bay.MSTR.00000003.00000000
event=lths.MSTR.00000003.00000000
action=/etc/acpi/actions/ultrabase_eject.sh

/etc/acpi/events/ultrabase_insert

Respond to an ultrabase insert event. Here is /etc/acpi/events/ultrabase_insert

#Ultrabase has been re-inserted
#We can be triggered by an ibm/bay event if NOT using lt_hotswap, or an lt_hotswap event if we are.
event=ibm/bay.MSTR.00000001.00000000
event=lths.MSTR.00000001.00000000
action=/etc/acpi/actions/ultrabase_insert.sh