I've recently updated to Debian 9 my T430 and I got stuck in this behavior. Previously, when docked, I used to turn it on from the dock power button, and it used to use the external display(s) connected to the dock. Now, after the upgrade, it keeps the main desktop on the closed built-in monitor. I have to open it and close it again. After this simple but annoying operation, it detects that the lid is closed, and uses the external display(s) as usual.
I'm using Gnome 3.22.2 with GDM. I don't know how to handle it. Furthermore, during the bootup, it works as expected (on the external), but when GDM gets loaded, it goes on the closed built-in.
Thank you for the support.