您尚未登录。

#1 2023-03-11 14:51:58

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

大佬们好,纯萌新一枚,因为我的显卡(R9 290)的特殊架构 跟着普通的amdgpu安装教程发现还是只能进桌面,打游戏打不了。以及api只能用opengl。后来才发现原来是Sea Islands架构的显卡需要手动加载驱动=|
https://wiki.archlinuxcn.org/wiki/AMDGP … 个我完成了“编译支持 amdgpu 驱动的内核“之前所有的内容 我也mkinitcpio了,结果是重启黑屏,自己又把上面的设置都撤销了系统才加载回来
到这里蒙了,我该如何编译内核并更改配置?咋查也查不到,我是菜鸡。。。
等各位大佬解答。。谢谢

离线

#2 2023-03-11 15:30:37

matrikslee
会员
注册时间: 2017-04-21
帖子: 442
个人网站

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

发一下journalctl -b 1,再说明一下你的硬件配置,例如是笔记本还是台式机,是什么cpu,有没有集成显卡等
另外现在的内核可以满足要求了,不再需要自己编译了,只要正确配置即可

离线

#3 2023-03-11 21:49:42

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

matrikslee 说:

发一下journalctl -b 1,再说明一下你的硬件配置,例如是笔记本还是台式机,是什么cpu,有没有集成显卡等
另外现在的内核可以满足要求了,不再需要自己编译了,只要正确配置即可

Mar 11 14:03:07 station kernel: Linux version 6.2.2-arch2-1 (linux@archlinux) (gcc (GCC) 12.2.1 20230201, GNU ld>
Mar 11 14:03:07 station kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=64425579-31bc-4a71-b718-50c34e>
Mar 11 14:03:07 station kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Mar 11 14:03:07 station kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Mar 11 14:03:07 station kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Mar 11 14:03:07 station kernel: x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
Mar 11 14:03:07 station kernel: x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'compacte>
Mar 11 14:03:07 station kernel: signal: max sigframe size: 1776
Mar 11 14:03:07 station kernel: BIOS-provided physical RAM map:
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x0000000000100000-0x0000000009e01fff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x0000000009e02000-0x0000000009ffffff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x000000000a000000-0x000000000a1fffff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x000000000a200000-0x000000000a20bfff] ACPI NVS
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x000000000a20c000-0x000000000affffff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x000000000b000000-0x000000000b01ffff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x000000000b020000-0x00000000db596fff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000db597000-0x00000000db6e2fff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000db6e3000-0x00000000db870fff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000db871000-0x00000000dbcb4fff] ACPI NVS
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000dbcb5000-0x00000000dcafdfff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000dcafe000-0x00000000dcb8efff] type 20
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000dcb8f000-0x00000000deffffff] usable
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000df000000-0x00000000dfffffff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x00000000fd000000-0x00000000ffffffff] reserved
Mar 11 14:03:07 station kernel: BIOS-e820: [mem 0x0000000100000000-0x000000041f37ffff] usable
Mar 11 14:03:07 station kernel: NX (Execute Disable) protection: active
Mar 11 14:03:07 station kernel: efi: EFI v2.70 by American Megatrends
Mar 11 14:03:07 station kernel: efi: TPMFinalLog=0xdbc69000 ACPI 2.0=0xdbc02000 ACPI=0xdbc02000 SMBIOS=0xdc9e800>
Mar 11 14:03:07 station kernel: efi: Remove mem548: MMIO range=[0xf8000000-0xfbffffff] (64MB) from e820 map
这个journalctl很长 大佬我截取了前30行
cpu是amd的3100 台式机 没有集成显卡的
我主要是想问如何正确配置内核“编译支持 amdgpu 驱动的内核
在构建或者编译内核的时候,需要在配置中设置 CONFIG_DRM_AMDGPU_SI=Y 和/或者 CONFIG_DRM_AMDGPU_CIK=Y。”这个问题
感谢大佬

离线

#4 2023-03-12 16:53:13

matrikslee
会员
注册时间: 2017-04-21
帖子: 442
个人网站

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

pigeon0415 说:

这个journalctl很长 大佬我截取了前30行

journalctl 的log前30行没啥关键信息,不过你不会弄完整文件pastebin就算了,可以看一下你电脑上

$ cat /proc/cmdline

的输出结果

pigeon0415 说:

我主要是想问如何正确配置内核

这个wiki上有说的,给内核加参数,radeon.si_support amdgpu.si_support radeon.cik_support amdgpu.cik_support这四个内核模块参数,根据实际需求分别设置0或者1

