Page 1 of 1

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

Posted: Mon Feb 15, 2021 7:03 pm
by SJC_Steve
This guide is for those new to Folding-At-Home using Ubuntu Linux OS. This version contains more details on adding the Passkey and installing FAHViewer.

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.

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, install using Terminal Command; sudo apt install ocl-icd-opencl-dev
d. Reboot the PC

Step 2, Saving the FAH install files;
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, (required)
a. Retrieve a Passkey here, it's optional but encouraged; https://apps.foldingathome.org/getpasskey
b. Find the downloaded FAH files in the 'Downloads' folder.
c. Install the FAHClient with this example Terminal Command, substituting your path to the .deb file. The path can be found in 'Properties' of the file.
sudo apt install /home/steve/Downloads/fahclient_7.6.21_amd64.deb
d. Answer the questions that appear in the simple gui interface for FAHClient
User Name
Team (Optional)
Passkey (previously retrieved)
Full if dedicated to Folding
Auto-Start = Yes
e. Folding should start automatically.

Step 5, Installing FAHControl, (required for this install guide)
a. Using the same steps as in Step 4 but using this example command in the Terminal, again substituting your path;
sudo apt install /home/steve/Downloads/python3-fahcontrol_7.7.0-1_all.deb

Step 6, Start FAHControl;
a. Issue the 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, (if needed)
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. Note: Sometimes FAHControl hangs after Saving, if after a few moments it doesn't proceed, just close it and reboot.
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!

Step 8, Installing FAHViewer. This is an optional App that provides an animation of the Folding work being done.
a. Install FAHViewer using the same steps as in Step 4 but using this example command in the Terminal, again substituting your path;
sudo apt install /home/steve/Downloads/fahviewer_7.6.21_amd64.deb
b. You should now have the FAHViewer App in your 'Show Applications'

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

Posted: Thu Mar 11, 2021 10:02 pm
by RayW
Thanks, worked fine and running again. Guide was well written so that even I could figure it out.

Ray

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

Posted: Mon Oct 04, 2021 8:13 pm
by DocJonz
I have had to rebuild the software on one of my Ubuntu Folding machines, so I put on Ubunut 20.04.3 LTS ... and came across the fact that FAHControl would not install due to the Python 2 issue.
Thank goodness for this post :-)
Please FAH devs, get this problem fixed!

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

Posted: Sat Oct 23, 2021 7:10 pm
by Yesorno
Ubuntu v.20 has been out for more than a year now. How is this still not fixed? Ubuntu is the most popular distro and making things complicated to start folding is just going to make it harder for people to participate.

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

Posted: Sat Oct 23, 2021 7:44 pm
by DocJonz
I agree, especially as Python2 was 'sunsetted' in Jan 2020, so has not been supported for over 18 months.
If this isn't fixed ready for Ubuntu 22.04 LTS due in April, then I expect F@H will be lose support from some Ubuntu users.

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

Posted: Mon Nov 01, 2021 7:08 pm
by toTOW
There hasn't been any new client for a while ... so don't expect anything new on this until an eventual v8 client ...

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

Posted: Sun Jan 16, 2022 1:10 pm
by jmd
Thanks for this guide. I have struggled with installing FAHclient and the control application in my earlier attempts. This guide worked flawlessly.

Now the only thing I need to learn is how to turn it off. I have tried the usual systemctl and /etc/init.d command and they do not work. I killed it with the kill command.

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

Posted: Sun Jan 16, 2022 6:34 pm
by gunnarre
It's possible to make a better start-up script that plays well with Ubuntu 20:
viewtopic.php?f=81&t=33353#p318278
TL;DR For the users: To work around this, I created a systemd unit to start FAHClient instead of the init.d script. This works by using the systemd unit's "User" option to change users instead of having FAHClient do it.

First, stop FAHClient ("sudo systemctl stop FAHClient").

Create /etc/systemd/system/FAHClient.service (The name matters; calling it this will automatically supersede the init.d script of the same name), with the following contents:

Code: Select all

