AMD GPU-dkms 未在内核 5.8/5.8-xanmod 中构建

zea*_*n_7 6 kernel dkms drivers amdgpu 20.04

我最近购买了配备 Ryzen 5 4600H 和专用 NVIDIA gtx 1650Ti 的 ASUS TUF Gaming FA506IH。我不太喜欢玩游戏,所以我安装了 Ubuntu 20.04 并考虑在我需要之前不使用 Nvidia 驱动程序(因为与较新内核的兼容性问题),而只使用集成的 Radeon 显卡。但是,我注意到 5.4 内核不支持较新的 Radeon 显卡,因此我安装了主线 5.8 内核,在安装 amdgpu 驱动程序后,它似乎工作正常,但我收到 dkms 错误,说内核 5.8 不支持它. 我也试过 xanmod kernel 5.8,但还是同样的问题。这是 amdgpu 尝试在此内核上构建其包时收到的错误消息。

Setting up amdgpu-dkms (1:5.6.0.15-1098277) ...
Removing old amdgpu-5.6.0.15-1098277 DKMS files...

------------------------------
Deleting module version: 5.6.0.15-1098277
completely from the DKMS tree.
------------------------------
Done.
Loading new amdgpu-5.6.0.15-1098277 DKMS files...
Building for 5.8.16-xanmod1
Building for architecture x86_64
Building initial module for 5.8.16-xanmod1
ERROR (dkms apport): kernel package linux-headers-5.8.16-xanmod1 is not supported
Error! Bad return status for module build on kernel: 5.8.16-xanmod1 (x86_64)
Consult /var/lib/dkms/amdgpu/5.6.0.15-1098277/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (--configure):
 installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of amdgpu:
 amdgpu depends on amdgpu-dkms (= 1:5.6.0.15-1098277); however:
  Package amdgpu-dkms is not configured yet.

dpkg: error processing package amdgpu (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.

Errors were encountered while processing:
 amdgpu-dkms
 amdgpu
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

当我尝试在内核 5.8.*-generic 上安装 amdgpu 时,我遇到了同样的错误。

zea*_*n_7 6

在搜索有关此主题的更多信息时。我开始知道您不需要为较新的 AMD Renoir 显卡安装任何专有驱动程序即可在任何大于等于 5.7 的内核上运行,因为该支持已经开箱即用。所以我刚刚卸载了 amdgpu amdgpu-uninstall,现在一切正常。


正如@red_trumpet 在评论部分所建议的那样,您也可以使用命令安装没有 dkms 的驱动程序./amdgpu-install --no-dkms。您还可以使用./amdgpu-install --opencl=pal,legacy --no-dkms. 我已经对此进行了测试,并且已经使用了两个月了。

注意:这不适用于专业版驱动程序。