Desktop/Whiteboards/DockingStations

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:

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

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

From the same discussion:

mjg59: regarding docking stations: do you know what exactly needs to be done on the sound side? mezcalero: That's a good question mjg59: i.e. i assume i need to switch some mixer control mezcalero: Docking stations will generally have some separate analogue outputs and many also have a separate digital output mjg59: do you know anything about the details? For HDA, I guess you need to flick various things to route stuff correctly 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 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 Yeah There may be a subset of controls that it makes sense to switch automatically jack sensing is done via input devices as well Right, that was one of the reasons I did the dock stuff that way if both jack sensing and docking is handled similary this is of course good the problem that reamins is this horrible mess that is the alsa control/mixer interface