[Unit]
Description=Folding@Home Client
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/FAHClient /etc/fahclient/config.xml --pid-file=/var/run/fahclient/fahclient.pid --daemon
PIDFile=/var/run/fahclient/fahclient.pid
User=fahclient
RuntimeDirectory=fahclient
WorkingDirectory=~

[Install]
WantedBy=multi-user.target
Then do the following:

Code: Select all

sudo systemctl daemon-reload
sudo systemctl start FAHClient.service
# And, if you want it to start automatically on boot...
sudo systemctl enable FAHClient.service
Also add fahclient to the "video" and "render" groups, if applicable, to allow GPU computing.

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

Posted: Mon Jan 17, 2022 2:35 am
by jmd
@gunnarre Thanks for this pointer. I'll give it a go when the BOINC queue empties.

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

Posted: Tue Jan 18, 2022 1:04 pm
by jmd
Thanks for all of the help.

Adding the code from @gunnarre post to create a systemd service didn't work. I am going back to WCG Open-Pandemics and I'll check back when a new FAH client comes out.

Solved --> installing FAH v7.6.21 on Ubuntu 20.04.2 LTS v

Posted: Thu Feb 03, 2022 9:44 pm
by tcphillips
After following the guide, and a period in which 7.6.21 would not accept my passkey, it finally accepted my passkey and we're off and running.
So the answer to my question below would appear to be "YES", the guide handles multiple GPUs, and "NO" there's no need for additional instructions.

--T


Using this guide, I converted a couple older machines to Ubuntu and it worked perfectly.
Thank you.

Now for the Linux n00b question...
One of my machines is a two GPU rig, one - GTX 750 and one - GTX 950 (running OpenCL (extra-core-args --disable-cuda) because it blows up running CUDA (probably an older card that wants to die)).

Does the guide handle the installation of the two - GPU scenario as I've described, or do I need additional steps (and therefore help from this august group)?

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

Posted: Sat Jul 30, 2022 10:10 am
by zincan_images
I clearly resolved. And also this guide useful for Ubuntu 18.

After installed Bionic, open recommended update window, automatically. I run this update, and feel like this update is include Python 3 and cleanup these environments.

So, I couldn’t open FAH Control. and I try this guide(I uninstall FAH Control). And then I resolved my issue.

:D Thanks for your help!! :D

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

Posted: Sun Jul 31, 2022 12:15 pm
by DocJonz
@zincan_images - the alternative for Ubuntu is to install the whole lot via Snap (including a working FAHControl) - see this thread;
Ubuntu 22.04 LTS FAHcontrol installation

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

Posted: Fri Nov 11, 2022 8:33 pm
by favrepeoria
I am having issues with this now as it seems the python version has advanced(3.10) and the code is using a deprecated call to collections. This is the error i get when trying to start FAHControl in linux Mint 21. Anyone got any ideas on how to solve?

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/FAHControl", line 25, in <module>
    from fah import FAHControl, load_fahcontrol_db
  File "/usr/lib/python3/dist-packages/fah/__init__.py", line 25, in <module>
    from . import util
  File "/usr/lib/python3/dist-packages/fah/util/__init__.py", line 24, in <module>
    from .OrderedDict import *
  File "/usr/lib/python3/dist-packages/fah/util/OrderedDict.py", line 23, in <module>
    from collections import MutableMapping as DictMixin
ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_FAHControl.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/FAHControl", line 25, in <module>
    from fah import FAHControl, load_fahcontrol_db
  File "/usr/lib/python3/dist-packages/fah/__init__.py", line 25, in <module>
    from . import util
  File "/usr/lib/python3/dist-packages/fah/util/__init__.py", line 24, in <module>
    from .OrderedDict import *
  File "/usr/lib/python3/dist-packages/fah/util/OrderedDict.py", line 23, in <module>
    from collections import MutableMapping as DictMixin
ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
Anyway my error was related to not getting the FAHControl to install/function properly. Once I followed post #10 at https://forums.anandtech.com/threads/fa ... 0.2582819/. This solved the issues and gets around needing python 2 for the standard FAHControl