Ubuntu14.04下安装Titan X显卡驱动b

时间:2015-12-24 22:06:25   收藏:0   阅读:4248

现在deep learning这么火,早就想学习学习,最近实验室买了块Titan X显卡,但是目前木有购买相应的服务器,一盘的台式机上带不动这块显卡,而且实验室配置的台式机相当陈旧,配置早已跟不上时代,装上也跑不动。

但是实验室有太工控机,配置还算可以,i7-3770T处理器,所以寻思着把显卡装这台机子上,当然,自带的电源适配器也是带不动的,所以特意买了个1000w的电源,插上显卡总算可以带动。

OK,装上Ubuntu14.04,然后参考网上某个教程安装Nvidia官网下载的驱动,跑个网上的demo,用GPU可以跑。。。。

 

但是。。。悲剧的是这台工控机不知道是怎么回事,只要断电再重启的时候,就会出现无法进入系统(出现启动选择界面,点击进入后崩溃重启,反复),开始以为是bios设置问题,就改了一些设置,发现真的有用(虽然后来证明是错觉),真的进去了,直接从Ubuntu点击重启,启动也没有任何问题,但是关掉电源第二天开机又是不断重启,改改bios后偶尔能够顺利进去系统,但是修改bios成功登录呈现随机现象,并不是设置成某种状态就可以,而是改一改偶尔能够登录。。。

而且当出现一直崩溃重启状态时就算想重装也是在出现安装界面后重启

今天某一个靠运气登录成功,想着是不是显卡驱动安装有点问题,于是准备重装一遍,按照这个教程又装了一遍:

from: http://askubuntu.com/questions/451221/ubuntu-14-04-install-nvidia-driver

You can download the driver for your video card for Ubuntu 64bit from here. Assuming that you are using Ubuntu 64bit now. If you installed Ubuntu 32 bit, there is 331 version of the same driver for Ubuntu 32bit. Save your driver somewhere where you can easily access it, like your user home directory or inside a newly created nvidia directory in your user home directory.

To be able to install your nvidia driver you have to remove your previous video driver with this code in a terminal window:

    sudo apt-get remove nvidia* && sudo apt-get autoremove

这里我还加了一步: sudo apt-get --purge remove xserver-xorg-video-nouveau-lts-utopic

(参考https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia,但是文中是卸载xserver-xorg-video-nouveau,我的机子上只有上面那个包) 

After you finish with this one, you should also blacklist the nouveau driver by editing this file with either:

    gksudo gedit /etc/modprobe.d/blacklist-nouveau.conf

or

    sudo nano /etc/modprobe.d/blacklist-nouveau.conf

…and add these lines at the end:

    blacklist nouveau
    blacklist lbm-nouveau
    options nouveau modeset=0
    alias nouveau off
    alias lbm-nouveau off

If, by any chance, there is no blacklist-nouveau.conf present in /etc/modprobe.d/, you can save your file as blacklist-nouveau.conf when prompted.

And you can also disable the Kernel Nouveau by typing these lines in a terminal window:

    echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf

and after that

    update-initramfs -u

Now you can reboot your computer, and when you get to the login prompt, press Ctrl+Alt+F1 to exit to the terminal console. Login with your username and password.

Go to the directory where you saved your nvidia driver using the command cd in the terminal console. Eg. cd nvidia considering that you are already in your user home directory after you login. You can use command dir to be able to see your exact driver‘s name.

To stop your display manager or the X server, you can type in the console this code:

   sudo stop lightdm   or

   sudo lightdm stop

If you are not using lightdm as your default display manager (DM), replace lightdm with your default display manager, which can be either kdm or gdm or whatever your display manager is.

You should get a message in the terminal console saying --> lightdm stopped/waiting

And now you can finally install the nvidia driver using a code similar to this one:

  sudo sh NVIDIA-Linux-x86_64.....run    (for Ubuntu 64bit)  

or

  sudo sh NVIDIA-Linux-x86.....run    (for Ubuntu 32bit)

If you don‘t type the exact name of the driver, you‘ll get this message: NVIDIA-Linux... could not be found and you should type again the code for installing the driver.

Nvidia installer automatically installs the driver, and at the end it will ask you whether you want to save your new X configuration. Press Yes. After reboot and getting to your desktop and changing your NVIDIA settings as you please you should open a terminal window and type in this code:

  sudo nvidia-xconfig

to save your new nvidia configuration in /etc/X11/xorg.conf.

Note

You might need to install some extra software packages if nvidia installer gives an error and prompts for missing dependencies:

    sudo apt-get install dkms fakeroot build-essential linux-headers-generic

But you need to install all these missing packages only if nvidia-installer can‘t do the job by itself.

It can happen that after reboot your system shows a black screen or enters the low graphics mode. To fix this you should exit again to the console terminal, login with your username and password, and use the code provided above sudo nvidia-xconfig and also make use of the following tutorial. It is meant to fix the greeter assuming that they haven‘t fixed this bug in Ubuntu 14.04.

结果貌似真的有用,到目前为止,断电重启都顺利登录。

所以记录下这个显卡安装教程。

其中一个问题是中间一个重启步骤的时候好像出现的根目录/损坏的提示,但是按提示修复后一切正常

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!