HOWTO: How I got my AMD card folding on Linux

It seems that a lot of GPU problems revolve around specific versions of drivers. Though AMD has their own support structure, you can often learn from information reported by others who fold.

Moderators: Site Moderators, FAHC Science Team

Frogging101
Posts: 85
Joined: Wed Mar 25, 2020 2:39 am
Location: Canada

Re: HOWTO: How I got my R9 290 folding on Linux

Post by Frogging101 »

Ksenio wrote:I tried following this, but I have still not made it work. I am running RX550 and Mint 19.3 . I have installed orca, but I am still getting this error
16:05:49:ERROR:WU00:FS01:Failed to start core: OpenCL device matching slot 1 not found, try setting 'opencl-index' manually

Any ideas what I could explore more? I am really determined to make it work :)
Could you post your log?
ccgllc
Posts: 20
Joined: Sun Apr 05, 2020 5:09 am

Re: HOWTO: How I got my R9 290 folding on Linux

Post by ccgllc »

Have an R9 270X but the only drivers I'm seeing on the AMD site are for Ubuntu 14. Going to try using the 290's driver and see if that helps.

Nope - that is causing X to hang.
Frogging101
Posts: 85
Joined: Wed Mar 25, 2020 2:39 am
Location: Canada

Re: HOWTO: How I got my R9 290 folding on Linux

Post by Frogging101 »

ccgllc wrote:Have an R9 270X but the only drivers I'm seeing on the AMD site are for Ubuntu 14. Going to try using the 290's driver and see if that helps.

Nope - that is causing X to hang.
That's a GCN 1.0 (1st gen) card. I don't know what the story is with those. I believe they are not as well supported on Linux as GCN 1.1 (2nd gen) and later.

https://en.wikipedia.org/wiki/Radeon_Rx_200_series#Chipset_table
4n0n
Posts: 17
Joined: Thu Apr 09, 2020 5:12 pm

Re: How I got my R9 290 folding on Linux

Post by 4n0n »

bruce wrote: I suggest you make the same report at https://github.com/FoldingAtHome/fah-issues/issues. Someday the Developers will have time to examine those issues and fix most of them ... including things like your "This is a bug in FAH" mentioned above.
Done here: https://github.com/FoldingAtHome/fah-issues/issues/1418
Joe_H
Site Admin
Posts: 7856
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: HOWTO: How I got my R9 290 folding on Linux

Post by Joe_H »

As mentioned by Frogging101, the R9 270/270X are based on the older GCN1 architecture from AMD. AMD has been removing OpenCL support from the newer drivers for the older tech, so you might have to go back a version or two earlier on the drivers than mentioned in this topic for the 290/290X
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
astrorob
Posts: 43
Joined: Sun Mar 15, 2020 7:59 pm

Re: HOWTO: How I got my R9 290 folding on Linux

Post by astrorob »

i guess it should be noted that adding the 'fahclient' user to the group 'video' is necessary for the client to find OpenCL devices.

i think OP alluded to this as a prior solution and is maybe well-known, but up until today i was running a linux box with only an nvidia GPU (which uses cuda i guess) and i didn't have to worry about OpenCL.

this thread helped me get the RX5500 going. for my part i used the 20.20 drivers and used amdgpu-pro-install --headless --opencl=pal. the first time around i didn't use --headless and it seems the presense of the AMD video drivers borked my X server. maybe there is some further configuration to do to force X to start on the nvidia card (or any card)

also i had installed mesa-opencl-icd and it seems that the RX5500 is listed under the Clover platform and the AMD Accelerated parallel processing platform. maybe this is a mistake.

somehow setting opencl-index and cuda-index to 0 on both slots was necessary to get them both running. at -1 for some reason the clients could not find the GPUs.
Image
JimF
Posts: 652
Joined: Thu Jan 21, 2010 2:03 pm

Re: HOWTO: How I got my R9 290 folding on Linux

Post by JimF »

Frogging101 wrote: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.
It worked!
I have an RX 570 on Ubuntu 18.04.4, and it just wouldn't work with the latest drivers (amdgpu-pro-20.20), though it did with a previous version (except for the core 22 problems).

I installed the drivers with the standard AMD procedure: "./amdgpu-install --opencl=pal,legacy -y"
That installs both the PAL and legacy drivers, for when I upgrade.

