Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Use AMDGPU instead of Radeon

Graphical Environments, Managers, Multimedia & Desktop questions.
Message
Author
User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Use AMDGPU instead of Radeon

#1 Post by Sajjad Kabir Joy »

I'm using Debian Stretch on AMD Kaveri APU, which, according to the description of the package xserver-xorg-video-amdgpu supports (or "should support") my GPU, which is Radeon R7 (everywhere I looked, this GPU is supported by AMDGPU). But in reality it doesn't work. I've tried blacklisting radeon and using a xorg configuration to use AMDGPU, but (in the first case) only VESA was there (low-res, no acceleration), and (in the latter case) Xorg simply wouldn't start. The drivers and kernel modules are apparently there. Could anyone please tell me if AMDGPU can at all be used in Debian 9, and if yes, how?

Output of lspci -nn | grep VGA:

Code: Select all

00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics] [1002:1313]

deborah-and-ian
Posts: 182
Joined: 2016-07-13 08:40

Re: Use AMDGPU instead of Radeon

#2 Post by deborah-and-ian »

Is this a Southern Island or Sea Island chip? Then there is no official support and it has to be enabled first (at least on Arch, never tried it on Debian):
The linux package enables AMDGPU support for cards of the Southern Islands (SI) and Sea Islands (CIK). When building or compiling a kernel, CONFIG_DRM_AMDGPU_SI=Y and/or CONFIG_DRM_AMDGPU_CIK=Y should be be set in the config.
https://wiki.archlinux.org/index.php/AMDGPU
Debian GNU/Linux 9 Stretch w/Openbox

Acer Aspire E5-521G
AMD A8-6410 APU
4 GB RAM
integrated AMD Mullins
dedicated AMD Hainan Radeon R5 M240 2 GB
240 GB Toshiba Q300 SSD
Realtek RTL8111/8168/8411 ethernet
Qualcomm Atheros QCA9565 wireless

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#3 Post by Sajjad Kabir Joy »

deborah-and-ian wrote:Is this a Southern Island or Sea Island chip?
It's Sea Island, as far as I can find out. In any event it has GCN. Too bad will have to compile the kernel :(

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Use AMDGPU instead of Radeon

#4 Post by tynman »

One of my computers has an AMD A6-7400K CPU, which has a "Kaveri" Radeon R5 APU. Under Debian 8, I was able to get it working successfully using the AMD fglrx non-open-source driver. But when I tried to install Debian 9 on that compueter, I found the the fglrx driver was not available.

Under Debian 9, the default driver that was loading would set the display resolution to 1024 X 760 (IIRC) instead of the actual screen resolution of 1680 x 1050. The obvious answer was to use the AMDGPU driver, but I couldn't get it to load. I spent way too much time searching the internet to find out why, only to come to the conclusion (1) the "Kaveri" APUs use AMD's "GCN 1.0" architecture, and (2) the AMDGPU driver supports only video chips based on >= GCN 2.0. I read about compiling the kernel with special settings (as noted earlier), but I have no interest in compiling special kernels, so...

That computer will stay with Debian 8. My computer purchases in the future will not have AMD CPUs or AMD APUs.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Use AMDGPU instead of Radeon

#5 Post by stevepusser »

tynman wrote:One of my computers has an AMD A6-7400K CPU, which has a "Kaveri" Radeon R5 APU. Under Debian 8, I was able to get it working successfully using the AMD fglrx non-open-source driver. But when I tried to install Debian 9 on that compueter, I found the the fglrx driver was not available.

Under Debian 9, the default driver that was loading would set the display resolution to 1024 X 760 (IIRC) instead of the actual screen resolution of 1680 x 1050. The obvious answer was to use the AMDGPU driver, but I couldn't get it to load. I spent way too much time searching the internet to find out why, only to come to the conclusion (1) the "Kaveri" APUs use AMD's "GCN 1.0" architecture, and (2) the AMDGPU driver supports only video chips based on >= GCN 2.0. I read about compiling the kernel with special settings (as noted earlier), but I have no interest in compiling special kernels, so...

That computer will stay with Debian 8. My computer purchases in the future will not have AMD CPUs or AMD APUs.
I have to ask if you had firmware-amd-graphics installed at any time to get the Radeon driver to work.

You can also look at your kernel's config in /boot and search for those config options to see if the Debian kernel enables them. For what it's worth, the Liquorix kernel has:

Code: Select all

CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_AMDGPU_USERPTR=y
MX Linux packager and developer

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#6 Post by Sajjad Kabir Joy »

tynman wrote:Under Debian 8, I was able to get it working successfully using the AMD fglrx non-open-source driver. But when I tried to install Debian 9 on that compueter, I found the the fglrx driver was not available.

