ubuntu 16.04 nvidia驱动安装系统循环登陆无法进入桌面

     纠结了很久,终于找到了ubuntu16.04 nvidia驱动正确的安装方法,以下是论坛中给出的安装步骤,记录一下。

Post of final script and solution

0) Download your relevant CUDA.run file: mine was: cuda_7.0.28_linux.run
Note, that once again this install is if you purely want to use your graphics card (Titan X) for GPU/CUDA purposes and not for rendering.

Also run: $sudo apt-get install build-essential

1) I start off with the regular GUI and Ubuntu working with no login problems.
2) No need to create an xorg.conf file. If you have one, remove it (assuming you ahve a fresh OS install). $ sudo rm /etc/X11/xorg.conf 

3) Create the /etc/modprobe.d/blacklist-nouveau.conf file with :
blacklist nouveau
options nouveau modeset=0      //原为option有误,已修改

Then $sudo update-initramfs -u

4) Reboot computer. Nothing should have changed in loading up menu. You should be taken to the login screen. Once there type: Ctrl + Alt + F1, and login to your user.
5) Go to the directory where you have the CUDA driver, and run
$chmod a+x .
7) Now, run $ sudo service lightdm stop
The top line is a necessary step for installing the driver.
8) I run the CUDA driver run file. *Notice that I explicitly don't want the OpenGL flags to be installed:
$ sudo bash cuda-7.0.28_linux.run --no-opengl-libs

9) During the install: 
Accept EULA conditions
Say YES to installing the NVIDIA driver
SAY YES to installing CUDA Toolkit + Driver
Say YES to installing CUDA Samples

Say NO rebuilding any Xserver configurations with Nvidia.

10) Installation should be complete. Now check if device nodes are present:
Check if /dev/nvidia* files exist. If they don't, do :
$ sudo modprobe nvidia

11) Set Environment path variables:
$ export PATH=/usr/local/cuda-7.0/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH

*Change depending on your cuda version.

12) Verify the driver version:
$ cat /proc/driver/nvidia/version

13) Check CUDA driver version:
$ nvcc -V

[Optional] At this point you can switch the lightdm back on again by doing:
$ sudo service lightdm start. 

You should be able to login to your session through the GUI without any problems or login-loops.

14) Create CUDA Samples. Go to your NVIDIA_CUDA-7.5_Samples folder and type $make.

15) Go to NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/ for the demos, and do the two standard checks:
./deviceQuery
to see your graphics card specs and
./bandwidthTest
to check if its operating correctly.

Both tests should ultimately output a 'PASS' in your terminal.

16) Reboot. Everything should be ok.



原地址: https://devtalk.nvidia.com/default/topic/878117/cuda-setup-and-installation/-solved-titan-x-for-cuda-7-5-login-loop-error-ubuntu-14-04-/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值