Tutorial on how to run Folding@Home client on a PC with AMD graphics card and how to potenitally solve following errors:
BAD_WORK_UNIT (114 = 0x72)
Failed to start core: OpenCL device matching slot 1 not found, try setting 'opencl-index' manually
Error initializing context: clGetPlatformIDs (-1001)
OpenCL: Not detected: clGetDeviceIDs() returned -1
Received short response, expected 512 bytes, got 0
F@H does some hardware autoconfiguration magic on a first run, so let's go for a clean installation, just to be sure.
$ apt remove --pruge FAH*
F@H utilizes OpenCL and AFAIK only proprietary amd-gpu-pro
drivers have a properly working implementation.
Before blindly copy pasting these lines, check if there isn't a newer version:
https://www.amd.com/en/support
$ wget https://drivers.amd.com/drivers/linux/amdgpu-pro-20.10-1048554-ubuntu-18.04.tar.xz
$ tar -Jxvf amdgpu-pro-20.10-1048554-ubuntu-18.04.tar.xz
$ cd amdgpu-pro-20.10-1048554-ubuntu-18.04
$ ./amdgpu-install --pro --opencl=pal,legacy --headless -y
$ reboot
Before blindly copy pasting these lines, check if there isn't a newer version:
https://foldingathome.org/alternative-downloads/
$ wget https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.6/fahclient_7.6.9_amd64.deb
$ wget https://download.foldingathome.org/releases/public/release/fahcontrol/debian-stable-64bit/v7.6/fahcontrol_7.6.9-1_all.deb
$ sudo dpkg -i fah*
Only users which are in the video
group have an access to the GPU, so you need to add the fahclient
user (which is created after F@H installation automatically)
$ sudo adduser fahclient video
F@H has some bug when starting using init.d
that assigns no permission and no groups to the process. Running FAHClient
using systemctl
should fix that.
Create a new file with exactly this name (other name will prevent overloading the original init.d
script) ...
$ sudo nano /etc/systemd/system/FAHClient.service
... and paste and save this config ...
[Unit]
Description=Folding@Home Client
WantedBy=graphical.target
[Service]
Type=simple
ExecStart=/usr/bin/FAHClient /etc/fahclient/config.xml --daemon
User=fahclient
WorkingDirectory=~
[Install]
WantedBy=graphical.target
... and update systemctl
so the process can start on boot properly.
$ sudo systemctl daemon-reload
$ sudo systemctl enable FAHClient.service
$ sudo systemctl start FAHClient.service
$ sudo systemctl restart FAHClient.service
Wipe and open the old config...
$ sudo echo "" > /etc/fahclient/config.xml
$ sudo nano /etc/fahclient/config.xml
... and paste and save this configuration so F@H detects your GPU properly.
<config>
<!-- Folding Slot Configuration -->
<client-type v='beta'/>
<!-- Network -->
<proxy v=':8080'/>
<!-- Slot Control -->
<power v='full'/>
<!-- User Information -->
<!-- Your passkey goes here. Leave blank if not used.-->
<passkey v='YOUR_PASSKEY'/> <!-- !!! CHANGE THIS !!! -->
<team v='245800'/>
<!-- Your username goes here. -->
<user v='YOUR_USERNAME'/> <!-- !!! CHANGE THIS !!! -->
<!-- Folding Slots -->
<slot id='0' type='CPU'/>
<slot id='1' type='GPU'/>
</config>
Just reboot and everything should work, hopefully.
$ reboot
I have no idea. This was done on Ubuntu 18.04, Kernel 5.3.0-46, AMD RX 570
, but this tutorial other Linux systems should work too (some changes may be needed - for example packages URLs).
No idea. Possibly integrated and older GPUs, older systems, ... This also won't work on GPUs that are not supported by the amd-gpu
drivers and F@H.
🇫. You've probably f'd up the driver installation. Boot to safe mode, preferably using older Kernel and unsitnal the drivers, thn try again.
- Trial and error. A lot.
- DuckDuckGo and Google. A lot.
- https://foldingforum.org/viewtopic.php?f=81&t=33353
- https://foldingforum.org/viewtopic.php?f=74&t=31096&start=0
- https://foldingforum.org/viewtopic.php?f=74&t=31096&start=15
- https://foldingforum.org/viewtopic.php?f=81&t=31293
- https://linustechtips.com/main/topic/1163067-folding-amd-gpu-linux-impossible/
- https://www.reddit.com/r/linux4noobs/comments/fqgvyi/openclamd_problems_for_folidnghome_can_anyone/
- https://forums.evga.com/Help-with-a-problem-m2840602.aspx
- https://einsteinathome.org/content/quick-guide-how-install-opencl-amd-gpus-linux-kubuntu-1804-and-similar-distro
- https://foldingforum.org/viewtopic.php?f=18&t=32169
- https://foldingforum.org/viewtopic.php?f=61&t=27828
- https://greenfoldingathome.com/2019/02/15/amd-radeon-rx-480-foldinghome-review/