Comment 24 for bug 297663

Revision history for this message
In , Constantine (constantine-redhat-bugs) wrote :

I was able to find a workaround. immediate_undock=N parameter must be used and undocking script must write to /sys/devices/platform/dock.0/undock file before exiting. This will generate a new undock event, and the next invocation of undocking script must take care not to do anything except returning 0 status.

Failure to write to to /sys/devices/platform/dock.0/undock file will not complete undock properly and following dockings will result in not-operational HW as was previously described.

On the other hand, failure to take care not to execute the undocking script on the following undocking events will result in a stuck system -- undock script will run again and again.

I wonder why this undocking behavior/requirement is not documented.

I also wonder what happened with Linux undock/hotplug after kernel 2.6.23 that immediate undocking has stopped working with IBM/Lenovo thinkpads?

On my Thinkpad X61, ata_generic and pata_acpi drivers are used (not ahci) because the way the BIOS is configured. Maybe the changes are due to SATA hotplug and AHCI driver would work? I will continue testing.

It is still a regression bug, since machine locks up and it used not to.

Attached new dock/undock script makes dock/undock work again. It checks whether immediate_undock=N is set and uses lock files with time stamp to decide whether it is a first run or second "spurious" run.

Tested with kernel 2.6.27.12-170.2.5.fc10.i686.

Attached is also rc.local script that sets immediate_undock=N parameter depending on the kernel version.