我查了一下互联网,发现gentoo的wiki上有一个显卡列表,R9 290这个显卡应该要用si_support=1,所以可以设置amdgpu.si_support=1, amdgpu.cik_support=0加入到你的内核启动参数

内核参数的设置方法参考wiki:https://wiki.archlinuxcn.org/wiki/%E5%8 … 2%E6%95%B0

在正确设置内核参数并成功启动后,那么amdgpu.si_support=1, amdgpu.cik_support=0这一串内容应该会出现在命令

$ cat /proc/cmdline

的输出中

离线

#5 2023-03-12 17:07:03

matrikslee
会员
注册时间: 2017-04-21
帖子: 442
个人网站

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

pigeon0415 说:

因为我的显卡(R9 290)的特殊架构 跟着普通的amdgpu安装教程发现还是只能进桌面,打游戏打不了。以及api只能用opengl。

另外,我怀疑问题不一定出在内核驱动模块,你也可以检查一下你的mesa 和 vulkan-radeon 驱动包是否正常安装,如果有计划要使用视频相关的显卡硬件加速功能(例如编码/解码h264之类)还要再安装libva-mesa-driver包和lib32-libva-mesa-driver包软件包来支持 VA-API,安装mesa-vdpau包和lib32-mesa-vdpau包软件包支持VDPAU。

检查驱动功能的命令:
1. opengl用glxinfo  命令检查,直接看输出中 OpenGL renderer string 开头的那一行,vulkan驱动用vulkaninfo命令检查,看
2. va-api用vainfo命令检查,看 vainfo: Driver version 开头的行, vdpau用vdpauinfo命令检查

离线

#6 2023-03-12 17:18:38

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

matrikslee 说:
pigeon0415 说:

因为我的显卡(R9 290)的特殊架构 跟着普通的amdgpu安装教程发现还是只能进桌面,打游戏打不了。以及api只能用opengl。

另外,我怀疑问题不一定出在内核驱动模块,你也可以检查一下你的mesa 和 vulkan-radeon 驱动包是否正常安装,如果有计划要使用视频相关的显卡硬件加速功能(例如编码/解码h264之类)还要再安装libva-mesa-driver包和lib32-libva-mesa-driver包软件包来支持 VA-API,安装mesa-vdpau包和lib32-mesa-vdpau包软件包支持VDPAU。

检查驱动功能的命令:
1. opengl用glxinfo  命令检查,直接看输出中 OpenGL renderer string 开头的那一行,vulkan驱动用vulkaninfo命令检查,看
2. va-api用vainfo命令检查,看 vainfo: Driver version 开头的行, vdpau用vdpauinfo命令检查

大佬,我的驱动模块正常了,不过vulkaninfo还是error,报错如下:
ERROR: [../mesa-22.3.6/src/amd/vulkan/radv_device.c:741] Code 0 : Device '/dev/dri/renderD128' is not using the AMDGPU kernel driver: Invalid argument (VK_ERROR_INCOMPATIBLE_DRIVER)
ERROR: [Loader Message] Code 0 : setup_loader_term_phys_devs:  Failed to detect any valid GPUs in the current config
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.240/vulkaninfo/vulkaninfo.h:237:vkEnumeratePhysicalDevices failed with ERROR_INITIALIZATION_FAILED

离线

#7 2023-03-12 17:20:21

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

matrikslee 说:
pigeon0415 说:

因为我的显卡(R9 290)的特殊架构 跟着普通的amdgpu安装教程发现还是只能进桌面,打游戏打不了。以及api只能用opengl。

另外,我怀疑问题不一定出在内核驱动模块,你也可以检查一下你的mesa 和 vulkan-radeon 驱动包是否正常安装,如果有计划要使用视频相关的显卡硬件加速功能(例如编码/解码h264之类)还要再安装libva-mesa-driver包和lib32-libva-mesa-driver包软件包来支持 VA-API,安装mesa-vdpau包和lib32-mesa-vdpau包软件包支持VDPAU。

检查驱动功能的命令:
1. opengl用glxinfo  命令检查,直接看输出中 OpenGL renderer string 开头的那一行,vulkan驱动用vulkaninfo命令检查,看
2. va-api用vainfo命令检查,看 vainfo: Driver version 开头的行, vdpau用vdpauinfo命令检查

上述所有的包我都安装了,大佬咋搞

离线

#8 2023-03-12 17:22:01

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

BOOT_IMAGE=/vmlinuz-linux root=UUID=64425579-31bc-4a71-b718-50c34ef5aca6 rw loglevel=3 quiet amdgpu.si_support=1 amdgpu.cik_support=0
这是内核参数的输出

离线

#9 2023-03-12 18:50:46

