Black screen on main laptop screen after installing Nvidia driver


OS: Debian 11
GPU: Nvidia GTX 1650 Ti

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, 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.

Any suggestion(s)?


Please delete /etc/X11/xorg.conf

1 Like

Afterwards, please check this thread:

1 Like

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:

  1. Delete the Xorg conf file:
rm /etc/X11/xorg.conf

  1. 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/ and add:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
  1. Create the Nvidia configuration file /etc/X11/xorg.conf.d/10-nvidia-primary.conf and add:
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "PrimaryGpu" "yes"
    Option "AllowEmptyInitialConfiguration" "true"

Looks odd. Can you move the pointer about the whole screen or just the “mini-screen” with the login?

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?

When this happens, does
xrandr --listmonitors
list more than just the eDP display?

Yes, below is the output (the command was executed after logging in):

# xrandr --listmonitors
Monitors: 3
 0: +DP-1.2 1920/598x1080/336+0+0  DP-1.2
 1: +DP-1.3 1920/531x1080/299+1920+0  DP-1.3
 2: +eDP-1-1 3840/344x2160/194+0+0  eDP-1-1

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 as root and attach the resulting nvidia-bug-report.log.gz file to your post.

You can find the report in the attached file.
nvidia-bug-report.log.gz (816.4 KB)

Steps to reproduce the problem:

  1. I unplug the docking station when the user session is running.
  2. I shutdown the computer, plug the docking station and start it.
  3. 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.
  4. 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).

Please set kernel parameter

There is no more three parts screen but after logging in:

$ xrandr --listmonitors
Monitors: 1
 0: +eDP-1-1 3840/344x2160/194+0+0  eDP-1-1

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.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.