Under Debian 9, the default driver that was loading would set the display resolution to 1024 X 760 (IIRC) instead of the actual screen resolution of 1680 x 1050. The obvious answer was to use the AMDGPU driver, but I couldn't get it to load. I spent way too much time searching the internet to find out why, only to come to the conclusion (1) the "Kaveri" APUs use AMD's "GCN 1.0" architecture, and (2) the AMDGPU driver supports only video chips based on >= GCN 2.0. I read about compiling the kernel with special settings (as noted earlier), but I have no interest in compiling special kernels, so...

That computer will stay with Debian 8. My computer purchases in the future will not have AMD CPUs or AMD APUs.
AMD has stopped developing fglrx. As has been pointed out, you're probably missing the firmware. Actually Radeon GPUs work fine with the free radeon driver (at times, better than fglrx). It's not because my hardware doesn't work well with radeon that I want to test AMDGPU out (it's still somewhat experimental)--I simply wanted to find out. Also, I hear new features are added in the latest kernel for APUs. Until Debian enables Kaveri support in its kernel for AMDGPU, I think I'll just stick with radeon.

User avatar
praka123
Posts: 195
Joined: 2007-06-23 08:11
Location: Muvattupuzha,India
Has thanked: 2 times

Re: Use AMDGPU instead of Radeon

#7 Post by praka123 »

Hi,
A related query. I have a HP laptop with the newly launched AMD 520 (AMD Radeon 520) mobile graphics as DGP. This card has very little info available apart from it has GCN 1.0 as feature. Speculates it's mid road between SI and CIK. Glxinfo lists the card as AMD HAINAN.

Somebody said:
The shader core would be GCN 1.0 while some of the other blocks would be newer and inline with the larger CI parts IIRC.
So, would like to know, if this card is better supported in "amdgpu". Also, the amdgpu-pro proprietary driver supports the card?

Code: Select all

~$: lspci -knnn 

01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] [1002:6660] (rev 83) Subsystem: Hewlett-Packard Company Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] [103c:832b] Kernel driver in use: radeon Kernel modules: radeon, amdgpu
Now, if I run any app with DRI_PRIME=1 to use DGPU it works and shows below info:

Code: Select all

:~$ DRI_PRIME=1 glxinfo |grep -i Opengl* OpenGL vendor string: X.Org OpenGL renderer string: AMD HAINAN (DRM 2.50.0 / 4.13.0-16-generic, LLVM 5.0.0) OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.2.2 OpenGL core profile shading language version string: 4.50
Debian (Testing/Unstable)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Use AMDGPU instead of Radeon

#8 Post by stevepusser »

If the 4.13.13 kernel makes into stretch-backports, then it should also support the GCN 1.0 cpus. The current choices are to run the Liquorix kernel or rebuild the current 4.13.4 stretch-backports kernel with those config options turned on, which takes a while to build, depending on how much horsepower and cores you can throw at it.
MX Linux packager and developer

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#9 Post by Sajjad Kabir Joy »

praka123 wrote:Hi,
A related query. I have a HP laptop with the newly launched AMD 520 (AMD Radeon 520) mobile graphics as DGP. This card has very little info available apart from it has GCN 1.0 as feature. Speculates it's mid road between SI and CIK. Glxinfo lists the card as AMD HAINAN.

Somebody said:
The shader core would be GCN 1.0 while some of the other blocks would be newer and inline with the larger CI parts IIRC.
So, would like to know, if this card is better supported in "amdgpu". Also, the amdgpu-pro proprietary driver supports the card?

Code: Select all

~$: lspci -knnn 

01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] [1002:6660] (rev 83) Subsystem: Hewlett-Packard Company Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430] [103c:832b] Kernel driver in use: radeon Kernel modules: radeon, amdgpu
Now, if I run any app with DRI_PRIME=1 to use DGPU it works and shows below info:

Code: Select all

:~$ DRI_PRIME=1 glxinfo |grep -i Opengl* OpenGL vendor string: X.Org OpenGL renderer string: AMD HAINAN (DRM 2.50.0 / 4.13.0-16-generic, LLVM 5.0.0) OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.2.2 OpenGL core profile shading language version string: 4.50
I think it's safe to say amdgpu-pro will work for it, but AMD hasn't made it available for Debian. As for performance, after I created this thread I came across this benchmark of how the amdgpu driver works for GCN 1.0/1.1 GPUs in comparison with radeon: https://www.phoronix.com/scan.php?page= ... n101&num=1. As can be seen, the amdgpu driver yields a slightly better performance only in a few cases (mostly for an R9 card), and nearly everywhere else radeon and amdgpu doesn't show much of a difference (and a few instances where radeon actually outperforms amdgpu).

deborah-and-ian
Posts: 182
Joined: 2016-07-13 08:40

Re: Use AMDGPU instead of Radeon

#10 Post by deborah-and-ian »

