I assume the thunderbolt was authorized properly (if not, try doing so, for example http://juho.tykkala.fi/Lenovo-Thunderbolt-3-dock-Linux ) and your problem is that the monitor is not "recognized" on start up. Have you tried to change the monitor's settings from "auto" to the port hdmi/dp where the monitor is connected?
Another thing is how the nvidia driver is setup, for example - load the the kernel modules as early as possible: https://devtalk.nvidia.com/default/topic/1068925/linux/prime-render-offloading-not-working-on-my-arch-linux-on-a-lenovo-laptop-with-xfce-xorg/ ( search for MODULES=
).
Two years ago I had similar problem and back then the workaround I came with was (instructions are for Arch Linux, but it should be something similar):
Create monitor configuration for both internal (lcd panel) and external (monitor):
$ sudo vim /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
Identifier "DP1"
Option "Primary" "true"
Option "PreferredMode" "3840x2160_60.00"
Option "DPMS" "true"
EndSection
Section "Monitor"
Identifier "eDP1"
Option "LeftOf" "DP1"
Option "DPMS" "true"
EndSection
Create an executable file, so xinit
run it on startup:
$ sudo vim /etc/X11/xinit/xinitrc.d/90-display.sh
#!/bin/sh
xrandr --output "eDP1" --off --output "DP1" --primary --auto
xrandr --output "eDP-1-1" --off --output "DP-1-1" --primary --auto
This will turn off the LCD panel. You can add explicit xrandr command to turn your external monitor "DP1" --on.
Let me know if you managed to solve your problem. Soon, I'll probably go though the same problem (X1 + 40AN0230EU + 4k monitor)