Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[Solved]Kernel won't load module from EXTRA_FIRMWARE

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
34 posts
  • 1
  • 2
  • Next
Author
Message
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

[Solved]Kernel won't load module from EXTRA_FIRMWARE

  • Quote

Post by 4nn13 » Sat Oct 14, 2023 7:53 am

I recompiled the kernel and set the AMDGPU up and I configured the modules in extra_firmware after compiling the kernel I noticed the modules won't load correctly from the kerenel,[/code] any solution?

.config

Code: Select all

[~] $ cat /usr/src/linux/.config |grep EXTRA_FIRMWARE
CONFIG_EXTRA_FIRMWARE="radeon/hainan_ce.bin radeon/hainan_k_smc.bin radeon/hainan_mc.bin radeon/hainan_me.bin radeon/hainan_pfp.bin radeon/hainan_rlc.bin radeon/hainan_smc.bin radeon/TAHITI_uvd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
dmesg

Code: Select all

[~] $ dmesg  |grep amd
[    2.391003] [drm] amdgpu kernel modesetting enabled.
[    2.391016] amdgpu: vga_switcheroo: detected switching method \_SB_.PCI0.GFX0.ATPX handle
[    2.391332] amdgpu: CRAT table disabled by module option
[    2.391335] amdgpu: Virtual CRAT table created for CPU
[    2.391348] amdgpu: Topology: Add CPU node
[    2.391424] amdgpu 0000:01:00.0: enabling device (0000 -> 0003)
[    2.393061] kfd kfd: amdgpu: HAINAN  not supported in kfd
[    2.410438] amdgpu 0000:01:00.0: amdgpu: Fetched VBIOS from ATRM
[    2.410440] amdgpu: ATOM BIOS: BR40919.001
[    2.410449] amdgpu 0000:01:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[    2.410452] amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported
[    2.414530] Loading firmware: amdgpu/si58_mc.bin
[    2.419868] amdgpu 0000:01:00.0: amdgpu: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[    2.419873] amdgpu 0000:01:00.0: amdgpu: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF
[    2.419900] [drm] amdgpu: 2048M of VRAM memory ready
[    2.419902] [drm] amdgpu: 5915M of GTT memory ready.
[    2.420648] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 256M enabled (table at 0x000000F400000000).
[    2.420724] Loading firmware: amdgpu/hainan_pfp.bin
[    2.421307] Loading firmware: amdgpu/hainan_me.bin
[    2.421594] Loading firmware: amdgpu/hainan_ce.bin
[    2.422001] Loading firmware: amdgpu/hainan_rlc.bin
[    2.422941] Loading firmware: amdgpu/banks_k_2_smc.bin
[    2.424074] [drm] amdgpu: dpm initialized
[    2.716159] amdgpu 0000:01:00.0: amdgpu: SE 1, SH per SE 1, CU per SH 5, active_cu_number 5
[    3.205759] amdgpu 0000:01:00.0: amdgpu: Using BOCO for runtime pm
[    3.205969] [drm] Initialized amdgpu 3.49.0 20150101 for 0000:01:00.0 on minor 1
[   30.300575] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 256M enabled (table at 0x000000F400000000).
[   78.572719] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 256M enabled (table at 0x000000F400000000).
[   78.821582] [drm:si_dpm_set_power_state [amdgpu]] *ERROR* si_power_control_set_level failed
[  533.166545] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 256M enabled (table at 0x000000F400000000).
lspci

Code: Select all

610 Mobile] [1002:6665] (rev c3)
        Subsystem: Dell Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520/610 Mobile] [1028:08c9]
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
Last edited by 4nn13 on Tue Oct 17, 2023 12:38 pm, edited 1 time in total.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Oct 14, 2023 9:32 am

According to 1002:6665 you need either of the two

Code: Select all

CONFIG_DRM_AMDGPU
or
CONFIG_DRM_RADEON
https://cateee.net/lkddb/web-lkddb/DRM_AMDGPU.html
https://cateee.net/lkddb/web-lkddb/DRM_RADEON.html
For some reason the kernel picked amdgpu.
So if your kernel modules are in-built you should use amdgpu firmware.It already does.
You only need this
CONFIG_EXTRA_FIRMWARE="radeon/hainan_ce.bin radeon/hainan_k_smc.bin radeon/hainan_mc.bin radeon/hainan_me.bin radeon/hainan_pfp.bin radeon/hainan_rlc.bin radeon/hainan_smc.bin radeon/TAHITI_uvd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
If the drivers are compiled in the kernel.
Jf not then remove it.
Plz post