Sorry for the late reply. Seems like it isn't really worth the hassle. Most of the benchmarks sport differences at numbers the human vision can't even register. How beneficial is an increase from 170 to 190 fps?

I'll try to run AMDGPU on my laptop just for kicks, but I have the impression it won't really give me improvements.
My machine has an integrated AMD Mullins GPU that takes ~700 MB from main RAM and a dedicated Hainan GPU that has 2GB RAM, but is severely bottlenecked by the slow AMD A8-6410 APU. I could just as well remove the dedicated card.
Debian GNU/Linux 9 Stretch w/Openbox

Acer Aspire E5-521G
AMD A8-6410 APU
4 GB RAM
integrated AMD Mullins
dedicated AMD Hainan Radeon R5 M240 2 GB
240 GB Toshiba Q300 SSD
Realtek RTL8111/8168/8411 ethernet
Qualcomm Atheros QCA9565 wireless

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Use AMDGPU instead of Radeon

#11 Post by tynman »

Back in November I had posted...
One of my computers has an AMD A6-7400K CPU, which has a "Kaveri" Radeon R5 APU. Under Debian 8, I was able to get it working successfully using the AMD fglrx non-open-source driver. But when I tried to install Debian 9 on that compueter, I found the the fglrx driver was not available.
The "radeon" driver that loads for this card by default in Debian 9 only half-worked. It limited screen resolution to 1024x760. Usable but sub-optimal. I solved the problem by building a new computer with Intel graphics. Now I only use the AMD-based computer (with Debian 8 and the fglrx video driver) when I need Windows programs because it has Windows installed under VirtualBox.

But stevepusser had suggested (on Nov 11) to try the Liquorix 4.13 kernel. No doubt I did something wrong/stupid there, as I was unable to boot that at all :(. Fast forward a few months to today. Ever hopeful, I tried again, this time installing the newer Liquorix 4.15 kernel. There were errors reported during the installation about "make failures". That sounded ominous but I checked in the /boot/ directory, and I saw the new OS image file had been created, so I gave it a try. My X11/Openbox desktop started up straight away with no problem, everything is clear and xrandr says I'm running with 1680x1050 resolution. The lspci command says it has loaded the amdgpu driver for the Kaveri APU. Wonders never cease. Thanks to stevepusser and the mysterious Liquorix developer(s)!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Use AMDGPU instead of Radeon

#12 Post by stevepusser »

The standard Liquorix kernel headers require gcc-7, which you can't install easily in Stretch, so you got "make" failures for some third party DKMS drivers. Either that, or you have versions of those that won't build on the 4.15 kernel--that's a common problem--we ran into several of those and solved them when we boosted MX 17.1 to a backported Debian 4.15.4 kernel.

Backported Liquorix kernel repo with Stretch-compatible headers and some 4.15-compatible DKMS package updates:

https://techpatterns.com/forums/about2615.html

Amazingly enough, I also still don't have an answer to the basic question:

Code: Select all

apt policy firmware-amd-graphics
MX Linux packager and developer

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Use AMDGPU instead of Radeon

#13 Post by tynman »

Thanks for the link. I'll try that next. Now that I have Debian 9 working with my AMD GPU, I thought I would start over and re-install from scratch and see how it goes. For two reasons:
  • 1.I worked on this off and on for a few months, and what I ended up with before I had the success with the Liquorix 4.15 kernel was a mix of Stretch, Buster and Sid, so I am shy to use the resulting setup for anything serious.
    2. To prove to myself I know what I'm doing. I.e., to make sure my success the other day wasn't just a fluke :).
Thanks again...

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#14 Post by Sajjad Kabir Joy »

Old long since. In the meantime, I've used the 4.16 branch of the Linux kernel from Liquorix, which supposedly comes with Sea Island support enabled. But precisely nothing changed. lspci kept showing the amdgpu kernel driver is available, but radeon is being used, blacklisting which gave me no TTY and, while the resolution was full, mesa didn't work. I got frustrated and checked Stretch backports, and saw that 4.16 is there as well, along with mesa 17. I may have read somewhere that 4.16 branch comes with Sea Island support by default turned on. Whether that is the case or not, I removed Liquorix kernel and installed Linux from backports, along with upgrading all mesa/opengl related packages from there—and alas—it's the same!

I've come to suspect that it's the Xorg display driver, rather than the kernel driver, that might be the real culprit here, at least for me. Notice that Stretch comes with 1.2.0-1+b1 version of xserver-xorg-video-amdgpu, while Buster (testing) comes with 18.0.1-1. Quite antiquated.
tynman wrote:Thanks for the link. I'll try that next. Now that I have Debian 9 working with my AMD GPU, I thought I would start over and re-install from scratch and see how it goes. For two reasons:
  • 1.I worked on this off and on for a few months, and what I ended up with before I had the success with the Liquorix 4.15 kernel was a mix of Stretch, Buster and Sid, so I am shy to use the resulting setup for anything serious.
    2. To prove to myself I know what I'm doing. I.e., to make sure my success the other day wasn't just a fluke :).
