Install CUDA on laptop with Optimus
Jan. 26th, 2017 12:44 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Recipe from here
"So, I've spent a week and a half getting Caffe to work on my machine. I've finally managed to do so on my Asus N551JQ which is running on Ubuntu 14.04 LTS. The laptop features an NVIDIA GT845M dGPU and Intel HD Graphics iGPU, which caused some problems installing NVIDIA drivers. However, everything is working now. As it took me a long time to get everything running, I figured I could help future users by explaining my method of installation. Below is the method I used:
Hope I have helped you.
Regards,
Emiel Stoelinga"
"So, I've spent a week and a half getting Caffe to work on my machine. I've finally managed to do so on my Asus N551JQ which is running on Ubuntu 14.04 LTS. The laptop features an NVIDIA GT845M dGPU and Intel HD Graphics iGPU, which caused some problems installing NVIDIA drivers. However, everything is working now. As it took me a long time to get everything running, I figured I could help future users by explaining my method of installation. Below is the method I used:
- Install a clean version of Ubuntu 14.04 LTS
- Remove UEFI secure boot. sudo mokutil --enable-validation After restart Mok managment will pop up. There will be an option where you can enable secure boot (just like you disabled after installing Ubuntu). - from http://askubuntu.com/a/768822/241348
- remove dkms and bbswitch and bumbleebee
- Download NVIDIA Geforce driver 352.79 from: http://www.geforce.com/drivers
- Download CUDA 7.0 from: https://developer.nvidia.com/cuda-toolkit-70
- Follow post #4 on the following link untill point 5 http://ubuntuforums.org/showthread.php?t=2246526#4.
0. Purge all previous nvidia stuff you might have tried installing.
1. Download the latest CUDA toolkit .run file
2. Blacklist the nouveau driver by appendingto /etc/modprobe.d/blacklist.conf and rebootingblacklist nouveau
options nouveau modeset=0
3. When you reboot, don't log in. Drop to the terminal by CTRL-ALT-F1, and kill lightdm by4. Extract the individual parts from the cuda toolkit archive you downloaded earlier bysudo service lightdm stop5. Navigate to your_fav_dir./<cuda-archive-name> --extract=<your_fav_dir> - Then navigate to the download directory where you saved the drivers that you previously downloaded in step 2 of this tutorial and run the setup by: sudo ./NVIDIA-Linux-x86_64-352.79.run --no-opengl-files
- Do not exclude the --no-opengl-files part.
- Go on with step 7 of the guide in the link by going into the directory in which you extracted the CUDA archive and installing CUDA and its samples.
- Then go on with the guide in post #5 in the same thread. Thereafter, NVIDIA drivers should be working and CUDA should be installed. Time to start with the Caffe installation!
- You can pretty much follow the following guide: http://caffe.berkeleyvision.org/install_apt.html Be sure to correctly install ALL dependencies. If anything fails, fix it.
- After compilation, my make runtest wouldn't start. I had to set an environment variable in ~/.profile "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64" and had to reboot before it started and succesfully executed.
Hope I have helped you.
Regards,
Emiel Stoelinga"