I only had to set "open-cl index" = 0 (That is true for both Nvidia and AMD on Ubuntu, and has been for years.)

I also ran "sudo adduser fahclient video", though that may be unnecessary with this procedure.

Thanks!
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: HOWTO: How I got my R9 290 folding on Linux

Post by mr_raider »

Converting FAHClient to systemd service sometimes hangs up my boot. I have to manually kill the service then run startx to start the desktop.
Is their anyway to delay the service to start after the desktop is loaded?
gunnarre
Posts: 567
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: HOWTO: How I got my R9 290 folding on Linux

Post by gunnarre »

Could you replace the Wants or Requires line with

Code: Select all

Requires=display-manager.service
and see if that helps? Any sign in the logs about what's wrong?
Image
Online: GTX 1660 Super, GTX 1080, GTX 1050 Ti 4G OC, RX580 + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 960, GTX 950
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: HOWTO: How I got my R9 290 folding on Linux

Post by mr_raider »

gunnarre wrote:Could you replace the Wants or Requires line with

Code: Select all

Requires=display-manager.service
and see if that helps? Any sign in the logs about what's wrong?
Yeah sorry. I just disabled autostart on the service just start it manually after boot. I reboot only once a week or so anyway.
Frogging101
Posts: 85
Joined: Wed Mar 25, 2020 2:39 am
Location: Canada

Re: HOWTO: How I got my R9 290 folding on Linux

Post by Frogging101 »

I've updated the OP with instructions to add the fahclient user to both the "video" and "render" groups. We knew about the "video" group already, but I just tried a new install on Kubuntu 20.04 and found that it did not work because on this installation, /dev/dri/renderD128 is in the "render" group instead of the "video" group. So you may need both if your system is like that.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: HOWTO: How I got my R9 290 folding on Linux

Post by bruce »

There should be a script setting to tell Service B that it shouldn't start up until Service A is already running. (I don't know the Linux settings.) Somebody should open a ticket to get this added to FAH's startup script.
PantherX
Site Moderator
Posts: 7020
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: HOWTO: How I got my R9 290 folding on Linux

Post by PantherX »

bruce wrote:...Somebody should open a ticket to get this added to FAH's startup script.
Deja Vu: https://github.com/FoldingAtHome/fah-issues/issues/1567
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
Biffa
Posts: 69
Joined: Sun Nov 16, 2008 11:40 pm
Hardware configuration: RTX2080Ti
Threadripper 1950X
Location: UK
Contact:

Re: HOWTO: How I got my AMD card folding on Linux

Post by Biffa »

Frogging101 wrote:I've updated the OP with instructions to add the fahclient user to both the "video" and "render" groups. We knew about the "video" group already, but I just tried a new install on Kubuntu 20.04 and found that it did not work because on this installation, /dev/dri/renderD128 is in the "render" group instead of the "video" group. So you may need both if your system is like that.
I'd just like to thank you, your instructions in this thread worked for me. RX470 on ZorinOS 15.3
Image
Lawrence
Posts: 1
Joined: Thu May 20, 2021 8:07 am

Re: HOWTO: How I got my AMD card folding on Linux

Post by Lawrence »

Just got the GPU working. Took me many hours, so I want to share what worked for me. I'm on Ubuntu 21.04 Gnome3 with Wayland, my GPU is Radeon RX 5600.

1. Run this: kytulendu/3351b5d0b4f947e19df36b1ea3c95cbe (maybe not needed)
2. Run this: tuxutku/79daa2edca131c1525a136b650cdbe0a
3. sudo nano /etc/OpenCL/vendors/pocl.icd comment out the single line "libpocl.so.2.6.0"
4. Get FAHClient from the official homepage. don't bother installing FAHViewer and FAHCtl. FAHCtl won't install on 21.04 anyway.
5. Configure it. Here are commands and files you probably need:
sudo systemctl start FAHClient
FAHClient --help
/etc/fahclient/config.xml
/var/lib/fahclient/log.txt
localhost:7396/ <- webui

I hope this helps.
Edit: had to remove domains because of spam prevention. just add gist.github<dot>com on 1. and 2.

Edit: You might have to install ocl-icd-opencl-dev
Post Reply