ACPI docking stations are mildly complicated creatures that require the
OS to handle part of the undocking process. We're currently doing this
entirely within the kernel, but this has the significant downside that
there's no way to handle cleanly unmounting any block devices that are
contained within the dock - they'll simply vanish.
I've been working with David Zeuthen to flesh out proper desktop support
for this, and we're now at the point where there's not a great deal of
code to write to get this working cleanly. Unfortunately this requires a
certain level of integration between the kernel and the desktop -
something has to prompt the user about unmounting the device and then
trigger the completion of the undock. The kernel still handles the
actual ACPI execution, but policy now lives in the desktop.
Once this code is ready I'd like to change the kernel defaults to allow
this. The problem is that this will cause a reduction in functionality
for desktops that don't have this integration. How should this kind of
situation be handled?
Matthew Garrett | mjg59(a)srcf.ucam.org
----- "Matthew Garrett" <mjg(a)redhat.com> wrote:
> On Tue, Jun 30, 2009 at 05:48:44PM +0200, Kevin Kofler wrote:
> > Matthew Garrett wrote:
> > What changes are needed to the desktop?
> > The big problem we've been facing integrating new features of core
> > services into KDE so far was lack of documentation. What do we need
> > change?
> An event will be generated and a policy agent then needs to choose
> to do in terms of unmounting any media. The precise interface doesn't
> exist yet, but will be documented.
> > If this will be all handled within DeviceKit, then this will come by
> > with the Solid DeviceKit backend ltinkl is working on, but if we
> need to
> > add some desktop interaction for it, we have to know what it should
> So, what you'll get is a notification that a block device has
> removal along with a notification that a dock device is being
> What you do with the block device is up to you, but in general you'll
> want to unmount it. Whether you're willing to kill applications that
> have open files on it is a policy decision. After the unmount you'll
> then trigger the completion of the undock and tell the user that it's
> now safe to remove their hardware.
IMHO, it is pretty much similar to the way that we handle USB hubs and devices.
In terms of UI, it may have a nice dock status icon to show status and to be pressed
if users want to un-dock safely.
Yet we still need to handle the force-undock event, just like we handle the
forced unplug USB devices.
Red Hat, Inc.
Looking to carve out IT costs?