ValveSoftware / SteamOS

SteamOS community tracker
1.57k stars 70 forks source link

enable AMDGPU for AMD GCN1 hardware #593

Closed sylware closed 7 years ago

sylware commented 7 years ago

Linux 4.11 can support AMD GCN1 hardware with the amdgpu module (= vulkan support), but it needs to be enabled at compilation time.

Could you enable AMD CGN1 hardware in amdgpu in your kernel?

Thank you.

kisak-valve commented 7 years ago

There's two separate requests here, enabling support in the kernel config and conditionally blacklisting the radeon module noted at https://wiki.archlinux.org/index.php/AMDGPU#Blacklist_radeon.

It should be fairly trivial to enable GCN1 in the kernel, but until upstream considers GCN1 support in amdgpu to be non-experimental, preferring amdgpu over radeon could cause more regressions than benefit for the majority of users.

sylware commented 7 years ago

On Tue, May 23, 2017 at 05:41:24AM -0700, kisak-valve wrote:

There's two separate requests here, enabling support in the kernel config and conditionally blacklisting the radeon module noted at https://wiki.archlinux.org/index.php/AMDGPU#Blacklist_radeon.

It should be fairly trivial to enable GCN1 in the kernel, but until upstream considers GCN1 support in amdgpu to be non-experimental, this change can cause more regressions than benefit for the majority of users.

AMD GCN1 support in AMDGPU linux module is enabled in modern distros (I did tried the lastest fedora), but RADEON linux module get loaded by default.

If a user wants the freedom to use AMD GCN1 support in AMDGPU linux module, she just need to black list the RADEON linux module, then the AMDGPU linux module will be loaded instead.

I did blacklist the radeon module but it seems SteamOS AMDGPU module misses AMD GCN1 support which should be enabled at compile time.

-- Sylvain

mdeguzis commented 7 years ago

That does not address @kisak-valve 's concerns. Making that kind of change is undesired.

It should be fairly trivial to enable GCN1 in the kernel, but until upstream considers GCN1 support in amdgpu to be non-experimental, but preferring amdgpu over radeon could cause more regressions than benefit for the majority of users.

preferring amdgpu over radeon could cause more regressions than benefit for the majority of users.

sylware commented 7 years ago

On Wed, May 24, 2017 at 03:24:01AM -0700, Michael T. DeGuzis wrote:

That does not address @kisak-valve 's concerns. Making that kind of change is undesired.

It should be fairly trivial to enable GCN1 in the kernel, but until upstream considers GCN1 support in amdgpu to be non-experimental, but preferring amdgpu over radeon could cause more regressions than benefit for the majority of users.

preferring amdgpu over radeon could cause more regressions than benefit for the majority of users.

The loading of AMD RADEON Linux module is still default for the majority of the users. For the advanced users who want the freedom/opportunity to test and maybe report bugs to upstream AMD and/or mesa devs VULKAN support on their AMD GCN1 hardware, they would just need to blacklist the RADEON Linux module in /etc/modprobe.d.

I did test this method with the latest Fedora GNU/Linux with success.

-- Sylvain

johnv-valve commented 7 years ago

I enabled this in our kernel build for today's beta http://steamcommunity.com/groups/steamuniverse/discussions/1/2333276539589853731/ I haven't tried it and probably won't, so let me know if it is not working for you.

sylware commented 7 years ago

@johnv-valve SteamOS beta 118: I blacklisted the radeon module, updated the initramfs (linux 4.11...58), amdgpu module is not loading, only the vesa framebuffer module. I did try to manually load the amdgpu module, it did not recognized my AMD GCN1 hardware. It seems the PCI IDS fallback to let the amdgpu module handle AMD GCN1 hardware instead of the radeon module is not there.

psychotrome commented 7 years ago

Newest beta repo kernel (release 58) did not have Southern Islands (SI) enabled for the module. I know cause I rebuilt it by hand with it enabled. It works and the performance on my R9 270x is amazing! I highly suggest actually really enabling it in the beta kernel.

sylware commented 7 years ago

On Thu, Jun 15, 2017 at 12:50:14PM -0700, psychotrome wrote:

Newest beta repo kernel (release 58) did not have Southern Islands (SI) enabled for the module. I know cause I rebuilt it by hand with it enabled. It works and the performance on my R9 270x is amazing! I highly suggest actually really enabling it in the beta kernel.

And you can have amdgpu pro driver and mesa driver vulkan support... Then actually, it was not enabled :(

sylware commented 7 years ago

Ate the bullet, I did compile my own fat (0-module) linux 4.11.6 with AMD GCN1 support. Apart from the usual annoyances from systemd, got it working: Dota2 OpenGL is fine, but Dota2 mesa vulkan got stuck once the dashboard was displayed.

psychotrome commented 7 years ago

Release 62 still doesn't have it. This topic should be open or else confirmed that beta drivers (on steams beta kernel...) aren't supported.

Otherwise, these work great on my GCN1 hardware. Aside from a one pixel-wide pink border on the left side of the screen. I didn't expect Vulcan to work but I don't have any Linux games that support it (as far as I know). I'll admit that there is a crash the the first boot after installing the newly compiled driver and it seems consistent since it happened in exactly the same way after the latest update but it never does it again afterwards after playing a game like Soma and Hyper Light Drifter the past few days.

Another curious thing that is probably because of my incompetence is that my amdgpu module is 42MB compared to the originals 2.9MB! Am I like compiling in all the debug symbols or firmware into it?...

sylware commented 7 years ago

dota2 game is a free2play and has state-of-the-art opengl and vulkan renderers on gnu/linux. (vulkan CS:GO/portal should happen).

amdgpu linux module is huge coze you have the whole support of AMD vega in it.

I posted a bug to the AMD devs coze there is a regression with AMD tahiti xt (southern islands) parts with linux 4.12: dota2 crashes in libparticles with the radeon or amdgpu module. But, it runs suspiciouly faster (I get ez 10-30 more FPS).

Also, for AMD tahiti xt (southern islands) parts, there is a bug in the mesa vulkan driver which blocks me to run the dota2 vulkan renderer, which should gives more CPU to dota2.