Re: [gentoo-user] need help with amdgpu driver
Klaus, [ 0.760009] amdgpu :0d:00.0: amdgpu: RAS: optional ras ta ucode is not available [ 0.767012] amdgpu :0d:00.0: amdgpu: RAP: optional rap ta ucode is not available [ 0.767016] amdgpu :0d:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available It seems I made a step forward and I will try to get get X11 up next. yep, that is normal. The firmware for encrypted display connection is not released yet. Cheers, Björn
Re: [gentoo-user] need help with amdgpu driver
On 27.01.23 16:05, Klaus Dittrich wrote: On 27.01.23 15:30, Julien Roy wrote: Klaus Dittrich writes: as I do not use a initrd or initramfs I am, as far as I know, forced to compile the driver amdgpu into the kernel, not as modules to be loaded. No, you can use modules even without an initrd. I looked at https://wiki.gentoo.org/wiki/Amdgpu#Unknown_firmware_blobs but I still do not know what name is relevant to the built-in-gpu of a AMD-7900X processor.(!?) Does this gpu really needs all these blobs of the list there? No, these blobs are given as examples. They vary per GPU models and in fact there are several hundred different blobs available: ls -l /lib/firmware/amdgpu | wc -l 479 So you have to figure out which ones you need. The easiest method is to let the kernel load them itself by having the driver built as a module, otherwise it may take several iterations of modifying the CONFIG_EXTRA_FIRMWARE value until you get it to work. Julien and Peter, now I (assume I) understand what you mean. The kernel needs the entries to CONFIG_EXTRA_FIRMWARE just for drivers to be compiled in and for modules just to reduce the seeking in /lib/firmware/amdgpu ? So when I set CONFIG_DRM_AMDGPU=m and then look at dmesg of the so compiled kernel it detects the type of hardware I have (here the type of the cpu-built-in gpui and tells me (via dmesg) which blobs are needed to satisfy the driver for the hardware it has detected. I will try that, moment please .. Julien and Peter, I got no errors or messages form dmesg saying that some blobs are missed. I got some console messsages written in an very big font- So I compiled the the kernel again with AMDGPU=y this time and now I got all the messages of the kernel boot in normal fonts (my screen is 3840x2160). dmesg: [0.666078] amdgpu :0d:00.0: amdgpu: Fetched VBIOS from VFCT [0.666079] amdgpu: ATOM BIOS: 102-RAPHAEL-008 [0.666084] [drm] VCN(0) decode is enabled in VM mode [0.666085] [drm] VCN(0) encode is enabled in VM mode [0.666087] amdgpu :0d:00.0: vgaarb: deactivate vga console [0.666089] amdgpu :0d:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported [0.666091] amdgpu :0d:00.0: amdgpu: PCIE atomic ops is not supported [0.666299] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit [0.666303] amdgpu :0d:00.0: amdgpu: VRAM: 512M 0x00F4 - 0x00F41FFF (512M used) [0.666305] amdgpu :0d:00.0: amdgpu: GART: 1024M 0x - 0x3FFF [0.666307] amdgpu :0d:00.0: amdgpu: AGP: 267419648M 0x00F8 - 0x [0.666311] [drm] Detected VRAM RAM=512M, BAR=512M [0.666312] [drm] RAM width 128bits DDR5 [0.666327] [drm] amdgpu: 512M of VRAM memory ready [0.666329] [drm] amdgpu: 31782M of GTT memory ready. [0.666525] [drm] GART: num cpu pages 262144, num gpu pages 262144 [0.39] [drm] PCIE GART of 1024M enabled (table at 0x00F41FC0). [0.666963] amdgpu :0d:00.0: amdgpu: PSP runtime database doesn't exist [0.666967] amdgpu :0d:00.0: amdgpu: PSP runtime database doesn't exist [0.667073] [drm] Loading DMUB firmware via PSP: version=0x05000500 [0.668329] [drm] use_doorbell being set to: [true] [0.668408] [drm] Found VCN firmware Version ENC: 1.24 DEC: 2 VEP: 0 Revision: 0 [0.668411] amdgpu :0d:00.0: amdgpu: Will use PSP to load VCN firmware [0.691438] [drm] reserve 0xa0 from 0xf41e00 for PSP TMR [0.760009] amdgpu :0d:00.0: amdgpu: RAS: optional ras ta ucode is not available [0.767012] amdgpu :0d:00.0: amdgpu: RAP: optional rap ta ucode is not available [0.767016] amdgpu :0d:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available [0.767276] amdgpu :0d:00.0: amdgpu: smu driver if version = 0x0004, smu fw if version = 0x0005, smu fw program = 0, smu fw version = 0x00544fcc (84.79.204) [0.768927] [drm] Display Core initialized with v3.2.207! [0.769472] [drm] DMUB hardware initialized: version=0x05000500 [0.815836] amdgpu :0d:00.0: adding component (ops 0x827288f0) [0.816440] device: 'i2c-0': device_add [0.816442] bus: 'i2c': add device i2c-0 [0.843548] device: 'i2c-1': device_add [0.843549] bus: 'i2c': add device i2c-1 [0.843778] device: 'i2c-2': device_add [0.843778] bus: 'i2c': add device i2c-2 [0.843809] device: 'i2c-3': device_add [0.843810] bus: 'i2c': add device i2c-3 [0.88] [drm] kiq ring mec 2 pipe 1 q 0 [0.846850] [drm] VCN decode and encode initialized successfully(under DPG Mode). [0.847968] kfd kfd: amdgpu: Allocated 3969056 bytes on gart [0.848003] amdgpu: sdma_bitmap: 3 [0.848271] amdgpu: Virtual CRAT table created for GPU [0.848480] amdgpu: Topology: Add dGPU node [0x164e:0x1002] [0.848482] kfd kfd: amdgpu: added device 1002:164e [0.848489] amdgpu
Re: [gentoo-user] need help with amdgpu driver
On 27.01.23 15:30, Julien Roy wrote: Klaus Dittrich writes: as I do not use a initrd or initramfs I am, as far as I know, forced to compile the driver amdgpu into the kernel, not as modules to be loaded. No, you can use modules even without an initrd. I looked at https://wiki.gentoo.org/wiki/Amdgpu#Unknown_firmware_blobs but I still do not know what name is relevant to the built-in-gpu of a AMD-7900X processor.(!?) Does this gpu really needs all these blobs of the list there? No, these blobs are given as examples. They vary per GPU models and in fact there are several hundred different blobs available: ls -l /lib/firmware/amdgpu | wc -l 479 So you have to figure out which ones you need. The easiest method is to let the kernel load them itself by having the driver built as a module, otherwise it may take several iterations of modifying the CONFIG_EXTRA_FIRMWARE value until you get it to work. Julien and Peter, now I (assume I) understand what you mean. The kernel needs the entries to CONFIG_EXTRA_FIRMWARE just for drivers to be compiled in and for modules just to reduce the seeking in /lib/firmware/amdgpu ? So when I set CONFIG_DRM_AMDGPU=m and then look at dmesg of the so compiled kernel it detects the type of hardware I have (here the type of the cpu-built-in gpui and tells me (via dmesg) which blobs are needed to satisfy the driver for the hardware it has detected. I will try that, moment please .. -- Regars Klaus
Re: [gentoo-user] need help with amdgpu driver
Klaus Dittrich writes: > as I do not use a initrd or initramfs I am, as far as I know, forced > to compile the driver amdgpu into the kernel, not as modules to be > loaded. No, you can use modules even without an initrd. > I looked at https://wiki.gentoo.org/wiki/Amdgpu#Unknown_firmware_blobs > but I still do not know what name is relevant to the built-in-gpu > of a AMD-7900X processor.(!?) > > Does this gpu really needs all these blobs of the list there? > No, these blobs are given as examples. They vary per GPU models and in fact there are several hundred different blobs available: ls -l /lib/firmware/amdgpu | wc -l 479 So you have to figure out which ones you need. The easiest method is to let the kernel load them itself by having the driver built as a module, otherwise it may take several iterations of modifying the CONFIG_EXTRA_FIRMWARE value until you get it to work. -- Regards, Julien signature.asc Description: PGP signature
Re: [gentoo-user] need help with amdgpu driver
Hi Klaus, CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam19h.bin amdgpu/psp_13_0_5_toc.bin" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" [...] What firmware blobs of linux-firmware has to be installed to support the gpu of a ryzen-7900X? CONFIG_EXTRA_FIRMWARE=? I do not use initrd nor initramfs and all neccessary drivers are not installed as modules but compiled into the kernel. like you, I also use amdgpu hardcompiled into the kernel. It seems to be safe to include _all_ blobs in /lib/firmware/amdgpu. Then you can boot that kernel and check which blobs are actually necessary just by grepping though dmesg. Then you can boil down CONFIG_EXTRA_FIRMWARE to that set. This worked with several different AMD GPUs, RX 7900 included, but I never tried an integrated GPU/APU. Cheers Björn
Re: [gentoo-user] need help with amdgpu driver
Hello Klaus, Klaus Dittrich writes: > > The error happens with and without "amdgpu/psp_13_0_5_ta.bin" in > CONFIG_EXTRA_FIRMWARE as I discoverd meanwqhile. Your issue is most likely that you are missing firmware in the CONFIG_EXTRA_FIRMWARE setting. In my case there at 10 firmware blobs that I need in the kernel. Have you read the AMDGPU page on the Gentoo Wiki? Particularly the part about incorporating firmware blobs in the kernel? https://wiki.gentoo.org/wiki/Amdgpu#Unknown_firmware_blobs What I suggest is you change the AMDGPU driver back to a module rather than built it, and reboot once. Check DMESG (as explain in the link above) and it will show you every firmware that is loaded during boot. What that information you can update your CONFIG_EXTRA_FIRMWARE parameter with the proper values and put the AMDGPU driver back to built-in. -- Regards, Julien signature.asc Description: PGP signature
Re: [gentoo-user] need help with amdgpu driver
On 27.01.23 12:17, Peter Böhm wrote: Hello Klaus, have you made your kernel again after changing EXTRA_FIRMWARE ? Maybe you want read this: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/ Manual_kernel_configuration#Driver_needs_Firmware Greetings, Peter Am Freitag, 27. Januar 2023, 11:08:58 CET schrieb Klaus Dittrich: I it possible that a that moment the kernel cannot get blobs because the ext4 filesystem is not mounted already? So does one have to use initrd to get the blobs loaded? What is the meaning of "failed with error -2"? Peter, thanks for your answer. Sure, the machine is fast so a recompilation of the kernel is no problem. The error happens with and without "amdgpu/psp_13_0_5_ta.bin" in CONFIG_EXTRA_FIRMWARE as I discoverd meanwqhile. -- Regards Klaus
Re: [gentoo-user] need help with amdgpu driver
Hello Klaus, have you made your kernel again after changing EXTRA_FIRMWARE ? Maybe you want read this: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/ Manual_kernel_configuration#Driver_needs_Firmware Greetings, Peter Am Freitag, 27. Januar 2023, 11:08:58 CET schrieb Klaus Dittrich: > I it possible that a that moment the kernel cannot get blobs > because the ext4 filesystem is not mounted already? > So does one have to use initrd to get the blobs loaded? > > What is the meaning of "failed with error -2"?
[gentoo-user] need help with amdgpu driver
I have a ryzen-7900X cpu but I cannot get the amdgpu driver up and running with my kernel 6.1.8 (uefi system) These are the errors dmesg shows: [0.668913] [drm] amdgpu: 512M of VRAM memory ready [0.668915] [drm] amdgpu: 31783M of GTT memory ready. [0.669819] amdgpu :0d:00.0: Direct firmware load for amdgpu/psp_13_0_5_ta.bin failed with error -2 [0.669823] amdgpu :0d:00.0: amdgpu: fail to initialize ta microcode [0.669828] [drm:amdgpu_device_init.cold] *ERROR* sw_init of IP block failed -2 [0.669831] amdgpu :0d:00.0: amdgpu: amdgpu_device_ip_init failed [0.669833] amdgpu :0d:00.0: amdgpu: Fatal error during GPU init [0.669834] amdgpu :0d:00.0: amdgpu: amdgpu: finishing device. [0.670042] amdgpu: probe of :0d:00.0 failed with error -2 [0.670046] amdgpu :0d:00.0: devm_attr_group_remove: removing group (ptrval) [0.670052] [drm] amdgpu: ttm finalized [0.907335] bus: 'pci': add driver pcie_mp2_amd [0.907411] bus: 'platform': add driver amd_pmc [1.007964] amd_hsmp: HSMP is not supported on Fam:19 model:61 [1.007967] amd_hsmp: Or Is HSMP disabled in BIOS ? [1.007968] bus: 'platform': add driver amd-pmf This is my .config # # Firmware loader # CONFIG_FW_LOADER=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam19h.bin amdgpu/psp_13_0_5_toc.bin" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set CONFIG_FW_LOADER_COMPRESS=y CONFIG_FW_LOADER_COMPRESS_XZ=y CONFIG_FW_LOADER_COMPRESS_ZSTD=y # CONFIG_FW_UPLOAD is not set # end of Firmware loader I do not even get a console because of amdgpu gets not loaded. But I can log into the system via ssh because the system is a copy of my well running mbr system. My questions are: What firmware blobs of linux-firmware has to be installed to support the gpu of a ryzen-7900X? CONFIG_EXTRA_FIRMWARE=? I do not use initrd nor initramfs and all neccessary drivers are not installed as modules but compiled into the kernel. I it possible that a that moment the kernel cannot get blobs because the ext4 filesystem is not mounted already? So does one have to use initrd to get the blobs loaded? What is the meaning of "failed with error -2"? -- regards Klaus