Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS v1

Moderators: Site Moderators, FAHC Science Team

SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS v1

Post by SJC_Steve »

This guide is for those new to Folding-At-Home using the Ubuntu Linux OS

Acknowledgement; Much of this Guide is the result of the efforts of others on this forum and I would like to thank all of them for their generous guidance. This is a work in progress, better ways of installing FAH are welcomed. I would like to get rid of Step 7, which is the only manual intervention in the installation process.

Test conditions;
* CPU - AMD R7-3700X, (not critical, either AMD or Intel should be OK)
* GPU - Nvidia GTX 1060, 3G, Nvidia Driver 460.32.03, (Critical when using Nvidia GPUs, AMD drivers for AMD devices will also be critical.)
* OS - Ubuntu 20.04.2 LTS, Minimal Install, Fully Upgraded, (other Ubuntu releases may be similar.)
* FAHClient v7.6.21, (using the latest release of FAHClient)
* Uses the GUI Interface of Ubuntu

Step 1, Getting the OS ready to Fold;
a. Update and Upgrade Ubuntu
b. Nvidia drivers are required to Fold if you have a NVidia gpu. Open Ubuntu 'Software and Updates' then 'Additional Drivers'. Ensure that 'Using ... nvidia-driver-460' is selected and then 'Close'
c. OpenCL dev files are required to successfully use any gpu for Folding;
Open a terminal and issue the following command;
sudo apt install ocl-icd-opencl-dev
d. Reboot the PC

Step 2, Installing the FAHClient file which is the basic requirement for folding work;
a. Open https://foldingathome.org/home/
b. Choose 'Start folding'
c. Under 'Debian / Mint / Ubuntu', choose;
fahclient_7.6.21_amd64.deb
Do not 'Open' but rather choose 'Save'
d. [Optional] Do the same for FAHViewer by Saving;
fahviewer_7.6.21_amd64.deb
Note; The third file, FAHControl requires Python2 while Ubuntu 20.04 uses Python3. This guide uses a pre-release version of FAHControl that will be covered in the next step.

Step 3, Saving the FAHControl file. This App is used as the GUI Interface for the FAHClient.
a. Go to;
https://github.com/cdberkstresser/fah-control/releases
b. Choose 'Testing Builds for Python 3'
c. Choose 'python3-fahcontrol_7.7.0-1_all.deb'
Save, don't open

Step 4, Installing FAHClient
a. Find the downloaded FAH files in the 'Downloads' folder.
b. Install the FAHClient in the Terminal by issuing this example command, substituting your path to the .deb file. The path can be found in 'Properties' of the file.
sudo dpkg -i /home/steve/Downloads/fahclient_7.6.21_amd64.deb
c. Answer the questions that appear in the simple gui interface for FAHClient
d. Folding should start automatically.

Step 5, Installing FAHControl using the same steps as in Step 4 but using this example command in the Terminal, again substituting your path;
sudo dpkg -i /home/steve/Downloads/python3-fahcontrol_7.7.0-1_all.deb

Step 6, Start FAHControl;
a. Issus this Terminal command;
FAHControl & exit
b. A window should appear for FAHControl showing the status of the FAHClient
c. Under 'Status', 'Folding Slots' check whether there are one or two slots 'Running'.
d. If there are two slots running, 'cpu' & 'gpu', your done!
e. However, if there is only one slot running, more steps are required to get the gpu running

Step 7, Enabling the GPU;
a. Choose 'Configure' at the top left of the FAHControl window and then choose 'Expert'
b. In the 'Extra Client' items, look for 'gpu' 'false'
c. Expand the window so you see the commands 'Add and 'Remove' near the bottom
d. Choose the gpu false attribute and then click 'Remove'
e. Choose 'Save' and when it's done saving, close all open windows and reboot the PC.
d. After reboot, use FAHControl and exit in the Terminal and check whether two slots are running as in Step 6. If both the cpu and gpu slots are running, you're done!

