# which are the correct firmwares for Athlon 200GE with Vega 3

## bigbanana69

Hi,

I want to install Gentoo amd64 UEFI on a PC with Athlon 200GE with Vega 3 graphics (APU).

lscpu shows the APU:

CPU family: 23

Model: 17

lspci shows:

AMD/ATI Raven/Raven2 vga

'amd-ucode/microcode_amd_fam17h.bin amd-ucode/microcode_amd_fam17h.bin.asc' are probably correct, right?

Do I need 'amd/amd_sev_fam17h_mode10xh.sbin' too?

And for Vega 3,

'amdgpu/raven_*..bin' firmwares are probably correct, right?

VIDEO_CARDS="amdgpu radeonsi" is probably correct too?

----------

## Gatak

Correct firmware should be loaded automatically if you have then in /lib/firmware and compile microcode and amdgpu as modules. Just install linux-firmware.

----------

## bigbanana69

I want to 'blob' the correct firmwares into the kernel, but I'm not sure which ones are correct for 'Athlon 200GE with Vega 3 Graphics (Raven Ridge) APU".

----------

## NeddySeagoon

bigbanana69,

Make it work first. When you have a working kernel, install a different kernel version with the firmware built in.

If you build the firmware in and get it wrong, you won't have a console.

Having two kernels, one working, one not is tolerable. You boot the working one from the grub menu.

Having only one kernel, which is broken, is a pain.

I think you are on the right track though.

----------

## bigbanana69

Most of all, I'm not sure if 'amd/amd_sev_fam17h_model0xh.sbin' is for Athlon 200GE.

According to https://wiki.gentoo.org/wiki/AMD_microcode, "amd/amd_sev_fam17h_model0xh.sbin - AMD SEV (Secure Encrypted Virtualization) firmware update for AMD Family 17h models in the range 00h to 0fh", for which I'm not sure if Athlon 200GE is in that range and I don't know how to check it.

raven_*..bin & microcode_amd_fam17h firmwares are correct ones for that APU.

----------

## NeddySeagoon

bigbanana69,

Its harmless to include too much firmware in the kernel. Its just wasted space.

Look in /proc/cpuinfo ...

I get 

```
processor       : 0

vendor_id       : AuthenticAMD

cpu family      : 16

model           : 10

model name      : AMD Phenom(tm) II X6 1090T Processor

stepping        : 0
```

----------

## bigbanana69

Athlon 200GE is model 17 (hexadecimal 11h), it's written that "amd/amd_sev_fam17h_model0xh.sbin - AMD SEV (Secure Encrypted Virtualization) firmware update for AMD Family 17h models in the range 00h to 0fh", so that means no, right?

----------

## The Main Man

You don't need  "amd/amd_sev_fam17h_model0xh.sbin"

These are the ones you need :

```
amd-ucode/microcode_amd_fam17h.bin 

amdgpu/raven_asd.bin 

amdgpu/raven_ce.bin 

amdgpu/raven_dmcu.bin 

amdgpu/raven_gpu_info.bin

amdgpu/raven_kicker_rlc.bin 

amdgpu/raven_me.bin 

amdgpu/raven_mec2.bin 

amdgpu/raven_mec.bin 

amdgpu/raven_pfp.bin 

amdgpu/raven_rlc.bin 

amdgpu/raven_sdma.bin

amdgpu/raven_ta.bin 

amdgpu/raven_vcn.bin
```

----------

## bigbanana69

Ok.

----------

## bigbanana69

The kernel stops loading at:

```
fb: switching to smdgpudrmfb from EFI VGA
```

I had enabled all AMDGPU feautures in the kernel except I couldn't find these:

```
                  [ /*] DC support for Polaris and older ASICs

                        (only needed for Polaris, Carrizo, Tonga, Bonaire, Hawaii)

                  [ /*] AMD FBC - Enable Frame Buffer Compression

                  [ /*] DCN 1.0 Raven family

                        (only needed for Vega RX as part of Raven Ridge APUs)
```

