Page 1 of 1

AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 18 May 2019 20:02
by ilu
We'll need a permanent testing topic for these drivers to keep up with new developments. I'm re-posting some of the information gathered in the past. To this end I've moved some posts and also edited a bit to get consistency. I hope that's ok.

SolydXK-8 / jessie: People with fglrx installed need to uninstall fglrx and fall back to radeon before upgrading to any newer system. fglrx is deprecated.

SolydXK-9 / stretch and SolydXK-10 / buster:
The repository provides radeon for older cards (before 2012) that don't support GCN but Terascale and earlier:
  • Northern Islands: Aruba (Trinity/Richland), Barts, Turks, Caicos, Cayman (HD6450, HD6570, HD6670, HD6790 - HD6990, HD64xxM, HD67xxM, HD69xxM, HD7450 - HD7670) and everything before
The repository provides amdgpu for newer cards (after 2015, starting with Caribbean Islands).
  • Volcanic Islands (GCN3): Tonga, Iceland/Topaz, Carrizo, FIJI, Stoney, R9 285
  • Arctic Islands (GCN4) and Vega (GCN5): Polaris, Lexa Baffin Ellesmere, Greenland, Vega, Raven
Cards released in between are supported by radeon, but also might be supported by amdgpu. You need to set the kernel parameters. No guarantees.
  • Southern Islands (GCN1): Cape Verde, Pitcairn, Tahiti, Oland, Hainan, Curacao, Trinidad, HD7750 - HD7970, R9 270, R9-280, R7 240, R7 250
    radeon.si_support=0 amdgpu.si_support=1
  • Sea Islands (GCN2): Bonaire, Hawaii, Tobago, Grenada, Kabini, Mullins, Kaveri, HD7790, R7 260, R9 290
    radeon.cik_support=0 amdgpu.cik_support=1
amdgpu-PRO, which is not open, can't be installed by SolydXK-System because it is not in any repository. The user needs to manually download it from AMD and to manually jump through several loops to even get it to work on debian systems.