Code: Select all

grep -E "CONFIG_DRM_AMDGPU|CONFIG_DRM_RADEON" /usr/src/linux/.config
:)
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sat Oct 14, 2023 2:16 pm

alamahant wrote:According to 1002:6665 you need either of the two

Code: Select all

CONFIG_DRM_AMDGPU
or
CONFIG_DRM_RADEON
https://cateee.net/lkddb/web-lkddb/DRM_AMDGPU.html
https://cateee.net/lkddb/web-lkddb/DRM_RADEON.html
For some reason the kernel picked amdgpu.
So if your kernel modules are in-built you should use amdgpu firmware.It already does.
You only need this
CONFIG_EXTRA_FIRMWARE="radeon/hainan_ce.bin radeon/hainan_k_smc.bin radeon/hainan_mc.bin radeon/hainan_me.bin radeon/hainan_pfp.bin radeon/hainan_rlc.bin radeon/hainan_smc.bin radeon/TAHITI_uvd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
If the drivers are compiled in the kernel.
Jf not then remove it.
Plz post

Code: Select all

grep -E "CONFIG_DRM_AMDGPU|CONFIG_DRM_RADEON" /usr/src/linux/.config
I've compiled the kernel with extra_firmware now the problem is the modules are not load by kernel even i configured extra_firmware, the log shows the kernel load the modules from amdgpu folder, why?
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sat Oct 14, 2023 2:17 pm

4nn13 wrote:
alamahant wrote:According to 1002:6665 you need either of the two

Code: Select all

CONFIG_DRM_AMDGPU
or
CONFIG_DRM_RADEON
https://cateee.net/lkddb/web-lkddb/DRM_AMDGPU.html
https://cateee.net/lkddb/web-lkddb/DRM_RADEON.html
For some reason the kernel picked amdgpu.
So if your kernel modules are in-built you should use amdgpu firmware.It already does.
You only need this
CONFIG_EXTRA_FIRMWARE="radeon/hainan_ce.bin radeon/hainan_k_smc.bin radeon/hainan_mc.bin radeon/hainan_me.bin radeon/hainan_pfp.bin radeon/hainan_rlc.bin radeon/hainan_smc.bin radeon/TAHITI_uvd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
If the drivers are compiled in the kernel.
Jf not then remove it.
Plz post

Code: Select all

grep -E "CONFIG_DRM_AMDGPU|CONFIG_DRM_RADEON" /usr/src/linux/.config
I've compiled the kernel with extra_firmware now the problem is the modules are not load by kernel even i configured extra_firmware, the log shows the kernel load the modules from amdgpu folder, why?

Code: Select all

grep -E "CONFIG_DRM_AMDGPU|CONFIG_DRM_RADEON" /usr/src/linux/.config
# CONFIG_DRM_RADEON is not set
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_AMDGPU_USERPTR=y
Top
hdcg
Tux's lil' helper
Tux's lil' helper
Posts: 122
Joined: Sun Apr 07, 2013 8:30 am

  • Quote

Post by hdcg » Sat Oct 14, 2023 2:28 pm

Hi 4nn13,

I think there is a misunderstanding about what CONFIG_EXTRA_FIRMWARE does.
It only includes those firmware files into the kernel, so they can be loaded without accessing the file system.

What firmware the kernel is looking for still depends on other config options.
I am not used to AMD hw, but my guess is by enabling CONFIG_DRM_AMDGPU you point the kernel into the AMDGPU direction.

Sidenote, as this is a module, file system access already works at the point in time module is loaded. Hence no need to include those FW files into the kernel.

Best Regards,
Holger
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 14, 2023 2:54 pm

4nn13,

please read this short chapter:

https://wiki.gentoo.org/wiki/User:Pieti ... s_Firmware
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 2:56 am

hdcg wrote:Hi 4nn13,

I think there is a misunderstanding about what CONFIG_EXTRA_FIRMWARE does.
It only includes those firmware files into the kernel, so they can be loaded without accessing the file system.

What firmware the kernel is looking for still depends on other config options.
I am not used to AMD hw, but my guess is by enabling CONFIG_DRM_AMDGPU you point the kernel into the AMDGPU direction.

Sidenote, as this is a module, file system access already works at the point in time module is loaded. Hence no need to include those FW files into the kernel.