matrikslee
会员
注册时间: 2017-04-21
帖子: 442
个人网站

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

pigeon0415 说:

大佬,我的驱动模块正常了,不过vulkaninfo还是error,报错如下:
ERROR: [../mesa-22.3.6/src/amd/vulkan/radv_device.c:741] Code 0 : Device '/dev/dri/renderD128' is not using the AMDGPU kernel driver: Invalid argument (VK_ERROR_INCOMPATIBLE_DRIVER)
ERROR: [Loader Message] Code 0 : setup_loader_term_phys_devs:  Failed to detect any valid GPUs in the current config
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.240/vulkaninfo/vulkaninfo.h:237:vkEnumeratePhysicalDevices failed with ERROR_INITIALIZATION_FAILED

贴一下你的lspci -k 看看

离线

#10 2023-03-12 18:53:00

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

matrikslee 说:
pigeon0415 说:

大佬,我的驱动模块正常了,不过vulkaninfo还是error,报错如下:
ERROR: [../mesa-22.3.6/src/amd/vulkan/radv_device.c:741] Code 0 : Device '/dev/dri/renderD128' is not using the AMDGPU kernel driver: Invalid argument (VK_ERROR_INCOMPATIBLE_DRIVER)
ERROR: [Loader Message] Code 0 : setup_loader_term_phys_devs:  Failed to detect any valid GPUs in the current config
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.240/vulkaninfo/vulkaninfo.h:237:vkEnumeratePhysicalDevices failed with ERROR_INITIALIZATION_FAILED

贴一下你的lspci -k 看看

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Root Complex
        Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1450
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge
        Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1234
        Kernel driver in use: pcieport
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge
        Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1234
        Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge
        Subsystem: Advanced Micro Devices, Inc. [AMD] Device 1234
        Kernel driver in use: pcieport
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:05.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Kernel driver in use: pcieport
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Kernel driver in use: pcieport
00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
        Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
        Subsystem: Gigabyte Technology Co., Ltd Device 5001
        Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
        Subsystem: Gigabyte Technology Co., Ltd Device 5001
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 3
        Kernel driver in use: k10temp
        Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data Fabric: Device 18h; Function 7
01:00.0 Non-Volatile memory controller: MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202 (rev 01)
        Subsystem: MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202
        Kernel driver in use: nvme
        Kernel modules: nvme
02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 xHCI Compliant Host Controller (rev 01)
        Subsystem: ASMedia Technology Inc. Device 1142
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01)
        Subsystem: ASMedia Technology Inc. Device 1062
        Kernel driver in use: ahci
02:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge (rev 01)
        Subsystem: ASMedia Technology Inc. Device 0201
        Kernel driver in use: pcieport
03:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Subsystem: ASMedia Technology Inc. Device 3306
        Kernel driver in use: pcieport
03:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Subsystem: ASMedia Technology Inc. Device 3306
        Kernel driver in use: pcieport
03:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01)
        Subsystem: ASMedia Technology Inc. Device 3306
        Kernel driver in use: pcieport
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
        Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet
        Kernel driver in use: r8169
        Kernel modules: r8169
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390]
        Subsystem: PC Partner Limited / Sapphire Technology Device e285
        Kernel driver in use: radeon
        Kernel modules: radeon, amdgpu
07:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X]
        Subsystem: PC Partner Limited / Sapphire Technology Device aac8
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
08:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function
09:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP
09:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP
        Subsystem: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP
        Kernel driver in use: ccp
        Kernel modules: ccp
09:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
        Subsystem: Gigabyte Technology Co., Ltd Device 5007
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
09:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
        Subsystem: Gigabyte Technology Co., Ltd Device a182
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
0a:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
        Subsystem: Gigabyte Technology Co., Ltd Device b002
        Kernel driver in use: ahci
0b:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
        Subsystem: Gigabyte Technology Co., Ltd Device b002
        Kernel driver in use: ahci

离线

#11 2023-03-12 21:25:37

matrikslee
会员
注册时间: 2017-04-21
帖子: 442
个人网站

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390]
        Subsystem: PC Partner Limited / Sapphire Technology Device e285
        Kernel driver in use: radeon
        Kernel modules: radeon, amdgpu

你在用radeon内核驱动呀,你按wiki的说法把wiki驱动禁用掉然后将amdgpu放到initramfs启动序列里面去,应该就好了

离线

#12 2023-04-05 11:01:25

pigeon0415
会员
注册时间: 2023-03-11
帖子: 7

Re: 关于AMD Sea Islands的显卡编译支持 amdgpu 驱动的内核

已经可以用了 蛮不错的

离线

页脚