[Bug 189185] Re: Thinkpad X61 hangs when removing from dock
Raphaƫl HALIMI
raphael.halimi at gmail.com
Sun Aug 23 08:37:22 UTC 2009
Hi, using all information gathered mainly here and on ThinkWiki, I made
a little package as a workaround for this bug (and others). It should
work out-of-the-box for everyone who has an UltraBase with a CD/DVD in
the UltraBay (but it should work with any brand handled by the new
kernel's dock driver).
It's available at my PPA: https://launchpad.net/~raph/+archive/ppa
Its main component is a shell script that handles docking and undocking
events, as well as bay's ejection or insertion (all are handled by the
dock driver as of 2.6.28). It detects the type of dock triggering the
event (ata_bay or dock_station) and try to unmount and unregister the
device before undocking.
As of right now, it doesn't detect the type of device present in a bay
(/sys/devices/platform/dock.?/block is missing, maybe because the dock
driver is loaded into memory after block devices drivers, see at the end
of the dock driver source), so this could be considered dirty because
you have to specify in the config file the type of device you're using
(defaults to /dev/sr0 on SCSI host 1:0:0:0). It seems that it's the best
we can do in Jaunty without recompiling the kernel.
Another problem is the undock button. By default the dock driver
disconnects immediately any device connected to the dock triggering the
event, before the script could be run; to change this, we have to pass
an option to the dock driver, but in Jaunty it's built-in the kernel, so
you have to pass it to the kernel via the bootloader. If you use grub,
my package can add "dock.immediate_undock=0" to your config file, in
order to allow the use of the UltraBase eject button (similar code for
lilo welcome).
And, last but not the least, it detects if you have a ThinkPad and if
so, it binds the eject hotkey (Fn-F9) by adding a file to ACPI events
config directory, so you can use the hotkey as well as the eject button.
Hope it helps.
** Attachment added: "udev-dock_0.2_all.deb"
http://launchpadlibrarian.net/30687014/udev-dock_0.2_all.deb
--
Thinkpad X61 hangs when removing from dock
https://bugs.launchpad.net/bugs/189185
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to Linux.
More information about the kernel-bugs
mailing list