Best Regards,
Holger
I've actually tried to compile AMDGPU as [M] and load modules from lib/firmware/amdgpu but the modules are still won't be load correctly, that's why I tried to apply the modules from radeon floder to test if the option extra_firmware works but no metter what modules I configure from etra_firmware the kernel won't load them from .config
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3529
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Sun Oct 15, 2023 5:25 am

Code: Select all

wgetpaste -c 'zcat /proc/config.gz'
please.

We also have these two wonderful wiki pages, I don't know why users point to other sources:

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

https://wiki.gentoo.org/wiki/Radeon

Also this thread contains some tips of how to force one driver over the other: viewtopic-t-1164695-highlight-radeon.html

Best Regards,
Georgi
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 15, 2023 10:37 am

4nn13,

The firmware files required are coded into the kernel module that needs them.
I have firmware files for three different AMDGPU cards in my kernel.

Code: Select all

$ grep FIRMWARE /usr/src/linux/.config
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_EXTRA_FIRMWARE="amdgpu/navy_flounder_ce.bin amdgpu/navy_flounder_rlc.bin amdgpu/navy_flounder_dmcub.bin amdgpu/navy_flounder_sdma.bin amdgpu/navy_flounder_me.bin amdgpu/navy_flounder_smc.bin amdgpu/navy_flounder_mec2.bin amdgpu/navy_flounder_sos.bin amdgpu/navy_flounder_mec.bin amdgpu/navy_flounder_ta.bin amdgpu/navy_flounder_pfp.bin amdgpu/navy_flounder_vcn.bin amdgpu/polaris12_32_mc.bin amdgpu/polaris12_ce_2.bin amdgpu/polaris12_ce.bin amdgpu/polaris12_k_mc.bin amdgpu/polaris12_k_smc.bin amdgpu/polaris12_mc.bin amdgpu/polaris12_me_2.bin amdgpu/polaris12_me.bin amdgpu/polaris12_mec2_2.bin amdgpu/polaris12_mec_2.bin amdgpu/polaris12_mec2.bin amdgpu/polaris12_mec.bin amdgpu/polaris12_pfp_2.bin amdgpu/polaris12_pfp.bin amdgpu/polaris12_rlc.bin amdgpu/polaris12_sdma1.bin amdgpu/polaris12_sdma.bin amdgpu/polaris12_smc.bin amdgpu/polaris12_uvd.bin amdgpu/polaris12_vce.bin amdgpu/polaris11_ce.bin amdgpu/polaris11_ce_2.bin amdgpu/polaris11_k2_smc.bin amdgpu/polaris11_k_mc.bin amdgpu/polaris11_k_smc.bin amdgpu/polaris11_mc.bin amdgpu/polaris11_me_2.bin amdgpu/polaris11_me.bin amdgpu/polaris11_mec2.bin amdgpu/polaris11_mec2_2.bin  amdgpu/polaris11_mec.bin amdgpu/polaris11_mec_2.bin amdgpu/polaris11_pfp.bin amdgpu/polaris11_pfp_2.bin amdgpu/polaris11_rlc.bin amdgpu/polaris11_sdma1.bin amdgpu/polaris11_sdma.bin amdgpu/polaris11_smc.bin amdgpu/polaris11_smc_sk.bin amdgpu/polaris11_uvd.bin amdgpu/polaris11_vce.bin amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
When AMD add another file which happens, I need to add it there before the new kernel will work.

There are two disconnected but interdependent things happening here. CONFIG_EXTRA_FIRMWARE is a build time instruction to the kernel build system. It makes it include that file list into the kernel binary, or fail.
The consumer modules also contain a list of firmware files that they want to load. Providing extra firmware that will not be used is fine.
Missing a required file is not.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 10:55 am

NeddySeagoon wrote:4nn13,

The firmware files required are coded into the kernel module that needs them.
I have firmware files for three different AMDGPU cards in my kernel.

Code: Select all

