ubuntu - driver installation - X

Sorry for posting it here, it’s not really a development ticket, but chat support redirected me here.
I’m trying to install a driver for my NVIDIA GPU, in order to use pytorch’s cuda.

I have a GeForce GTX860M, and a Ubuntu 16.04.
I downloaded the .run file, executed it.

It seems to work perfectly in itself (I can use some cuda accelerations), but I cannot log in Linux graphical mode: I can start my ligthdm service to have a graphical interface, but when I try to log in, it just resets the screen and ask me to log again.

Do someone already faced this problem and found a solution ?

Thanks a lot !

You shouldn’t have used the .run installer since this is supposedly an Optimus laptop. Uninstall the driver using the --uninstall option, then install the drivers from the Ubuntu graphics ppa. Make sure the packages nvidia-prime and ubuntu-drivers-common are also installed.
If you still have problems after that, run nvidia-bug-report.sh as root and attach the tar.gz file it creates to your post.