Friday, November 20, 2015

Installing Titan X drivers and Cuda 7.5 to Ubuntu 14.04 LTS

Download the installer
Then get rid of any Nvidia residuals, run the following command in a terminal 
sudo apt-get remove --purge nvidia*
This may take a while, so be patient. Once it’s done, reboot your machine. At the login screen, don’t login just yet. Press Ctrl+Alt+F1 to switch to a text-based login, and switch to the directory which contains the downloaded driver. Run the following commands -
sudo service lightdm stop
change permissions to the installer where NVIDIA*.run is the full name of your driver.
chmod +x NVIDIA*.run
Next, start the installation with -
sudo ./NVIDIA*.run
Restart computer. 

Titan X for CUDA 7.5 login-loop error [Ubuntu 14.04] after power out

My computer was not responding so I did a hard shut down and when it restarted I couldn't login.
I found for solutions and everything seemed to point that I needed to reinstall my drivers.

To get to this conclusion I inspected the .xsession_errors file and it told me I had a few errors. One of them was with team viwere so I did remove it

sudo apt-get purge teamviewer
Another issue was an error that went something like this

"GLX couldn't find display"

Some forums said to reinstall the drivers.
One easy way to reinstall the drivers is to do it through :

sudo add-apt-repository ppa:mamarley/nvidia

sudo apt-get update

sudo apt-get install nvidia-352
where 352 is the latest driver for Titan X. I did this and reboot the system. After this I was able to login. However, I still needed to fix cuda because the new installation of drivers broke my cuda installation. How to fix the cuda part will be on another post. Good luck





Thursday, November 19, 2015

Install OpenCV 2.4.10 in Ubuntu 14.04 to work with Caffe

As I mentioned in previous posts. This is a tricky problem and can take quite some time to get the right versions and dependencies figured out. That is the joy or working with opencv, linux and caffe (sarcasm)

Here is a link to a script I used to get opencv working to use with caffe. I tried installing opencv 3.0 but failed because of some issues with that version. I also tried getting 2.4.9 installed and also failed because wasn't compatible with my cuda library since I have CUDA 7.0 and a Titan X.

After many tries, installing the dependecies in this link helped. Please share your solutions if you found some issues.

https://github.com/olivernina/ubuntu-scripts/blob/master/install-opencv.sh


I also found some useful information in this link :
http://milq.github.io/install-opencv-ubuntu-debian/

Also I noticed that it helped to add my libraries to my LD path

export LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/local/lib

And also anytime there was an error on compiling opencv and I needed to recompile it was better to erase the build directory and start all over. But of course everyone knows this right? :)

Thursday, November 12, 2015

Rename external hard drive in Linux

Usually hard drives have long names and you just want to rename them. One easy way to do that is by using label commands in Linux. For instance:

sudo ntfslabel /dev/sdd1 sea1

where sea1 is the new name.
You also need to know which drive is which to do that you can just do:

sudo fdisk -l

If you want to know which type of file system you have, you can do:

blkid /dev/sdd1

If you have exFAT then just use :

sudo exfatlabel /dev/sdd1 sea1