It worked for a while with 375, I think. Then, it suddenly stopped working today. I've tried purging and reinstalling both 384 and 375, but had no luck. They still give me black screens, and nvidia-detector still gives me none.

I've been using CUDA for a while, but I didn't pay too much attention to whether my graphics are rendered by my NVIDIA card.

I just found out that nvidia-367 was not correctly installed. When I reinstalled it, I begin getting the same problem I've always got: no desktop at all. So, I purged all nvidia drivers (sudo apt purge nvidia-*) and things were good again.

I thought that it might be the driver is too new, so I tried nvidia-340 from the graphic drivers PPA. This time the desktop did show up, but after I opened nvidia-settings and set the system to use my NVIDIA graphics card, I get a login loop after I logged out. I troubleshooted my problem according to the instructions given here, but nothing worked. Any driver newer than nvidia-340 gives me a blank screen.

I've checked my boot (UEFI) settings and I did disable secure boot, so that should not be causing any problems. I've done another glxinfo after I uninstalled all NVIDIA drivers, and it's right here: it looks like Nouveau doesn't even recognize my video card.

I do need to use my NVIDIA card because I do machine learning stuff and need to use CUDA, so I dp need some NVIDIA driver to be installed. My laptop model is Dell Inspiron i7559 and my Linux kernel version is 4.4.0-31-generic, if these matter.

I have installed the nvidia-367 driver successfully, and my desktop does show up (after trying quite a few drivers). However, when I type nvidia-detector into my terminal, none is returned. lspci does correctly lists my graphic card. My NVIDIA graphics card is GeForce GTX 960M.

I've tried a few drivers, namely nvidia-361, 364 and 370. None of them worked - the best outcome I've got is a login loop (which I could not fix even after searching online), and usually it's a black screen showing up (again, the solutions online and on here just don't work).
glxinfo gives this output: http://paste.ubuntu.com/23316740/, although I personally have no idea what this output means.
And here is what lspci says: 00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)' and 02:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2).

  • Please be a bit more specific on what you tried and what output you got during these trials. For example it would be helpful to see what lspci listed exactly (are there any other graphics cards, for example?) and which drivers you tried, where you got them and what wasn't working when you tried them? Also please post the output of glx_info to a pastebin (i.e. paste.ubuntu.com and add the link to your question. To improve on your question you can edit it and add all the information I asked for. Oct 13, 2016 at 7:58
  • Did you try the steps in the first answer here: askubuntu.com/questions/800418/ubuntu-and-nvidia-960m
    – Khashir
    Oct 22, 2016 at 17:32

1 Answer 1


I was facing same problem. I use the same GPU. Skylake and gtx960m

Here is how i fixed it.

  1. Disable the secure boot and reboot

  2. update the gl alternatives: run

    sudo update-alternatives --config x86_64-linux-gnu_gl_conf

    choose the nvidia drivers you have. this is what it looks for me:

    There are 3 choices for the alternative x86_64-linux-gnu_gl_conf (providing /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf).
    Selection    Path                                       Priority   Status
    * 0            /usr/lib/nvidia-375/ld.so.conf              8604      auto mode
      1            /usr/lib/nvidia-375-prime/ld.so.conf        8603      manual mode
      2            /usr/lib/nvidia-375/ld.so.conf              8604      manual mode
      3            /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf   500       manual mode

    Now your nvidia device files should be created in /dev.

  3. In case you are stuck in login-loop, just purge and install nvidia drivers again and login by logging into tty1

    sudo apt-get --purge remove nvidia-*
    apt-cache search nvidia 

    (you will find some versions of drivers - choose one to test install)

    sudo service lightdm stop
    sudo apt-get install nvidia-375 (for example)
    sudo service lightdm start

Everything works.

  • replaced with the text output
    – Baljeet
    Mar 24, 2017 at 11:04
  • Which driver are you using now? Does it work with CUDA, if you've tried to do that?
    – xuq01
    Aug 23, 2017 at 15:15
  • Tried a few times. This method doesn't quite work with me.
    – xuq01
    Aug 24, 2017 at 0:46
  • This worked with me and is still working... I have not even updated the nvidia driver yet..
    – Baljeet
    Aug 24, 2017 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .