From Fedora Project Wiki

The desktop needs to be aware of the docked/undocked status of the laptop and react appropriately to changes. One important part of this is that X needs to detect monitors and configure them in a useful way, without any need for the users to initiate that manually.

From a recent irc discussion:

<mclasen> hey, I have a fun question
<jkkm> ruhroh.
<jkkm> :)
<mclasen> docking stations...do we get any dock/undock notifications from the kernel nowadays ?
<jkkm> should get pci express hotplug events, and possibly an acpi event, but i'm not sure if there's anything explicit.
<mclasen> basically wondering if it would be doable to make X detect monitors when you dock/undock
<jkkm> oh. ooh.
<mjg59> mclasen: Yes
<mjg59> There's an ACPI event fired. There's also SW_DOCK, which is more generalisable - it'll also be fired on some non-ACPI docks
<jkkm> ah, good, i'm glad you showed up. sorry, i got lost in bugmail. :/
<mjg59> However, SW_DOCK broke the ACPI docking code
<mjg59> So I need to fix that
<mjg59> mclasen: For added fun, some (and I do mean some) systems will fire an ACPI video change notification, so you'll get a KEY_SWITCHVIDEOMODE (or whatever) already
<mjg59> Which probably means that you'll need some debounce
<mclasen> sounds like the average 'who handles this key/event' confusion...
<mjg59> Yeah.
<mjg59> mclasen: The way I'd assumed this would work would be that we'd have implicit docked and undocked profiles
<mjg59> And dock/undock would switch you between them
* rtcm has quit (Leaving.)
<mclasen> sounds reasonable
<mjg59> So remember the docked state separately from the undocked one
<mjg59> But never show them separately in the UI

The sound system should also automatically detect changes due to docking/undocking.

From the same discussion:

<mezcalero> mjg59: regarding docking stations: do you know what exactly needs to be done on the sound side?
<mjg59> mezcalero: That's a good question
<mezcalero> mjg59: i.e. i assume i need to switch some mixer control
<mjg59> mezcalero: Docking stations will generally have some separate analogue outputs and many also have a separate digital output
<mezcalero> mjg59: do you know anything about the details?
<mjg59> For HDA, I guess you need to flick various things to route stuff correctly
<mjg59> Again I suspect that having a docked and undocked profile (that aren't presented to the user in that way) might be the easiest thing to do
<mezcalero> pa will learn in the near future that we can switch automatically to a different profile based on jack sensing info. i think docking stations are a very similar case
<mjg59> Yeah
<mjg59> There may be a subset of controls that it makes sense to switch automatically
<mezcalero> jack sensing is done via input devices as well
<mjg59> Right, that was one of the reasons I did the dock stuff that way
<mezcalero> if both jack sensing and docking is handled similary this is of course good
<mezcalero> the problem that reamins is this horrible mess that is the alsa control/mixer interface