如何在 Unbuntu-22 中安装 amdgpu-dkms?

如何在 Unbuntu-22 中安装 amdgpu-dkms?

当使用看似“好”的amdgpu-install命令进行安装时,

# amdgpu-install version
# amdgpu-install_22.20.50200-1_all.deb
# cut date: 2023-9-13
# today: 2023-99-20

# allegedly good command 1
amdgpu-install --usecase=graphics

# allegedly good command 2
amdgpu-install --usecase=graphics --vulkan=amdvlk --opencl=rocr

我在构建或安装时遇到故障amdgpu-dkms。通过构建/安装时amdgpu-install,我从 makefile 日志中获取了更多信息,但apt-get install amdgpu-dkms也产生了错误:

make: Entering directory '/usr/src/linux-headers-6.2.0-33-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  You are using:           gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
/var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/Makefile:16: *** dma_resv->seq is missing., exit....  Stop.
make: *** [Makefile:2026: /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.2.0-33-generic'

# KEY LINE
dma_resv->seq is missing., exit....  Stop.

我猜dma_resv是缺少了。我接下来尝试通过 apt-get 安装它:

apt-get install amdgpu-dkms

这也失败了。

有谁amdgpu-dkms在Ubuntu-22上成功运行过吗?

更新

我正在继续排除故障。安装普通版本dkms无法提供 AMD 所需的功能。相反,AMD 附带了其自己的损坏的 dkms automake 包:

/var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/source/amd/dkms

并且运行configure会产生更深的错误:

apt-get install linux-headers-realtime
...
# in amd/.../dkms
sudo ./configure

# I was able to move forward on this by installing the linux headers above
# but only 2 lines forward. The UTS_RELEASE definition is still missing. 
# As far as I can tell, my kernel is *not* the realtime kernel, so
# I probably need to install the realtime kernel. 

checking kernel source directory... /usr/src/linux-realtime-headers-5.15.0-1032
checking kernel build directory... /usr/src/linux-realtime-headers-5.15.0-1032
checking kernel source version... Not found
configure: error: *** Cannot find UTS_RELEASE definition.

-- 我认为无论是谁开发了针对 ubuntu 内核优化的软件包realtime,该软件包在专业版中都可用。我现在没有这个,但我认为它可能是新版本上安装 AMD GPU 的先决2023-9-13条件amdgpu-install...deb

相关内容