Problem with xorg.conf

Hello Guys.
Had an problem: When I execute

nvidia-detect

it responds with

Detected NVIDIA GPUs:
01:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 940MX] [10de:134d] (rev a2)

Checking card:  NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
Your card is supported by the default drivers and legacy driver series 390.
It is recommended to install the
    nvidia-driver
package.

But if I try to install the package it says, that it isn’t compatible with my kernel version and I should install the 390xx-series. So i tried to install this package and when I start nvidia-settings it gives me the following error-message:

You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.

I’ve seen,that it isn’t installed. So I installed the package “nvidia-xconfig” and run it with “sudo” and restartet my system. After that the X-Server couldn’t start because he can’t find any screen. After moving the xorg.conf outside the directory and restarting the system it works well. So the problem should be the xorg.conf. In the second comment line stands

# nvidia-xconfig:  version 410.93

Maybe this is the problem? If yes, where can I find an xorg.conf for 390xx Versions?

I hope anyone could help

Here is the whole content of my xorg.conf:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 410.93


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

About my system: I’am running Debian Buster with an XFCE-Desktop.
nvidia-bug-report.log.gz (568 KB)

Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.
[url]https://devtalk.nvidia.com/default/topic/1043347/announcements/attaching-files-to-forum-topics-posts/[/url]

Please see this:
[url]https://devtalk.nvidia.com/default/topic/1022670/linux/official-driver-384-59-with-geforce-1050m-doesn-t-work-on-opensuse-tumbleweed-kde/post/5203910/#5203910[/url]

So I just need to move the xorg.conf back to /etc/X11/xorg.conf and add the following into a startup script, or should I change anything more?

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Your old xorg.conf is wrong. take the one from the post and change the busid to your one.

Didn’t work. After making this change and restarting, the screen keeps black again

Where did you add the xrandr command? Which DM/DE are you using? Please create a new nvidia-bug-report.log

Oh I thought I just need to add the new xorg.conf… I will try it in the upcoming days again with your hint, but today I don’t have enough time.