@Arjen: You should maybe consider to change your solydxk-system screen to clarify that solydxk-system DOES NOT install any proprietary driver for AMD. It installs the OPEN driver amdgpu. And this driver should be installed by anybody except users with neolithic graphic cards. Your script knows them. So the warning (Don't install this if the open driver works) needs to go because amdgpu IS open.

-----
Something to check for me later: xserver-xorg-video-amdgpu does not need the binary blob in firmware-amd-graphics.

Re: Brand new hardware ... and OpenCL

Posted: 19 May 2019 09:49
by Arjen Balfoort
@ilu
I'll update the text: "Note: this will install the open drivers, NOT the proprietary drivers."

@Everybody with an AMD card:
I have updated the code names in the ddm-amd.sh script.
If you have anything to add, please let me know:

Code: Select all

GCN_HD7000='Cedar Caicos Turks Cape Bonaire Pitcairn Tahiti Zealand'
GCN_HD8000='Oland Cape Bonaire Pitcairn Tahiti Malta'
GCN_RX200='Oland Cape Bonaire Pitcairn Tahiti Tonga Hawaii Vesuvius'
GCN_RX300='Oland Samoa Cape Bonaire Pitcairn Curacao Tonga Hawaii Fiji'
GCN_RX400='Oland Cape Bonaire Baffin Ellesmere'
GCN_RX500='Lexa Baffin Polaris'
GCN_VEGA='Vega Greenland Instinct Navi Raven'
GCN_OTHER='Aruba Barts Cayman Iceland Topaz Carrizo Vegam Grenada Antigua Trinidad Tobago Stoney Bristol Temash Liverpool Durango Kabini Mullins Kaveri Godavari Beema Hainan Falcon Eagle'
Links I used:
https://en.wikipedia.org/wiki/Graphics_Core_Next
https://en.wikipedia.org/wiki/Radeon_HD_7000_Series
https://en.wikipedia.org/wiki/Radeon_HD_8000_Series
https://en.wikipedia.org/wiki/AMD_Radeon_Rx_200_series
https://en.wikipedia.org/wiki/AMD_Radeon_Rx_300_series
https://en.wikipedia.org/wiki/AMD_Radeon_400_series
https://en.wikipedia.org/wiki/AMD_Radeon_500_series
https://en.wikipedia.org/wiki/AMD_RX_Vega_series

Re: Brand new hardware ... and OpenCL

Posted: 19 May 2019 14:58
by Arjen Balfoort
I just want the list checked because, as I understand it, xserver-xorg-video-amdgpu can only be used for GCN cards.

Unfortunately, there is no comprehensive list (ideally with card version IDs) for these cards available. So, I had to collect the code names of all GCN cards (1st - 5th gen).

It is a very tedious job and if anybody knows a better way to check those cards for xserver-xorg-video-amdgpu, I'd very much appreciate it.

Re: Brand new hardware ... and OpenCL

Posted: 19 May 2019 16:09
by ilu
Your listing has mistakes. Listing according to "series" doesn't really make sense because not all of them have GCN. Several cards actually are terascale2 cards, not GCN (Aruba Barts Cayman Cedar Caicos Turks). For the older cards it's better to group using the "Islands" classification because these are consistent with GCN or just go with GCN version.

Code: Select all

GCN1 = 'Oland Cape Pitcairn Tahiti Hainan Curacao Trinidad Iceland Topaz Opal Venus Neptune'
GCN2 = 'Bonaire Hawaii Samoa Tobago Malta Zealand Vesuvius Saturn Grenada Temash Kabini Kaveri Godavari Beema Mullins Carrizo-L'
GCN3 = 'Tonga Fiji Antigua Carrizo Bristol Stoney Amethyst'
GCN4 = 'Polaris Lexa Baffin Ellesmere Neo Scorpio' # and "Vega M"
GCN5 = 'Vega Greenland Instinct Raven'
NGM  = 'Navi'
The following cards are GCN but according to lkddb still not supported by amdgpu, probably because they are used for embedded systems:
GCN2apu: Liverpool Durango Edmondton Eagle Falcon
I've read that hackers are working on it but I don't think that needs to concern us.

AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 19 May 2019 17:14
by ilu
I already posted this list https://cateee.net/lkddb/web-lkddb/DRM_AMDGPU.html but I don't think it will work much better. Any AMD card released from now on will be supported by amdgpu. I'm listing the amdgpu support for the following device IDs according to lkddb but who knows which numbers get picked in the future?
(yes = supported, no = unsupported)

Code: Select all

0000-1303 empty
1304 -15dd yes
15de-314f empty
3150-5e4f no
5e50-659f empty
6600-66af yes
66b0-669f empty
6700-677f no
6780-683f  yes
6840-6859 no
685a-685f empty
6860-687f yes
6880-68ff no
6900-6fdf yes
7100-796f no
7970-93ff empty
9400-980a no
980b-982f empty
9830-98e4 yes
98e5-98ff empty
9900-99a4 no
99a5-ffff empty
Probably not much easier.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 20 May 2019 06:59
by Arjen Balfoort
Am I interpreting that page incorrectly?
I thought that the table below "Raw data from LKDDb:" is listing all cards supported by amdgpu?

[EDIT]
Playing with grep I could retrieve those card IDs with:

Code: Select all

URL='https://cateee.net/lkddb/web-lkddb/DRM_AMDGPU.html'
wget -qO- $URL | grep -oP '(?<=1002\s)[a-z0-9]*(?=\s)'

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 20 May 2019 17:28
by ilu
Arjen Balfoort wrote: I thought that the table below "Raw data from LKDDb:" is listing all cards supported by amdgpu?
Yeah that's my understanding. Just not all IDs have known names. And I think the upper and the lower list are the same. I did not check every line though.
My table of IDs is different because I also cross-checked the IDs that are supported by radeon only (that's where I put the "no"). I don't know how reliable that page is - it's maintained by Debian developer Giacomo Catenazzi.

On the other hand the list I updates according to GCN versions might be enough for the present state of solydxk-system.

Could using LKDDb could be a new concept for more than AMD drivers? If you decide to use it you should take the kernel-specific txt format from https://cateee.net/sources/lkddb/ which tells you exactly which ID is supported by which driver (radeon, nvidia, network chips and everyone's grandma included) and there's no web formatting involved and grepping will be easy.
You could probably even include a static version in our repo for 4.9 and 4.19 kernel, so we don't have to rely on catee.net to be online. On https://cateee.net/lkddb/ he links the script source he used to create the database.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 21 May 2019 12:13
by Arjen Balfoort
I could copy those lists to our servers, no problem.
I'll setup a cron job when I have some time.

I've tested the lists with these commands:

Code: Select all

KV=$(uname -r)
KV=${KV%.*}
URL="https://cateee.net/sources/lkddb/lkddb-$KV.list"
wget -O lkddb.list $URL
AMDGPU=$(grep -oP '(?<=1002\s)[a-z0-9]*(?=\s.*CONFIG_DRM_AMDGPU)' lkddb.list)
AMDRAD=$(grep -oP '(?<=1002\s)[a-z0-9]*(?=\s.*CONFIG_DRM_RADEON)' lkddb.list)
echo "AMDGPU Cards"
echo "$AMDGPU"
echo
echo "AMDRAD Cards"
echo "$AMDRAD"
I'd prefer to use the card IDs to check for a AMDGPU card instead of the card names or you must have reservations to do so, of course.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 21 May 2019 17:41
by Arjen Balfoort
Cron job was easier than I expected: https://downloads.solydxk.com/lkddb/
Runs daily.

[EDIT]
Cron job now creates html reports.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 22 May 2019 12:23
by ilu
This looks like a good solution with reduced handwork. You took the latest list and not the kernel-specific ones? Support might change with newer kernels.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 22 May 2019 12:51
by Arjen Balfoort
Could somebody please test the attached script on a system with an AMD card?

This script downloads the appropriate ID list from our server and checks your card's ID in that list.
If that fails it will try to check for supported card names.

Do not run it with root privileges!
I just need the terminal output.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 22 May 2019 13:42
by Arjen Balfoort
ilu wrote:
22 May 2019 12:23
This looks like a good solution with reduced handwork. You took the latest list and not the kernel-specific ones? Support might change with newer kernels.
No, I download the kernel specific files.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 22 May 2019 19:24
by ilu
The script insists on sudo although I did not call sudo. What kind of apt-type-automatic is that?

Code: Select all

~/bin/ddm-amd.sh
[sudo] Passwort für xxx: 

Code: Select all

if [ $UID -ne 0 ] && ! $SHOW; then
  sudo "$0" "$@"
  exit $?
fi

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 22 May 2019 21:01
by Arjen Balfoort
Alright, forgot about that.

Con you comment that part out and try again?

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 23 May 2019 01:31
by ilu
I also removed the log statement to get rid of some of the spam. The card is recognized correctly.

Code: Select all

./ddm-amd.sh
[AMD] Card ID 683f found in /tmp/solydxk-9_amdgpu.txt.
[AMD] Run command: apt-get install --reinstall  -y --allow-downgrades --allow-remove-essential --allow-change-held-packages linux-headers-5.0.0-17.1-liquorix-amd64.
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] Run command: apt-get install --reinstall  -y --allow-downgrades --allow-remove-essential --allow-change-held-packages build-essential.
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] Run command: apt-get install --reinstall  -y --allow-downgrades --allow-remove-essential --allow-change-held-packages firmware-linux-nonfree.
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] Run command: apt-get install --reinstall  -y --allow-downgrades --allow-remove-essential --allow-change-held-packages xserver-xorg-video-amdgpu.
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] Run command: apt-get purge -y --allow-downgrades --allow-remove-essential --allow-change-held-packages fglrx*
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] Run command: apt-get purge -y --allow-downgrades --allow-remove-essential --allow-change-held-packages libgl1-fglrx-glx*
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] Run command: apt-get purge -y --allow-downgrades --allow-remove-essential --allow-change-held-packages amd-opencl-icd
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?
[AMD] AMD driver installed.

Re: AMD graphics: radeon, amdgpu, amdgpu-pro

Posted: 23 May 2019 11:46
by Arjen Balfoort
I've updated solydxk-system and a new version is now in the repository.