As they are shown on:

https://wiki.gentoo.org/wiki/AMDGPU

Help?

----------

## The Main Man

What kernel version are you using ?

----------

## bigbanana69

vmlinuz-4.19.97-gentoo.

----------

## The Main Man

Firmware is not probably loading, make sure your config kernel is set right.

I have the same chip as you, I also have everything built into the kernel, not as module.

Here's mine :

```
#

# Firmware loader

#

CONFIG_FW_LOADER=y

CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/raven_asd.bin amdgpu/raven_ce.bin amdgpu/raven_dmcu.bin amdgpu/raven_gpu_info.bin amdgpu/raven_kicker_rlc.bin amdgpu/raven_me.bin amdgpu/raven_mec2.bin amdgpu/raven_mec.bin amdgpu/raven_pfp.bin amdgpu/raven_rlc.bin amdgpu/raven_sdma.bin amdgpu/raven_vcn.bin amdgpu/raven_ta.bin"

CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

# CONFIG_FW_LOADER_USER_HELPER is not set

# CONFIG_FW_LOADER_COMPRESS is not set

# end of Firmware loader
```

----------

## bigbanana69

I'm sure that this is set:

```
CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/raven_asd.bin amdgpu/raven_ce.bin amdgpu/raven_dmcu.bin amdgpu/raven_gpu_info.bin amdgpu/raven_kicker_rlc.bin amdgpu/raven_me.bin amdgpu/raven_mec2.bin amdgpu/raven_mec.bin amdgpu/raven_pfp.bin amdgpu/raven_rlc.bin amdgpu/raven_sdma.bin amdgpu/raven_vcn.bin amdgpu/raven_ta.bin"

CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
```

I'm not sure about this one:

```
CONFIG_FW_LOADER=y
```

Unless it's 'y' as default, because I haven't been changing anything.

----------

## bigbanana69

Yes, it's 'y' by default.

Here's that part of .config:

```
CONFIG_FW_LOADER=y

CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/raven_asd.bin amdgpu/raven_ce.bin amdgp$

CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
```

I had also checked that all the firmwares are correct in CONFIG_EXTRA_FIRMWARE= field.

From the AMDGPU subfields in the kernel, I had left just 'kgdb (NEW)' as I wasn't sure about that.

All DRM fields are checked (except 2 sub-fields which were for developers).

----------

## bigbanana69

kajzer, when I was compiling the kernel for the first time, it returned with firmware error (I had typed mdagpu/raven_me.bin instead of amdgpu/raven_me.bin). Then I had corrected it and compiled it where the compalation process continued from the place where it left. Maybe that's the error?

How do I clear the kernel comaling cache and compile it from scratch?

----------

## The Main Man

btw I'm not using UEFI and I'm on the latest kernel (5.5.2) 

I made screenshots of kernel config, it might help you.

https://imgur.com/AzhQqfb

Direct Rendering Manager....

https://imgur.com/tz86rgL

Display Engine Configuration

https://imgur.com/XCk0Ola

Maybe it's not firmware problem then, maybe it's UEFI, I never used that so I don't know how that works and maybe your error is related to that.

Using that chip for over a year now, never had problems, I'm not sure what else I can tell you.

----------

## bigbanana69

Support for UEFI wasn't enabled in the kernel, so I had enabled it and still stops at same amdgpudrm...

I had disabled the SI & CIC in AMDGPU options (which are for Southern and Sea Islands).

Still doesn't works.

# lspci | grep -i VGA

09:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev cb)

Maybe, additionally I need to load 'amdgpu/raven2_*..bin' firmwares or 'amdgpu/vegam_*..bin' firmwares'?

Or the 'vega10' firmwares?