$ grep FIRMWARE /usr/src/linux/.config
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_EXTRA_FIRMWARE="amdgpu/navy_flounder_ce.bin amdgpu/navy_flounder_rlc.bin amdgpu/navy_flounder_dmcub.bin amdgpu/navy_flounder_sdma.bin amdgpu/navy_flounder_me.bin amdgpu/navy_flounder_smc.bin amdgpu/navy_flounder_mec2.bin amdgpu/navy_flounder_sos.bin amdgpu/navy_flounder_mec.bin amdgpu/navy_flounder_ta.bin amdgpu/navy_flounder_pfp.bin amdgpu/navy_flounder_vcn.bin amdgpu/polaris12_32_mc.bin amdgpu/polaris12_ce_2.bin amdgpu/polaris12_ce.bin amdgpu/polaris12_k_mc.bin amdgpu/polaris12_k_smc.bin amdgpu/polaris12_mc.bin amdgpu/polaris12_me_2.bin amdgpu/polaris12_me.bin amdgpu/polaris12_mec2_2.bin amdgpu/polaris12_mec_2.bin amdgpu/polaris12_mec2.bin amdgpu/polaris12_mec.bin amdgpu/polaris12_pfp_2.bin amdgpu/polaris12_pfp.bin amdgpu/polaris12_rlc.bin amdgpu/polaris12_sdma1.bin amdgpu/polaris12_sdma.bin amdgpu/polaris12_smc.bin amdgpu/polaris12_uvd.bin amdgpu/polaris12_vce.bin amdgpu/polaris11_ce.bin amdgpu/polaris11_ce_2.bin amdgpu/polaris11_k2_smc.bin amdgpu/polaris11_k_mc.bin amdgpu/polaris11_k_smc.bin amdgpu/polaris11_mc.bin amdgpu/polaris11_me_2.bin amdgpu/polaris11_me.bin amdgpu/polaris11_mec2.bin amdgpu/polaris11_mec2_2.bin  amdgpu/polaris11_mec.bin amdgpu/polaris11_mec_2.bin amdgpu/polaris11_pfp.bin amdgpu/polaris11_pfp_2.bin amdgpu/polaris11_rlc.bin amdgpu/polaris11_sdma1.bin amdgpu/polaris11_sdma.bin amdgpu/polaris11_smc.bin amdgpu/polaris11_smc_sk.bin amdgpu/polaris11_uvd.bin amdgpu/polaris11_vce.bin amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
When AMD add another file which happens, I need to add it there before the new kernel will work.

There are two disconnected but interdependent things happening here. CONFIG_EXTRA_FIRMWARE is a build time instruction to the kernel build system. It makes it include that file list into the kernel binary, or fail.
The consumer modules also contain a list of firmware files that they want to load. Providing extra firmware that will not be used is fine.
Missing a required file is not.
The thing is no matter how many times i configure the extra_firmware to the kernel and recompile it with new .config the kernel won't load the firmware, i tried both [*] [m] to build amdgpu it will make the kernel log differernt but however it will not load any firmware from extra_firmware so what exactly the problem is? the kernel will load some weird firmware from /lib/firmware/amdgpu and make error messages but it won't accept the value from extra_firmware

Code: Select all

[~] $ dmesg |grep amdgpu
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.1.53-gentoo-r1 root=PARTUUID=ebfc2a21-82e1-394c-ad23-8e778025c2eb ro radeon.si_support=0 amdgpu.si_support=1
[    0.030787] Kernel command line: BOOT_IMAGE=/vmlinuz-6.1.53-gentoo-r1 root=PARTUUID=ebfc2a21-82e1-394c-ad23-8e778025c2eb ro radeon.si_support=0 amdgpu.si_support=1
[    2.391151] [drm] amdgpu kernel modesetting enabled.
[    2.391183] amdgpu: vga_switcheroo: detected switching method \_SB_.PCI0.GFX0.ATPX handle
[    2.391463] amdgpu: CRAT table disabled by module option
[    2.391465] amdgpu: Virtual CRAT table created for CPU
[    2.391474] amdgpu: Topology: Add CPU node
[    2.391553] amdgpu 0000:01:00.0: enabling device (0000 -> 0003)
[    2.392946] kfd kfd: amdgpu: HAINAN  not supported in kfd
[    2.411526] amdgpu 0000:01:00.0: amdgpu: Fetched VBIOS from ATRM
[    2.411530] amdgpu: ATOM BIOS: BR40919.001
[    2.411540] amdgpu 0000:01:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[    2.411543] amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported
[    2.415693] Loading firmware: amdgpu/si58_mc.bin
[    2.421161] amdgpu 0000:01:00.0: amdgpu: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[    2.421181] amdgpu 0000:01:00.0: amdgpu: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF
[    2.421207] [drm] amdgpu: 2048M of VRAM memory ready
[    2.421209] [drm] amdgpu: 5915M of GTT memory ready.
[    2.421860] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 256M enabled (table at 0x000000F400000000).
[    2.421956] Loading firmware: amdgpu/hainan_pfp.bin
[    2.422740] Loading firmware: amdgpu/hainan_me.bin
[    2.423223] Loading firmware: amdgpu/hainan_ce.bin
[    2.423868] Loading firmware: amdgpu/hainan_rlc.bin
[    2.424735] Loading firmware: amdgpu/banks_k_2_smc.bin
[    2.425873] [drm] amdgpu: dpm initialized
[    2.720018] amdgpu 0000:01:00.0: amdgpu: SE 1, SH per SE 1, CU per SH 5, active_cu_number 5
[    3.216416] amdgpu 0000:01:00.0: amdgpu: Using BOCO for runtime pm
[    3.216655] [drm] Initialized amdgpu 3.49.0 20150101 for 0000:01:00.0 on minor 1
[   12.920596] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 256M enabled (table at 0x000000F400000000).
[~] $



