At work, I'm using a Dell Inspirion 5510 in combination with a Dell WD15 docking station. All my hardware/cables (mouse, keyboard, earphones, screens, network) are attached to the docking station. This is very handy, as the only thing I have to do to go home (or arrive at work) is to attach/detach the USB-C cable between the Inspirion and the WD15.
My operation system is Ubuntu 16.04.LTS. I was struggling a lot with the setup of my 2 external monitors. I use the mini-display port and the HDMI port. Whenever I attached my laptop to the WD15, screens turned blacked. The only solution was to restart my laptop. And then sometimes, I even had to reattach the cables (unplug, plug, unplug, plug, ...)
After some investigation, I found out I was using a kernel version which was too old. I did an upgrade to 16.10 by executing the following command:
$ sudo do-release-upgrade -d
After the upgrade, attaching screens goes very smoothly. Even when I go to a meetingroom with an external TV screen, the system knows how to recognize the correct hardware and restores the correct configuration set.