When my laptop is on docking station, the boot messages are printed on the laptop screen and not on the external monitor. The earliest time I managed to switch to my external monitor was after login.
I also played with the BIOS settings but that doesn't seem to work as I want, so I am looking for a way to switch to the external monitor (if available) automatically during boot as early as possible.
I am using ubuntu 16.04.1 with systemd, lightdm (and xmonad). The laptop has an onboard intel card and a discrete nvidia card. Only the nvidia card can be used to use the external monitor. I am using the official nvidia drivers for this.
Following the suggestions on how do I prevent Xorg using my Linux laptop's display panel? I put the following in my (otherwise empty)
[Lightdm] display-setup-script=xrandr --output DP-5.8 --mode "2560x1600" --primary
(Executing that command from commandline does activate the external screen.) However it does nothing. Moving the command into a script made no difference, and putting
echo "test" > mylogfile into the script revealed that it's not run on boot.
Edit I just checked if mir is running or not by executing
ps -e | grep unity-system-co which resulted in nothing (https://askubuntu.com/a/523012/12015)