for example it will load amdgpu/banks_k_2_smc.bin and amdgpu/si58_mc.bin from nowhere
my .config

Code: Select all

CONFIG_EXTRA_FIRMWARE="hainan_ce.bin hainan_k_smc.bin hainan_mc.bin hainan_me.bin hainan_pfp.bin hainan_rlc.bin hainan_smc.bin TAHITI_uvd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/radeon"
same as intelgpu, the kerenl will load i915 even my intelgpu don't need the moudles anyway.
Last edited by 4nn13 on Sun Oct 15, 2023 11:02 am, edited 1 time in total.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sun Oct 15, 2023 10:59 am

The problem is that if you have modules then you dont need
CONFIG_EXTRA_FIRMWARE
Your kernel does NOT want to load the radeon firmware because it loads the amdgpu ones.
Why do you insist on the radeon ones?
From the beggining it was loading the correct ones.

Code: Select all

 2.420724] Loading firmware: amdgpu/hainan_pfp.bin
[    2.421307] Loading firmware: amdgpu/hainan_me.bin
[    2.421594] Loading firmware: amdgpu/hainan_ce.bin
[    2.422001] Loading firmware: amdgpu/hainan_rlc.bin
[    2.422941] Loading firmware: amdgpu/banks_k_2_smc.bin
[    2.424074] [drm] amdgpu: dpm initialized
Just make sure you have

Code: Select all

CONFIG_DRM_AMDGPU=m
and forget the rest.
:)
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 11:08 am

alamahant wrote:The problem is that if you have modules then you dont need
CONFIG_EXTRA_FIRMWARE
Your kernel does NOT want to load the radeon firmware because it loads the amdgpu ones.
Why do you insist on the radeon ones?
From the beggining it was loading the correct ones.

Code: Select all

 2.420724] Loading firmware: amdgpu/hainan_pfp.bin
[    2.421307] Loading firmware: amdgpu/hainan_me.bin
[    2.421594] Loading firmware: amdgpu/hainan_ce.bin
[    2.422001] Loading firmware: amdgpu/hainan_rlc.bin
[    2.422941] Loading firmware: amdgpu/banks_k_2_smc.bin
[    2.424074] [drm] amdgpu: dpm initialized
Just make sure you have

Code: Select all

CONFIG_DRM_AMDGPU=m
and forget the rest.
The problem is AMDGPU isn't work properly with X, the device will not show up, so I thought there must be something wrong with the firmware, i assume even the firmware is not correct for the gpu the kernel suppose to load the firmware from the extra_firmware but it will load the moudls by itself and amdgpu radeon is quite confusing, i don't really understand why I need to put radeonsi or radeon to make.conf and many packages USE amdgpu rather than radeon but some how i need to put it into the config file, i'm confused
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sun Oct 15, 2023 11:15 am

Ok then.
Blacklist the amdgpu driver

Code: Select all

echo "blacklist amdgpu" > /etc/modprobe.d/amdgpu.conf
Then have

Code: Select all

CONFIG_DRM_RADEON=m
rebuild and reinstall kernel/modules.
And forget about
CONFIG_EXTRA_FIRMWARE
ie remove it from .config. before rebuilding kernel.
Just reboot and see if it works now.
Last edited by alamahant on Sun Oct 15, 2023 11:18 am, edited 1 time in total.
:)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 15, 2023 11:15 am

4nn13,

You cannot force the kernel to load any firmware at all. You only make it available so that the kernel can help itself.