I had a similar issue on my notebook with radeon 8250' HD graphics (KABINI), where beside loading 'radeon/kabini_*..bin' &'radeon/KABINI_*..bin' firmwares I had to load 'radeon/bonaire_*..bin' & 'radeon/BONIARE_*..bin' firmwares since KABINI has been based on BONAIRE... and then it worked.

https://en.wikichip.org/wiki/amd/cores/raven_ridge

And according to:

https://wiki.gentoo.org/wiki/AMDGPU

```
Vega    VEGA10    RX Vega 56, RX Vega 64    amdgpu/vega10_{acg_smc,asd,ce,gpu_info,me,mec,mec2,pfp,rlc,sdma,sdma1,smc,sos,uvd,vce}.bin

RAVEN    Raven Ridge APU series    amdgpu/raven_{asd,ce,gpu_info,me,mec,mec2,pfp,rlc,sdma,vcn}.bin

VEGA12    Raven 2 Vega Mobile    amdgpu/vega12_{asd,ce,gpu_info,me,mec,mec2,pfp,rlc,sdma,sdma1,smc,sos,uvd,vce}.bin
```

----------

## The Main Man

Yeah my lspci gives me the same output as yours.

Although looking now at your previous posts I'm confused with this :

```
model name      : AMD Phenom(tm) II X6 1090T Processor
```

Mine lscpu is like this :

```
Architecture:                    x86_64

CPU op-mode(s):                  32-bit, 64-bit

Byte Order:                      Little Endian

Address sizes:                   43 bits physical, 48 bits virtual

CPU(s):                          4

On-line CPU(s) list:             0-3

Thread(s) per core:              2

Core(s) per socket:              2

Socket(s):                       1

Vendor ID:                       AuthenticAMD

CPU family:                      23

Model:                           17

Model name:                      AMD Athlon 200GE with Radeon Vega Graphics

Stepping:                        0

CPU MHz:                         2596.106

BogoMIPS:                        6387.84

Virtualization:                  AMD-V

L1d cache:                       64 KiB

L1i cache:                       128 KiB

L2 cache:                        1 MiB

L3 cache:                        4 MiB

Vulnerability Itlb multihit:     Not affected

Vulnerability L1tf:              Not affected

Vulnerability Mds:               Not affected

Vulnerability Meltdown:          Not affected

Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp

Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization

Vulnerability Spectre v2:        Mitigation; Full AMD retpoline, IBPB conditional, STIBP disabled, RSB filling

Vulnerability Tsx async abort:   Not affected

Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid a

                                 perfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoex

                                 t perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsave

                                 erptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
```

Anyway, look at /var/log/Xorg.0.log, see what it says, here's mine to compare, some relevant parts.

See if there is some error message or something.

Actually I forgot.... you can't get to Xorg, well check the firmware again, it should work if you made it right.

Or we have somehow different GPU, try then loading all amdgpu firmware and if it works then narrow it down.

