# Just got an RX Vega 64... kernel support?

## -=GGW=- $ol!d $n4>|e

I'm super confused reading around the internet on this topic. I'm on 4.14? ish kernel version of gentoo sources. Just got a RX Vega 64 (switching from nvidia 980) and am trying to figure out how to get the kernel / drivers for opencl / opengl / vulkan all setup on my gentoo install. Do i need a custom kernel? where from? is it AMDGPU? Any wierd use flags. It seems this is largely un-traversed territory but I'd love to go with the OpenSource drivers for all this on gentoo.

What have I gotten myself into o.o.

Any help is much appreciated, last time I worked with an amd card i was using fglrx and it was an ati card  :Razz: . Has someone made an overlay with amd sources merged with gentoo?

----------

## Ant P.

You shouldn't need a custom kernel, maybe a 4.15-rc at the extreme but it's all in mainline now.

For userspace you need VIDEO_CARDS="amdgpu radeonsi" LLVM_TARGETS="AMDGPU" USE="opengl opencl vulkan", and you'll also want USE="vdpau vaapi openmax" (in order of usefulness) for video decoding - be warned it seems a bit flaky on these new cards (frameskip not working, so A-V will gradually desync).

Enable the AMDGPU driver in the Kconfig DRM menu, compile in vega firmware (hint: cd /lib/firmware && echo amdgpu/vega*), that should get you to a working console when you reboot. Make sure to actually enable the framebuffer console (and UEFI graphical console too if you have one).

----------

## NeddySeagoon

-=GGW=- $ol!d $n4>|e,

There is a new amdgpu driver in 4.15,  it shouldn't be required but don't faff about with 4.14 if you are having issues.

----------

## -=GGW=- $ol!d $n4>|e

Hmm.

That mostly worked. I removed xorg.conf from etc/X11 as the xorg installation guide claims no custom config is needed (so the custom config from nvidia-xconfig is no longer valid). However, I get no screens found when attempting to do a startx and the guides claim I should take a looc at /etc/X11/conf.d/40-monitors or some such which does not exist in my config directory.

Would nvidia-settings have messed with other xorg configurations aside from /etc/X11/xorg.conf? I noticed i have the radeonsi use flags but my graphics card is codenamed not after any of the islands (its post the island naming convention) is radeonsi really the flag i still want?

----------

## Ant P.

radeonsi isn't what you want for a card that new. There are two X drivers, "radeon" and "amdgpu". Sometimes it autodetects wrong, you may need to write the latter in xorg.conf manually.

----------

## NeddySeagoon

-=GGW=- $ol!d $n4>|e,

You need different things in different places.

VIDEO_CARDS="amdgpu radeonsi"

Rebuild both mesa and x11-base/xorg-drivers if that changes anything.

As Ant P. says, you may need 

```
Section "Device"

    Identifier  "Shiny New Video Card"

    Driver      "amdgpu"

EndSection

```

to coax Xorg to use the right driver.

----------

## -=GGW=- $ol!d $n4>|e

Thanks for the help so far, I actually ended up jumping through some other hoops to get it working. I'm still using amdgpu and radeonsi but even with the 999999 firmware the card would initialize but the framebuffer would freeze.

I ended up using git-sources 4.15_rc5 with the new amdgpu driver. This is working like a charm however I'd like to compare with amdgpu-pro. I do opencl / opengl / vulkan development on my machine (from gentoo) and it looks like the open source drivers for vega / polaris are not up to par with amdgpu-pro yet.

I cannot find any good info on how to use amdgpu-pro with gentoo. I found this from teh university of warwick, 

https://warwick.ac.uk/fac/cross_fac/complexity/people/staff/delgenio/amdgpuprogentoo/'

however that overlay is a year old and the dynamic kernel module package is old too.

----------

## -=GGW=- $ol!d $n4>|e

actually, after doing more research it seems like the open source drivers are really great at vulkan etc. For opencl its another story though, it looks like the best i can get is 1.1 through mesa. So i'm back to the amdgpu pro drivers or hope mesa gets to 1.2 soon   :Confused:   this means my question about amdgpu pro is still relevant

----------

## NeddySeagoon

-=GGW=- $ol!d $n4>|e,

Is it

```
$ eix amdg

* dev-libs/amdgpu-pro-opencl

     Available versions:  (~)17.40.492261^fms (~)17.50.511655^fms

     Homepage:            https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx

     Description:         Proprietary OpenCL implementation for AMD GPUs
```

From memory, the amdgpu-pro driver is an add on extra for the open source driver.

I've not tried it.

----------

## Marlo

 *-=GGW=- $ol!d $n4>|e wrote:*   

> 
> 
> https://warwick.ac.uk/fac/cross_fac/complexity/people/staff/delgenio/amdgpuprogentoo/'
> 
> however that overlay is a year old and the dynamic kernel module package is old too.

 

-=GGW=- $ol!d $n4>|e you can write an e-mail to Dr. Charo I del Genio and ask if he can update his page. He guided me through the installation and answered all my questions. And maybe this article off Phoronix can help you understand it. You also need the latest version of LLVM >= 5 and its dependencies. Some distributions use gcc 7 or clang >= 5. 

And see what Ant P. wrote, you really need the extra use flags. At the moment I use only the last unstable issues.

And one last word: In advertising, installing amdgpu-pro always looks so easy. But synonymous with (the easy to handle?) Ubuntu are in my experience 7 out of 10 attempts unfortunately flawed. I think we need a bit more patience with the topic amdgpu.

----------

