After some tweaking I've finally come to a point where I'm able to use my ThinkPad T460p with a Ultra docking station. I still have some issues. The one issue which is the most frustrating right now is when my laptop is undocked during sleep, the internal screen is black when I resume again.Since I always have the lid closed when the laptop is docked, this also happens when my laptop is running and I undock it. In this case the issue may be that the laptop goes to sleep before detected the undocking.So what I tried to do is to add a script in /etc/pm/sleep.d/ which looks like this (which doesn't seem to make any difference):./usr/lib/pm-utils/functionscase $1 in    hibernate|suspend)    ;;thaw|resume)    export DISPLAY=:0export XAUTHORITY=/home/user/.Xauthorityxrandr --auto    ;;    *)    ;;esacexitDoes anybody have any tricks on how I can get solve this problem?
Black screen when ThinkPad is undocked from Ultra dock during sleep
linux;bash;configuration;suspend;thinkpad