```
[    47.480] (II) LoadModule: "amdgpu"

[    47.480] (II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so

[    47.525] (II) Module amdgpu: vendor="X.Org Foundation"

[    47.525]    compiled for 1.20.5, module version = 19.0.1

[    47.525]    Module class: X.Org Video Driver

[    47.525]    ABI class: X.Org Video Driver, version 24.0

[    47.525] (II) AMDGPU: Driver for AMD Radeon:

   All GPUs supported by the amdgpu kernel driver

[    47.525] (++) using VT number 1

[    47.525] (--) controlling tty is VT number 1, auto-enabling KeepTty

[    47.525] (II) AMDGPU(0): [KMS] Kernel modesetting enabled.

[    47.537] (II) AMDGPU(0): Creating default Display subsection in Screen section

   "Default Screen Section" for depth/fbbpp 24/32

[    47.537] (==) AMDGPU(0): Depth 24, (--) framebuffer bpp 32

[    47.537] (II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)

[    47.537] (==) AMDGPU(0): Default visual is TrueColor

[    47.537] (**) AMDGPU(0): Option "TearFree" "true"

[    47.537] (==) AMDGPU(0): RGB weight 888

[    47.537] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)

[    47.537] (--) AMDGPU(0): Chipset: "Unknown AMD Radeon GPU" (ChipID = 0x15dd)

[    47.537] (II) Loading sub module "fb"

[    47.537] (II) LoadModule: "fb"

[    47.537] (II) Loading /usr/lib64/xorg/modules/libfb.so

[    47.546] (II) Module fb: vendor="X.Org Foundation"

[    47.546]    compiled for 1.20.5, module version = 1.0.0

[    47.546]    ABI class: X.Org ANSI C Emulation, version 0.4

[    47.546] (II) Loading sub module "dri2"

[    47.546] (II) LoadModule: "dri2"

[    47.546] (II) Module "dri2" already built-in

[    49.010] (II) Loading sub module "glamoregl"

[    49.010] (II) LoadModule: "glamoregl"

[    49.010] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so

[    49.084] (II) Module glamoregl: vendor="X.Org Foundation"

[    49.084]    compiled for 1.20.5, module version = 1.0.1

[    49.084]    ABI class: X.Org ANSI C Emulation, version 0.4

[    49.160] (II) AMDGPU(0): glamor X acceleration enabled on AMD RAVEN (DRM 3.33.0, 5.3.4-gentoo, LLVM 9.0.0)

[    49.160] (II) AMDGPU(0): glamor detected, initialising EGL layer.

[    49.160] (**) AMDGPU(0): TearFree property default: on

[    49.160] (==) AMDGPU(0): VariableRefresh: disabled

[    49.160] (II) AMDGPU(0): KMS Pageflipping: enabled
```

And I see in your kernel config this :

```
CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/raven_asd.bin amdgpu/raven_ce.bin amdgp$ 
```

Maybe you made some mistake there, it should be :

```
CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/raven_asd.bin amdgpu/raven_ce.bin amdgpu/raven_dmcu.bin amdgpu/raven_gpu_info.bin amdgpu/raven_kicker_rlc.bin amdgpu/raven_me.bin amdgpu/raven_mec2.bin amdgpu/raven_mec.bin amdgpu/raven_pfp.bin amdgpu/raven_rlc.bin amdgpu/raven_sdma.bin amdgpu/raven_vcn.bin amdgpu/raven_ta.bin" 
```

----------

## bigbanana69

 *kajzer wrote:*   

> And I see in your kernel config this :
> 
> ```
> CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/raven_asd.bin amdgpu/raven_ce.bin amdgp$ 
> ```
> ...

 

All 13 raven firmwares are loaded, just they aren't shown as the text is copied from terminal.

I'll probably need to load Vega10 firmwares and meybe even vegam firmwares so it would work properly (there's a possibility for raven2 firmwares too).

Acorrding to:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=30946b9b1787f086e8a1a3cb60658447212979c9

besides raven firmwares, vega10 firmwares are needed too for Raven Ridge.

----------

## bigbanana69

I just tried with vega10 firmwares (besides raven firmwares), but it's not enough. Still doesn't works.

Maybe vega12, even vegam, vega20 and possibly raven2 firmwares are needed too (at least some of them).

Also according to wikipedia, Vega GPU's are also called 'Radeon RX Vega/Radeon VII(7nm) '.

https://en.wikipedia.org/wiki/Radeon_RX_Vega_series#Desktop_APUs

----------

## Child_of_Sun_24

Do you have mem_encrypt disabled ?

----------

## bigbanana69

AMD mem encryption is enabled.

----------

## Child_of_Sun_24

For a working amdgpu driver mem_encrypt should be disabled.

The kernel commandline is:

mem_encrypt=off

Or you can disable it as default when you build the Kernel, mem_encrypt and amdgpu don't work together.

----------

## The Main Man

You can try to compile the kernel with my config, if you want