Thanks again...
Could you please post the version of your xserver-xorg-video-amdgpu package?

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Use AMDGPU instead of Radeon

#15 Post by tynman »

Well, I ended up abandoning the Liquorix kernel because at some point I noticed kernel 4.15 was available for Buster. The biggest pain in the butt was that I had to add four boot parms to "enable" the support for Kaveri video:
  • radeon.si_support=0
    radeon.cik_support=0
    amdgpu.si_support=1
    amdgpu.cik_support=1
and that was well outside of my comfort zone, although I did get it working eventually. So what I'm using now may or may not be applicable to whatever kernel you are trying to use.

To answer your actual question, the version of the xserver-xorg-video-amdgpu package I'm using is 18.0.1.

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#16 Post by Sajjad Kabir Joy »

tynman wrote:Well, I ended up abandoning the Liquorix kernel because at some point I noticed kernel 4.15 was available for Buster. The biggest pain in the butt was that I had to add four boot parms to "enable" the support for Kaveri video:
  • radeon.si_support=0
    radeon.cik_support=0
    amdgpu.si_support=1
    amdgpu.cik_support=1
and that was well outside of my comfort zone, although I did get it working eventually. So what I'm using now may or may not be applicable to whatever kernel you are trying to use.

To answer your actual question, the version of the xserver-xorg-video-amdgpu package I'm using is 18.0.1.
Thank you! Turns out, previously I had only set the parameters for SI, not for CIK. Doing BOTH (as you have done), did the the trick. But since the Xorg AMDGPU display driver is so primitive, display can be a bit glitchy at times. But I'm not willing to mess up the system with testing packages, so I will live with that (for now, anyway), and hope Debian would backport Xorg packages for Stretch soon. Rest works (as far as I could see).

P. S. I'm not really uncomfortable with setting these boot parameters. And yes, 4.16 branch (possibly from 4.13 onward) has SI and CIK support turned on, as per /boot/config-4.16.0-0.bpo.2-amd64.

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#17 Post by Sajjad Kabir Joy »

Okay, so for anyone else trying to use the AMDGPU driver instead of Radeon for Southern Islands and Sea Islands on Debian 9, here is the summary:

1. Enable backports.
2. (Recommended) Upgrade Mesa and OpenGL related packages from backports.
3. Install kernel and related packages from backports.
4. Add boot parameters. The simplest way to do so is to edit /etc/default/grub. GRUB_CMDLINE_LINUX_DEFAULT should have the following options:
radeon.cik_support=0 amdgpu.cik_support=1 radeon.si_support=0 amdgpu.si_support=1
in essence: make it look like this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet radeon.cik_support=0 amdgpu.cik_support=1 radeon.si_support=0 amdgpu.si_support=1"
5. Run

Code: Select all

# grub-mkconfig -o /boot/grub/grub.cfg
Reboot. Well... this worked for me, at least!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Use AMDGPU instead of Radeon

#18 Post by stevepusser »

The 4.17 kernel is supposed to have some nice improvements for the amdgpu driver.

https://www.phoronix.com/scan.php?page= ... 17-Default
https://www.phoronix.com/scan.php?page= ... 7-Features

4.17.2 is currently in Debian Experimental, I'm running the MX Linux version of that one backported to Stretch, or Liquorix just added one based on 4.17.3. (also backported to MX)
MX Linux packager and developer

User avatar
Sajjad Kabir Joy
Posts: 28
Joined: 2015-02-22 16:35
Location: Bangladesh

Re: Use AMDGPU instead of Radeon

#19 Post by Sajjad Kabir Joy »

I'll maybe head over to Liquorix again :D By the way, Mesa 18 improves Kaveri performance a lot, according to this article: https://www.phoronix.com/scan.php?page= ... 2018&num=1 Another thing to eagerly wait for. Love the kind of hardware that grows faster with time!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Use AMDGPU instead of Radeon

#20 Post by stevepusser »

Sajjad Kabir Joy wrote:I'll maybe head over to Liquorix again :D By the way, Mesa 18 improves Kaveri performance a lot, according to this article: https://www.phoronix.com/scan.php?page= ... 2018&num=1 Another thing to eagerly wait for. Love the kind of hardware that grows faster with time!
The upstream Debian kernel is now up to 4.17.3 in Sid, so I'm backporting that to MX 17 Linux on a vanilla Stretch pbuilder. Mesa 18.X can also be backported to Stretch, but that requires more backports first, notably the "heavy" build of the llvm-6.0 toolchain. But llvm-6.0 is already in stretch-backports, so a lot of the heavy lifting is done.
MX Linux packager and developer

Post Reply