Geforce 840M on Debian Buster problems


I have two devices: Intel Haswell-ULT Integrated Graphics, Driver i915 and NVIDIA GM108M [Geforce 840M], driver: nvidia. v418.74. I am using Debian stable (buster).

I tried to install my graphics card via the stable repository, typing:

# apt-get install linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//')
apt install nvidia-driver

Unfortunately the “NVIDIA X Server Settings” won’t open as GUI. Typing “nvidia-settings” in command line returns

"ERROR: Unable to load info from any available system"

glxinfo shows me: MESA DRI Intel® Haswell Mobile as active OpenGL renderer. Also, when starting a Game (for example) I’ll get virtually no frames, showing me, the NVIDIA card is not working (i know it’s tricky because both cards are co-working, so results from glxinfo might be harder to interpret).

So, i followed another instruction:

# dpkg --add-architecture i386
# apt install firmware-linux nvidia-driver nvidia-settings nvidia-xconfig
# nvidia-xconfig

Though the instructions tells me to start “nividia-xconfig” before booting, I (unfortunately) only entered it after booting. After entering it, it will write xorg.conf to /etc/X11/.

WARNINING: Unable to locate/open X configuration file.

NEW X configuration file written to 'etc/X11/xorg.conf'

content is:

Section "Device"
Identifier "Device0"
Driver "nvidia"
Vendor Name "NVIDIA Corporation"

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
Default Depth 24
SubSection "Display"
Depth 24

However, this will prevent X-Server to start on rebooting, so i had to remove the file (after that, xserver is booting again).
Do I need to change something on my “nvidia-drm-outputclass.conf” in /usr/share/xorg.conf.d/ ?

Sorry for the question, I’ve read everything I could find, however didn’t get a solution. Any suggestions? Is there something with bumblebee I am missing?

Thanks you

Please delete the xorg.conf, you need a specific one to configure your system for PRIME. Please see this:

Thank you, solved it with your help.

For anybody having similar issues I’ll describe my solution (I have an Acer VN7-571G). (for those who are nervous because they’re booting directly into command line, this is probably because of your /etc/X11/xorg.conf input. Deleting the file might solve your issue and make the system reboot into GUI. However make a copy of it before, so you know some paramters you might need)

First my working /etc/X11/xorg.conf:

Section "ServerLayout"
        Identifier     "layout"
        Screen      0  "nvidia" 0 0
        Inactive       "intel"

Section "Monitor"
        Identifier     "Monitor0"
        Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

Section "Device"
        Identifier     "intel"
        Driver         "modesetting"
        Option         "AccelMethod" "none"
        BusID          "PCI:0:2:0"

Section "Device"
        Identifier     "nvidia"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BusID          "PCI:3:0:0"
        Option         "AllowEmptyInitialConfiguration"

Section "Screen"
        Identifier     "nvidia"
        Device         "nvidia"
        Monitor        "Monitor0"
        Subsection     "Display"
          Depth 24

There might be a lot of stuff in it, which actually doesn’t make sense, however; I’ll keep it as it is working.

As you can see, I copied most of the entries generix posted at .

I then followed Arch Wiki (
This is to setup your login-screen. Check before which Display-Manager you are using (check /etc/X11/default-display-manager), for me it was lightdm.
I followed ArchWIKIs suggestions:


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

Make the script executable:

# chmod +x /etc/lightdm/

Now configure lightdm to run the script by editing the [Seat:*] section in /etc/lightdm/lightdm.conf:



However I encountered another error. If you start directly into command-line because login screen can’t be loaded, try to start manually “startx” (into command line) and check output for errors. Something was wrong for me at “Section Monitor” at xorg.config file, so I just deleted the problematic line as well as other stuff which didn’t seem important to me (as you can see, I only got two entries now). However, after successfully booting, the Desktop only went to 960x500 (or something similar) as screen resolution. I fixed this by typing “cvt 1920 1080” into shell (cause i have a full HD screen), and it gave me the Modeline values which I copied into “Section Monitor”. That solved it.

I dont’ know if this is the end of the journey, however I can now start the Nvidia X Server Settings as GUI and glxinfo|egrep “OpenGL vendor|OpenGL renderer” returns:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 840M/PCIe/SSE2

I dont’t know if my nvidia card is actually working with the IntelChip now…I guess I’ll have to work this out now, perhaps I’ll have to install Bumblebee?

Anyways, Thank you

Looks like you’re getting the correct results, so it works. Otherwise you wouldn’t be able to start nvidia-settings.