http://dpaste.com/2V4TCVM

----------

## bigbanana69

Ok. I'll disable and try... at first only with raven firmwares.

----------

## bigbanana69

These all were =y:

CONFIG_ARCH_HAS_MEM_ENCRYPT=n

CONFIG_AMD_MEM_ENCRYPT=n

CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=n

----------

## bigbanana69

I had removed those 3 mem_encrypt lines from the .config file.

Then I had added vega10, raven, vega12 & vegam firmwares (because they are all for raven ridge chipsets) to the .config and compiled it. Still doesn't works.

Now at boot it shows kernel screen, and then black screen.

I think to try additionally with raven2 and picasso firmwares, because, that is all I had left to try.

Any help?

----------

## NeddySeagoon

bigbanana69,

Never ever edit the kernel .config file with ${EDITOR}

Some single menuconfig options flip lots of flags in the .config file.

Some .config flags are not user changeable at all.    

e.g. CONFIG_ARCH_HAS_MEM_ENCRYPT=n is a statement of fact, it relates to a feature present on the ARCH and has no impact on the kernel itself.

```
CONFIG_AMD_MEM_ENCRYPT=n

CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=n
```

Is incorrect.

```
#CONFIG_AMD_MEM_ENCRYPT is not set

#CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is not set
```

would be better but it ignores the some single menuconfig options flip lots of flags in the .config file.

Throw away your kernel build. Revert your ${EDITOR} changes, if they are still there.

----------

## bigbanana69

After removing those lines from .config, I had started make menuconfig and then save the configuration, so it should be ok.

----------

## bigbanana69

This option is still enabled in the kernel:

CONFIG_ARCH_HAS_MEM_ENCRYPT=y

# CONFIG_AMD_MEM_ENCRYPT is not set

Where do I disable it in make menuconfig?

--

I had also enabled EDID and few more options in Framebuffer devices (under graphics field).

I had compiled the kernel without EDID, but still doesn't works.

----------

## The Main Man

I have that one enabled and amdgpu works fine

CONFIG_ARCH_HAS_MEM_ENCRYPT=y

# CONFIG_AMD_MEM_ENCRYPT is not set

You're not doing something right, I don't know how you compile kernel and what you're doing but you can try first with firmware not built into the kernel for example.

And then when you have the system running ok, try to customize the kernel.

Now you have in portage binary kernel, you can try that as well.

Genkernel is also a option.

----------

## bigbanana69

Sure I may try that.

But also, maybe there's some log file I can check?

According to this site:

https://packages.debian.org/buster/firmware-amd-graphics

Raven should work only with raven firmwares.

----------

## bigbanana69

I had compiled the kernel without the raven firmwares and it again stops at 'swithing to amdgpudrmfb'.

Maybe I should use radeon driver instead of amdgpu in the kernel and in VIDEO_CARDS="radeon" instead "amdgpu radeonsi" even if the raven firmwares are in amdgpu folder?

On boot, the PC shows 'Athlon 200GE with Radeon Vega Graphics'.

----------

## bigbanana69

I had tried it with radeon drivers instead of amdgpu and amdgpu/raven* firmwares only... didn't returend any error.

----------

## bigbanana69

X doesn't starts.

$startx

---No displays found

http://dpaste.com/1DW95JV

----------

## bigbanana69

With radeon drivers I din't succeeded to get DRM hw acceleration neither to startx.

Then I tried few things with amdgpu:

Raven Ridge is the successor of 'Bristol Ridge' (AKA carrpiso) fam15h AMD.

I tried to build the kernel with amdgpu driver and 17h amd firmware and raven firmwares only, but the kernel boots and then I get black screen.

Then I tried to add amd 15h and carrizo firmwares and the result was same.

Then I added vega10, vegam, vega12, vega20, raven2 and picasso firmwares - the result is same.

Here's my .config file:

http://dpaste.com/2AFJ9EC

----------

