How To FAHControl on Linux

StefanR5R

Elite Member
Dec 10, 2016
5,512
7,818
136
Copying this out of the race thread for easier reference:
I was able to install FAHClient and FAHViewer from the Folding@home web site [on Linux Mint 20], but when I tried to install FAHControl I get an error that says "Error: Dependency is not satisfiable: python-gtk2|python-gnome2".
For the time being, there are these possibilities to deal with Folding@Home client control on Linux:
For the last item, remote control:
Prefer to do this within your LAN, not over untrusted networks, for security reasons.
Prepare the client's config.xml to allow remote control (from within your LAN). Look the syntax up in the manual page, or easier, take the syntax from a config.xml of a Windows client which you configured for remote control via a locally running FAHControl. E.g. for password-less access from 192.168.0.xx to the client, add this line to config.xml:
<command-allow-no-pass v='127.0.0.1 192.168.0.0/24'/>
On the host which runs the client, unblock inbound TCP requests to port 36330 if there is a port filter running on the host (vulgo, a firewall).
 
Last edited:
  • Like
Reactions: voodoo5_6k

voodoo5_6k

Senior member
Jan 14, 2021
395
443
116
Just in case this helps, an example from Debian... (also copied over from the race thread)

Note 1: This assumes you have your system installed & updated, and the GPU is ready to go (i.e. drivers etc. are installed).

Note 2: I prefer to install the client without autostart and launch it via a script (the same for BOINC). That way, I have more control over what the system does after a reboot.

Code:
#Install the client manually
sudo wget https://... (insert the link to the newest fahclient for Debian)
sudo dpkg -i fahclient_file_name (*.deb)

#Place GPUs.txt in /var/lib/fahclient
sudo wget https://apps.foldingathome.org/GPUs.txt -P /var/lib/fahclient

#Edit config.xml
sudo nano /etc/fahclient/config.xml

#Enable GPU (change the below option to true)
<gpu v="true"/>

#Enable full power (change the below option to full)
<power v="full"/>

#Add remote access config & password (change x.x.x.x to your admin workstation's IP address and xyz to your desired password)
<allow>127.0.0.1 x.x.x.x</allow>
<password>xyz</password>

#Preconfigure the client (add the following)
<client-type v=”advanced”/>

#Preconfigure the slots (add the following and adapt for your system)
<slot id=”0” type=”GPU”>
  <paused v=”true”/>
</slot>
<slot id=”1” type=”CPU”>
  <paused v=”true”/>
</slot>

#Save and exit

#Restart fahclient
sudo /etc/init.d/FAHClient start

Now, go to your admin workstation's FAHControl and add your new client, with its IP address, password (configured in the config.xml), and port (usually 36330). Check your firewall to allow such traffic. Once FAHControl has connected to the client, check and maintain your configuration, and unpause the slots. Done.

Edit: Corrected typo in localhost address
 
Last edited:
  • Like
Reactions: biodoc

Markfw

Moderator Emeritus, Elite Member
May 16, 2002
25,556
14,512
136
I will have to try this thursday when the new card comes.
 

ericlp

Diamond Member
Dec 24, 2000
6,133
219
106
Hmm, last time I used Linux for SETI, it was kind of a pain to get the CUDA drivers working... Those were the days lol! Hopefully the process is much better now!

1649045605997.png
 

Skillz

Senior member
Feb 14, 2014
926
951
136
Hmm, last time I used Linux for SETI, it was kind of a pain to get the CUDA drivers working... Those were the days lol! Hopefully the process is much better now!

View attachment 59524

Still kind of sucks, but depending on the distro you are using it's not as bad as it used to be. Nvidia has some better tools for Debian based distros to help make the process easier.
 

voodoo5_6k