AMDGPU and RADEON are two different drivers that have some hardware overlap. If you have a GPU that can be driven buy either, pick exactly one.
It's not possible to mix the parts.

Code: Select all

$ ls /lib/firmware/*/hainan*
/lib/firmware/amdgpu/hainan_ce.bin     /lib/firmware/radeon/hainan_ce.bin
/lib/firmware/amdgpu/hainan_k_smc.bin  /lib/firmware/radeon/hainan_k_smc.bin
/lib/firmware/amdgpu/hainan_mc.bin     /lib/firmware/radeon/hainan_mc.bin
/lib/firmware/amdgpu/hainan_me.bin     /lib/firmware/radeon/hainan_me.bin
/lib/firmware/amdgpu/hainan_pfp.bin    /lib/firmware/radeon/hainan_pfp.bin
/lib/firmware/amdgpu/hainan_rlc.bin    /lib/firmware/radeon/hainan_rlc.bin
/lib/firmware/amdgpu/hainan_smc.bin    /lib/firmware/radeon/hainan_smc.bin
The AMDGPU driver will load firmware from /lib/firmware/amdgpu
The RADEON driver will use /lib/firmware/radeon/

Choose exactly one of AMDGPU or RADEON and do not mix the parts
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 11:19 am

NeddySeagoon wrote:4nn13,

You cannot force the kernel to load any firmware at all. You only make it available so that the kernel can help itself.

AMDGPU and RADEON are two different drivers that have some hardware overlap. If you have a GPU that can be driven buy either, pick exactly one.
It's not possible to mix the parts.

Code: Select all

$ ls /lib/firmware/*/hainan*
/lib/firmware/amdgpu/hainan_ce.bin     /lib/firmware/radeon/hainan_ce.bin
/lib/firmware/amdgpu/hainan_k_smc.bin  /lib/firmware/radeon/hainan_k_smc.bin
/lib/firmware/amdgpu/hainan_mc.bin     /lib/firmware/radeon/hainan_mc.bin
/lib/firmware/amdgpu/hainan_me.bin     /lib/firmware/radeon/hainan_me.bin
/lib/firmware/amdgpu/hainan_pfp.bin    /lib/firmware/radeon/hainan_pfp.bin
/lib/firmware/amdgpu/hainan_rlc.bin    /lib/firmware/radeon/hainan_rlc.bin
/lib/firmware/amdgpu/hainan_smc.bin    /lib/firmware/radeon/hainan_smc.bin
The AMDGPU driver will load firmware from /lib/firmware/amdgpu
The RADEON driver will use /lib/firmware/radeon/

Choose exactly one of AMDGPU or RADEON and do not mix the parts
Thanks for the quick answer, so here is my device, can you tell me which driver that the system actually needs?

Code: Select all

01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520/610 Mobile] (rev c3)
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sun Oct 15, 2023 11:21 am

Either of the two.
But since amdgpu does not work properly use radeon instead.And please bleack list the amdgpu one as shown above.
:)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 15, 2023 11:22 am

4nn13,

I need the Vendor and Device IDs.
Use

Code: Select all

lspci -nn
Here, its the [1002:73df]

Code: Select all

0c:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1)
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 11:24 am

NeddySeagoon wrote:4nn13,

I need the Vendor and Device IDs.
Use

Code: Select all

lspci -nn
Here, its the [1002:73df]

Code: Select all

0c:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1)

Code: Select all

01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520/610 Mobile] [1002:6665] (rev c3)
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sun Oct 15, 2023 11:25 am

@Neddy
Already here

Code: Select all

610 Mobile] [1002:6665] (rev c3)
        Subsystem: Dell Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520/610 Mobile] [1028:08c9]
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
Cateee gives both drivers Neddy.
:)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 15, 2023 11:33 am

Putting 1002:6665 pci site:cateee.net into your search engine will return two hits.
CONFIG_DRM_AMDGPU and CONFIG_DRM_RADEON

Your GPU is one of the older ones that AMDGPU was back ported to.

Choose the radeon driver and turn off AMDGPU.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 11:48 am

NeddySeagoon wrote:Putting 1002:6665 pci site:cateee.net into your search engine will return two hits.
CONFIG_DRM_AMDGPU and CONFIG_DRM_RADEON

Your GPU is one of the older ones that AMDGPU was back ported to.

