Bad Experience! NVIDIA***! Loop login ! Failed installation! ubuntu16.04+gtx965m+linux-headers-4.4.0

Really hate the experience!

My laptop alienware 15 R2 is used for deep learning research with dual system, one window 10 just used for system maintenance, the other ubuntu16.04 used for research with intel hd 530 graphics and nvidia gtx965m

I followed all the steps in the document but failed!!

  1. I have failed many times and finally find out I have to firstly disable the secure boot.

  2. sudo apt-get install build-essential

  3. Then I install the nvidia driver from the official website

  4. Follows the instruction. No information in the document tells whether it must use the specific linux-headers and if it will make troubles.

  5. Disabled the nouveau

  6. sudo service lightdm stop

  7. install the cuda with -no-opengl-libs

  8. Here, it shows missing libs such as etc

  9. reboot, then loop login!!!

I do not known how to solve this. I do not know whether it is the conflicts between the intel graphic card and nvidia or the xorg to nvidia. There is few information on the net.

I do not know why it is so difficult just for installing a driver and library kit and still no significantly improvement on the user experience since many people are working under linux with nvidia. So bad experience!

Alright, I re-installed the system to be ubuntu14.04.5 with linux-headers- ( I think this linux-headers does not matter)

Then did as what the above shows, adding this

sudo apt-get install dkms

Finally make it!

No!!It is not solved! install dkms is useless!

Finnaly made it!!

After a deep analysis, this issue is not related to nvidia driver. This issue is caused by the multiple graphic cards that nvidia card is not compatible to those.

So the solution is to resolve the conflicts between the different incompatible graphic cards.


  1. sudo apt-get install build-essential

  2. blacklist nouveau

  3. sudo service lightdm stop

  4. install latest cuda driver
    Here, I installed the latest cuda driver, in which there is an important option is to choose the x configuration that tells you choose yes when you want to use multiple graphic cards.

  5. Here, I referred to this instruction

However, I just install the application but I do not know whether this conflict issue is solved by this nvidia-prime or the choice in cuda driver installation, I did not valid it.

sudo apt-get install nvidia-prime

  1. reboot