Note to self, add Loading of FAHViewer.
If you're curious about how this Guide came to be - look here https://foldingforum.org/viewtopic.php?f=108&t=36786
Last edited by SJC_Steve on Mon Feb 15, 2021 6:06 pm, edited 1 time in total.
bikeaddict
Posts: 192
Joined: Sun May 03, 2020 1:20 am

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by bikeaddict »

A reboot shouldn't be needed in step 7. Either restart the FAHClient service or use the Slots tab under Configure in FAHControl to add a new GPU slot.

Some steps that aren't Linux-specific, but still need to be done in step 6:

The name, team number and passkey should be entered on the Identity tab of FAHControl.

Set the Cause to COVID-19 (or your preference) under Advanced in Configure unless you want it to default to Any. I also set Folding Core Priority to Slightly higher, even though it doesn't seem to do anything,

And if this is a dedicated machine, set the Folding Power to Full in FAHControl.
SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by SJC_Steve »

bikeaddict wrote:A reboot shouldn't be needed in step 7. Either restart the FAHClient service or use the Slots tab under Configure in FAHControl to add a new GPU slot.
In my experience, changing the critical gpu = false attribute is key to Folding on the gpu. Without a restart of the Client, it will not update the config.xml file. For newbies, rebooting is simple, however as you say, there are other ways to get to the end result. I'm trying to minimize new commands.

My #1 priority is advice on how to avoid Step 7.

Why is the FAHClient starting with gpu = false in both the Config.xml and FAHControl when both OpenCL dev files and Nvidia drivers are loaded and operational?

Thanks, Steve
bikeaddict
Posts: 192
Joined: Sun May 03, 2020 1:20 am

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by bikeaddict »

To find the reason for it disabling the GPU, look in the logs. The current log is at /var/lib/fahclient/log.txt and previous logs are stored in /var/lib/fahclient/logs/ on Fedora. Not sure where they are on Ubuntu.
Gnomuz
Posts: 31
Joined: Sat Nov 21, 2020 5:07 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by Gnomuz »

This guide is a great initiative as Linux has significantly better folding performance than Windows, but installation is less straightforward for beginners.
Just a small add-on, when it comes to restart the FAH client, it's not that complicated, and from my personal experience the commands under Ubuntu (and more generally Debian) to avoid a reboot in step 7 would be

Code: Select all

/etc/init.d/FAHClient stop
/etc/init.d/FAHClient start
Thanks again and let's keep folding

PS : in Ubuntu, path to logs is /var/lib/fahclient/
Image

Nvidia RTX 3060 Ti & GTX 1660 Super - AMD Ryzen 7 5800X - MSI MEG X570 Unify - 16 GB RAM - Ubuntu 20.04.2 LTS - Nvidia drivers 460.56
SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by SJC_Steve »

bikeaddict wrote:To find the reason for it disabling the GPU, look in the logs. The current log is at /var/lib/fahclient/log.txt and previous logs are stored in /var/lib/fahclient/logs/ on Fedora. Not sure where they are on Ubuntu.
The logs are included in the link at the bottom of the Guide. Look near the last post on page four. It simply shows the value of gpu=false in the start-up but I can't see a reason for it, maybe you can.
Thanks, Steve
bikeaddict
Posts: 192
Joined: Sun May 03, 2020 1:20 am

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by bikeaddict »

After trying a Google search for "folding@home ubuntu gpu false" I saw a few other people who had to edit the config and flip gpu from false to true or remove it. This may be the intended behavior to initially disable the GPU, or it may be a bug.
ajm
Posts: 754
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by ajm »

A few thoughts:

According to that log, OpenCL was not found when FAH was launched:

Code: Select all

18:54:48: OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so':
18:54:48: libOpenCL.so: cannot open shared object file: No such file or
18:54:48: directory
It may be why the GPU flag is set to false just afterwards in the config file:

Code: Select all

18:54:48: <gpu v='false'/>
I'm not familiar with Ubuntu any more, but I remember that you had to manually get some Nvidia packages and then install the needed elements (and then run the install command for the dev package, and then reboot) for it to have a chance to work.
It went like this:

Code: Select all

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get install dkms build-essential
sudo apt-get update
sudo apt list nvidia-driver
sudo apt install nvidia-driver-XXX
In your tutorial, you say:
a. Update and Upgrade Ubuntu
b. Nvidia drivers are required to Fold if you have a NVidia gpu. Open Ubuntu 'Software and Updates' then 'Additional Drivers'. Ensure that 'Using ... nvidia-driver-460' is selected and then 'Close'
c. OpenCL dev files are required to successfully use any gpu for Folding;
Open a terminal and issue the following command;
sudo apt install ocl-icd-opencl-dev
d. Reboot the PC
Not sure what the current version of Ubuntu will do, exactly, and when, with this method. Maybe the same thing, maybe not?

Then after installing FAHClient, you also had to manually download the GPUs.txt file, like this:

Code: Select all

sudo wget http://fah-web.stanford.edu/file-releases/public/GPUs.txt -P /var/lib/fahclient/
Now, if you don't, and this file is not there when the service is started, FAH may disable the GPU before it can download the GPUs.txt.

Hope this helps.
SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by SJC_Steve »

ajm wrote:A few thoughts:

According to that log, OpenCL was not found when FAH was launched:

Code: Select all

18:54:48: OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so':
18:54:48: libOpenCL.so: cannot open shared object file: No such file or
18:54:48: directory
Hi,
You're looking a initial log before I installed the OpenCL dev files - the thread is getting rather long and unmanageable.

Please look here for the most recent log which contains no OpenCL issues.

https://foldingforum.org/viewtopic.php? ... 45#p349115

Thanks, Steve
ajm
Posts: 754
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by ajm »

OK. Then maybe the thing with the GPUs.txt not present when starting the service?
SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by SJC_Steve »

bikeaddict wrote:After trying a Google search for "folding@home ubuntu gpu false" I saw a few other people who had to edit the config and flip gpu from false to true or remove it. This may be the intended behavior to initially disable the GPU, or it may be a bug.
That's exactly what I was thinking! After doing the same search you did, it appears this has been going on some years in some form or another. However, others keep saying that the default is gpu=true but mine never comes up that way. Hopefully someone can shed some light on this whether it is intended operation or a bug.

This is an examle post from a nearly a year ago;
https://linustechtips.com/topic/1166294 ... -on-linux/

Thanks, Steve
SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by SJC_Steve »

ajm wrote:OK. Then maybe the thing with the GPUs.txt not present when starting the service?
I ran the command to get the GPUs.txt file and it downloaded it to the intended folder. I then reinstalled FAHClient but same result, GPU=False

Thanks,
Steve
ajm
Posts: 754
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by ajm »

Did you delete all data before reinstalling? If not, the config file stood there as it was, with its flag.
It's meant to be like that, so that you can install another version of the client without having to reconfigure the user and the preferences stored in the config file.
SJC_Steve
Posts: 42
Joined: Wed Feb 03, 2021 7:26 pm

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by SJC_Steve »

ajm wrote:Did you delete all data before reinstalling? If not, the config file stood there as it was, with its flag.
It's meant to be like that, so that you can install another version of the client without having to reconfigure the user and the preferences stored in the config file.
Yes, I Purged the Client and rebooted. I looked for the config.xml file but there was no such file. Then I downloaded the GPUs.txt file to the intended directory. I then installed a new copy of the Client and again, no Folding due to gpu=false. Nothing changed.

Thanks,
Steve
ajm
Posts: 754
Joined: Sat Mar 21, 2020 5:22 am
Location: Lucerne, Switzerland

Re: Guide for installing FAH v7.6.21 on Ubuntu 20.04.2 LTS

Post by ajm »

Then Joe is probably right: viewtopic.php?p=349156#p349156
If FAH is installed as a service (daemon), the value is set to false and has to be changed manually. And it should be done immediately after installation.
But I must say I don't remember having had to do that. Maybe some new "feature" of the latest versions of FAH?
Post Reply