Choose the radeon driver and turn off AMDGPU.
it is what it is, so I turned AMDGPU off, and compiling with CONFIG_DRM_RADEON as [*] into kernel, let's see wether if the GPU works.
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 12:01 pm

NeddySeagoon wrote:Putting 1002:6665 pci site:cateee.net into your search engine will return two hits.
CONFIG_DRM_AMDGPU and CONFIG_DRM_RADEON

Your GPU is one of the older ones that AMDGPU was back ported to.

Choose the radeon driver and turn off AMDGPU.
after build config_drm_radeon

dmesg

Code: Select all

[~] $ dmesg |grep radeon
[    3.599087] [drm] radeon kernel modesetting enabled.
[    3.601717] radeon 0000:01:00.0: enabling device (0000 -> 0003)
[    3.631591] radeon 0000:01:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
[    3.631595] radeon 0000:01:00.0: GTT: 2048M 0x0000000080000000 - 0x00000000FFFFFFFF
[    3.631609] [drm] radeon: 2048M of VRAM memory ready
[    3.631610] [drm] radeon: 2048M of GTT memory ready.
[    3.631618] Loading firmware: radeon/hainan_pfp.bin
[    3.637472] Loading firmware: radeon/hainan_me.bin
[    3.637762] Loading firmware: radeon/hainan_ce.bin
[    3.638253] Loading firmware: radeon/hainan_rlc.bin
[    3.638903] Loading firmware: radeon/si58_mc.bin
[    3.639232] Loading firmware: radeon/banks_k_2_smc.bin
[    3.647293] [drm] radeon: dpm initialized
[    3.654769] radeon 0000:01:00.0: WB enabled
[    3.654771] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00
[    3.654773] radeon 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04
[    3.654774] radeon 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08
[    3.654775] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c
[    3.654776] radeon 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10
[    3.654778] radeon 0000:01:00.0: radeon: MSI limited to 32-bit
[    3.654822] radeon 0000:01:00.0: radeon: using MSI.
[    3.654841] [drm] radeon: irq initialized.
[    3.956578] [drm] Initialized radeon 2.50.0 20080528 for 0000:01:00.0 on minor 1
[   13.787581] radeon 0000:01:00.0: WB enabled
[   13.787582] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00
[   13.787584] radeon 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04
[   13.787585] radeon 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08
[   13.787586] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c
[   13.787587] radeon 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10
[   13.788193] debugfs: File 'radeon_ring_gfx' in directory '1' already present!
[   13.788196] debugfs: File 'radeon_ring_cp1' in directory '1' already present!
[   13.788197] debugfs: File 'radeon_ring_cp2' in directory '1' already present!
[   13.788198] debugfs: File 'radeon_ring_dma1' in directory '1' already present!
[   13.788199] debugfs: File 'radeon_ring_dma2' in directory '1' already present!
[~] $
lspci -nnk

Code: Select all

01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520/610 Mobile] [1002:6665] (rev c3)
        Subsystem: Dell Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520/610 Mobile] [1028:08c9]
        Kernel driver in use: radeon
        Kernel modules: radeon
xrandr can find only intelgpu

Code: Select all

[~] $ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x45 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 0 name:Intel
[~] $
perhaps I need to recompile xorg-server xorg-drivers?

before that do I need to replace "AMDGPU radeonsi" to Radeon ATI or AMD??
Last edited by 4nn13 on Sun Oct 15, 2023 12:12 pm, edited 2 times in total.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sun Oct 15, 2023 12:04 pm

Ok does it work now?
Also do this

Code: Select all

echo "blacklist amdgpu" > /etc/modprobe.d/amdgpu.conf

:)
Top
4nn13
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Fri Sep 01, 2023 6:15 am

  • Quote

Post by 4nn13 » Sun Oct 15, 2023 12:08 pm

alamahant wrote:Ok does it work now?
xrandr can find only INTELGPU yet, I guess xorg-server xorg-driver mesa..... those packages need to recompile with new video card

I'm confused about the ??GPU now

but before recompile them
should I change the "amdgpu radeonsi" to ATI, radeon or amdgpu?

Code: Select all

[~] $ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x45 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 0 name:Intel
[~] $
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56076
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 15, 2023 12:12 pm

4nn13,

Do you have two independent graphics systems or just one and a half?

Either GPU can render into the pixel buffer but only the Intel GPU is connected to the display.
That leaves the Radeon chipset in the role of a helper.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

34 posts
  • 1
  • 2
  • Next

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy