hmmm.. ok, it may be worth checking this article and following the steps that help sort hybrid machines.
we want to make sure that your machine is forced to the nvidia at all times. My guess is that there is some switching going on between the nvidia and the intel hd that is complicated by the dock. My gut tells me that forcing the machine to run on the nvidia at all times may help, but this is admittedly a WAG.