Page 1 of 1

Everyman's Guide to Nvidia GPU Folding on Ubuntu Server

Posted: Sat Mar 28, 2015 10:41 pm
by everyman
Preface

I am writing this in hope of saving someone else the time and trouble that I have gone through to get my system folding on Linux.

This guide assumes the following:

That you want to install Linux for FAH and not much else.
That you have read this guide and the links therein before you started.
That you already know how the GNU/Linux file system is structured.
That you are familiar with Bash and the basic command line tools.
That you have some knowledge of Ubuntu and Debian package management tools.
That you can install the latest LTS version of Ubuntu Server on your own.
That you know your hardware.

It is also assumed that you don't mind reading a few biased statements from myself about Linux and Ubuntu. If you don't feel comfortable or are worried about any part of this guide I highly recommend that you just don't follow it. In any case it is always a good idea to have a second PC close by that you can use to use to access the internet and look for help, Wiki's, HowTo's, and forums if you get stuck. The only thing I would recommend you download and have ready on removable media is the install file for Nvidia's drivers (http://www.nvidia.com/object/unix.html).

Installing the OS: Keeping It Simple.

The only packages I chose to install with the base server were those needed for OpenSSH, and that was just because I wanted a way to access the system over my network on the off chance I lost the display or keyboard. In My Not So Humble Opinion: One of biggest hurdles FAH users must overcome to fold in Linux is the complexity of Desktop distros. The fewer packages you start with the easier it is control the whole system.

Once you have the completed your install and rebooted the first thing to do is edit the blacklist file for the kernel modules in order to stop the FOSS Nvidia drivers from loading:

Code: Select all

sudo nano /etc/modprobe.d/blacklist.conf
Add this line (I put it right at the top, but anywhere should do):

Code: Select all

blacklist nouveau
Save and exit, then reboot.

Installing what we need and what we need in order to test what we installed.

When you have logged back in, install the build-essential package in order to get the tools needed to install Nvidia's drivers:

Code: Select all

sudo apt-get install build-essential
Next (re?)read about and add the xorg-edgers ppa:

Code: Select all

Instructions and warnings can be found here:

  
https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa
Now install Xorg and a light weight desktop:

Code: Select all

sudo apt-get update
sudo apt-get install xorg e17
Now insert and mount your removable media with Nvidia's drivers:

Code: Select all

sudo mount /path/to/device /path/to/mount/point
i.e. For cdrom it would be something like

Code: Select all

sudo mount /dev/sr0 /mnt
or for a USB drive something like

Code: Select all

sudo mount /dev/sdb1 /mnt
Next, install Nvidia's drivers with a command something like this:

Code: Select all

cd /mnt
sudo sh ./NVIDIA-Linux-x86_64-<Your.Version.Number.Here>.run
Once it is finished:

Code: Select all

cd
sudo umount /mnt
A few words about Enlightenment and OpenGL.

Enlightenment (e17) is a very light weight GUI that won't get in your way too much. However, if you tell it to it will use OpenGL and compositing effects. That in turn will lead to lower GPU performance for FAH. So during these next steps, I turned that stuff off.

Testing what we have installed so far.

First make sure the nvidia modules are loaded:

Code: Select all

sudo lsmod | grep nvidia
If you see both Nvidia modules then skip the next step. If not then do this:

Code: Select all

sudo modprobe nvidia-uvm
sudo modprobe nvidia
Next we start the Xorg server:

Code: Select all

startx
After a few questions about where you are, what language you speak, and how much GPU power you want to waste on OpenGL, you should be looking at a desktop! If not, reboot. This will force the system to load all the new stuff we installed. If that doesn't work, something has gone wrong that is outside of the scope of this Guide. Please post all questions to the appropriate forums/mailing lists. IMPORTANT NOTE: Following this guide gives you a system that will not start the GUI automatically at boot time. It must be started manually with the "startx" command. The GUI does NOT need to be running to fold. We just install it in order to make sure the Nvidia drivers are working as expected and so you can have access to FAHControl and a graphical web browser if needed.

Next, install your favorite web browser. Something like:

Code: Select all

sudo apt-get install firefox
And once it's installed go here and follow the instructions for a manual install:

Code: Select all

http://folding.stanford.edu/home/guide/linux-install-guide/
On my system this was enough to start CPU folding, but the GPUs.txt didn't get downloaded/installed. If that happens to you as well then you can simply manually download it from the link in this thread:

Code: Select all

https://foldingforum.org/viewtopic.php?f=83&t=26208
Then do this:

Code: Select all

sudo service FAHClient stop
sudo cp /home/yourusername/Downloads/GPUs.txt /var/lib/fahclient/
sudo service FAHClient start
And then manually add your GPU slot(s) in FAHControl.

That's it, you're done! Go outside and play while your computer does all the hard work!


Yours,

E

P.S. If you happen to find an error or a spelling mistake or just have something to add please let me know so I can take care of it. In the mean time I will continue to edit this post with after thoughts and what not.

Re: Everyman's Guide to Nvidia GPU Folding on Ubuntu Server

Posted: Sun Mar 29, 2015 1:53 am
by 7im

Re: Everyman's Guide to Nvidia GPU Folding on Ubuntu Server

Posted: Sun Mar 29, 2015 8:11 am
by everyman
7im, that was where I started from last month. I was just not satisfied with most of the desktop distros I tried because there was always something that made it more complicated than I felt it should be. In most cases it was a feature that was meant to make the Desktop prettier or sometimes easier to use. In rarer cases it was a software dependency that pulled in things I was never going to use and didn't want to spend bandwidth updating (i.e. the Samba-CUPS-LibreOffice-Java loop in Mint that the Mate Desktop metapackage pulls in). If I was a true Greybeard I would just create a FAH Portage overlay in Gentoo, or even a special minimalist FAH distro. That would be a full time hobby though. I like Linux, but not that much!


E