I am using my laptop with a Lenovo Thunderbolt 3 Gen 2 docking station connected to two external monitors.
Before installing the Nvidia driver (through NVIDIA-Linux-x86_64-510.60.02.run), my laptop screen worked properly but I could not use my two external monitors when my laptop was connected to the docking station. The two external monitors were not detected with xrandr.
After installing the Nvidia driver with my docking station connected, my two external monitors are detected and I can use them but my laptop screen has permanently a blinking cursor whether my docking station is plugged or not. If I unplugged my docking station I have a black screen from the login window.
Thanks, it works as wanted. I would buy you a drink if I could ;)
Only bemol: as you can see in the attached screenshot - at some boots but not all boots - the lightdm login window is divided in three “small window” (I have a 4K laptop monitor and two 1080p external monitors). Is there a way to fix this ugly login window?
To sum up what I have done to resolve the initial problem:
Delete the Xorg conf file:
rm /etc/X11/xorg.conf
Configure the Display Manager to use Nvidia GPU only. In my example below, it’s LightDM but you can find the instruction for the other display managers in NVIDIA Optimus#Display_managers from Arch Linux doc.
Create the following file /etc/lightdm/display_setup.sh and add:
I can move the whole screen, the mouse moves are not restricted to “mini-screen”. I can “switch” from a normal screen to a buggy three parts screen by randomly clicking on buttons from login window. Plus, as you can see in the attached video, there is also a three parts desktop sometimes after logging in. In this case, it seems to be related to the display settings from Xfce. May the cause of this problem related to Xfce?
Ok, so something sets up virtual monitors, which explains what you’re seeing. Question remains, what application is doing this. I don’t think xfce is to blame since it doesn’t have control over the lightdm screen.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.
I unplug the docking station when the user session is running.
I shutdown the computer, plug the docking station and start it.
Only the laptop screen is working when the login session appears and also after logging in. The background image of the desktop environment is different (this is the Xfce logo not the debian one this time) as you can see in the attached screenshot. Quite weird. Then I unplug and plug the docking station when I am logged in.
Restart the computer and then the three parts login window appears. I have to set the display parameters again as if it was the first time I plugged the docking station.
So it seems that I have to plug the docking station when the session is open (and not when the computer is off) so that the docking station would be detected.
In addition the hot plugging does not work as expected. I am expecting to have the external monitors already recognized with the appropriate parameters (position of the monitors relative to each other and scale).
I have to unplug and plug the docking station and set the display parameters for the external monitors. Otherwise the external monitors are not displaying. Each time I unplug and plug I have to set the display parameters for the monitors again.