Senior member
Jan 14, 2021
395
443
116
Oh, at least for debian, it is really simple (if you don't care for disk space etc.). You can just do this (after having installed the actual display drivers):

Code:
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit

That's it. Works fine.

Also, here's the entire procedure, incl. display driver, for debian:

 

Markfw

Moderator Emeritus, Elite Member
May 16, 2002
25,556
14,512
136
OK, stuck again. Help on the latest FAHcontrol install
 

voodoo5_6k

Senior member
Jan 14, 2021
395
443
116
Where exactly do you need help? Do you mean the Python 3 port?

Also, why would you need FAHControl in the first place (I assume you're trying to install it on a system you're going to control remotely later on)? At least the instructions I outlined describe how to get along without it. You really just need it on your admin workstation.
 

StefanR5R

Elite Member
Dec 10, 2016
5,512
7,818
136
Right, if this is not about your main machine, just about a computing slave which you plan to control from your main computer anyway, then simply modify the config.xml file, restart the client, add the slave to FAHControl on your main computer, and complete the client configuration from there.

For password-less access, it is just one line which you need to add (or edit, if it is already there), from post #1.
XML:
<command-allow-no-pass v='127.0.0.1 192.168.0.0/24'/>

If you prefer password-protected access, it's two lines to add or edit, from post #2.
XML:
<allow>127.0.0.1 192.168.0.0/24</allow>
<password>abcd1234</password>

But if it is actually about one of your main computers which you use to control the rest of the farm, then going with the option of the pre-release Python 3 port of FAHControl is probably the best way. But I haven't tried that myself yet.
 

drnickriviera

Platinum Member
Jan 30, 2001
2,416
201
116
I'm having trouble getting my windows fahcontrol to connect to linux. I added the line for password-less access. Went in and added a client in the windows control with the ip of the linux box and it just sits on connecting. I don't believe the firewall is on. When I go to the firewall icon in Mint (20.3), it doesn't show it as on. Complete Linux noob here. Last time I tried linux was the late 90's! Took me forever just to figure out how to edit config.xml
 

drnickriviera

Platinum Member
Jan 30, 2001
2,416
201
116
I checked the log and didn't see any error messages or anything out of the ordinary. When back into config.xml and the remote access line wasn't even there. When I first setup fah I kept getting FAIL when trying to start the service. To prevent myself from throwing the computer out the window, I just uninstalled and reinstalled FAHClient. I guess I never added the remote access line back in. So added the line, restart service, FAIL. Remove that line from config...FAIL. Little more reading and I see that the failure would be cause by a syntax error. Find the syntax error that was nowhere near where I was editing the file (Very suspicious Linux Gods!) and the service starts.. Add back the remote access line and try again to connect to client. Nope.

The whole point of that ramble was I went back into the log to see if there was anything new after all that. It had listed the config.xml in the log, but I noticed the remote access line was different. The log must be from the previous install of fahclient. Question is: Is it ok to delete the log.txt and will it create a new one?

Not a huge priority now as I have a lot of other stuff to work on, but would be nice to eventually get it working
 

StefanR5R

Elite Member
Dec 10, 2016
5,512
7,818
136
The log must be from the previous install of fahclient.
While each log line is prefixed merely with a timestamp, there are also occasional extra lines with date stamp. These let you at least identify when these messages were generated.

Is it ok to delete the log.txt and will it create a new one?
In my experience, yes.

About the config file: Some installations have it in /etc/fahclient/, some in /var/lib/fahclient/, some more customized ones elsewhere. In some installations there is a symlink from one those places to the real file. The log should also show from where the config was read.

Mint (20.3)
Alas I can't help in more detail. I currently use Mint 20(.0) on my GPU equipped computers but I don't remember anymore whether I left the locations of FAHClient files as-is or changed them.

Edit:
I don't believe the firewall is on. When I go to the firewall icon in Mint (20.3), it doesn't show it as on.
For completeness: The computer which runs FAHClient needs to allow inbound TCP traffic to port 36330; the computer which runs FAHControl needs to allow outbound TCP traffic to port 36330. If desired, this can be restricted to the respective source IP address of the FAHControl computer or/and the target IP address of the FAHClient computer. I think outbound traffic to this port is never a problem, but I may be mistaken.
 
Last edited: