如何在 Ubuntu 21.04 中安装 AMD-GPU-PRO 驱动程序?

twe*_*ann 8 graphics drivers amdgpu-pro 21.04

每次我执行

./amdgpu-pro-install --opencl=pal,legacy
Run Code Online (Sandbox Code Playgroud)

amdgpu-pro-21.10-1247438-ubuntu-20.04
Run Code Online (Sandbox Code Playgroud)

文件夹,它会尝试安装它,但随后会崩溃并出现错误:

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

我尝试过的事情:

  • 这个教程,但他们说“这个设置不适用于每个 Linux 内核,因此请自行承担风险”,然后他们没有指定他们使用的内核。
  • sudo dpkg --configure -a
  • 使用5.8.0-55-generic内核启动(我只拥有5.11.0-18-generic5.8.0-55-generic安装)

安装脚本的完整输出镜像

tweimann@lol:$ neofetch 
tweimann@lol 
OS: Ubuntu 21.04 x86_64 
Kernel: 5.11.0-18-generic 
Uptime: 21 mins 
Packages: 4019 (dpkg), 16 (flatpak), 32 (snap) 
Shell: bash 5.1.4 
Resolution: 2560x1440, 1920x1080, 1440x2560 
DE: GNOME 3.38.4 
WM: Mutter 
WM Theme: Adwaita 
Theme: Adwaita-dark [GTK2/3] 
Icons: Yaru [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i7-9700K (8) @ 4.900GHz 
GPU: Intel CoffeeLake-S GT2 [UHD Graphics 630] 
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590 
Memory: 6698MiB / 63219MiB
Run Code Online (Sandbox Code Playgroud)

请帮忙,谢谢。

小智 4

amd 发行说明:对于 Ubuntu 20.04.1,仅支持内核 5.4/5.6。不支持最新内核版本 5.8+。使用内核 5.8+ 的客户需要降级到 5.4/5.6 以获得适当的驱动程序支持。

看来你必须降级到较低的内核版本


小智 3

为我工作:

\n

如果您对系统上的较旧内核感到满意:

\n

添加旧内核的存储库,例如 Groovy Gorilla 的前存储库:

\n
deb http://de.archive.ubuntu.com/ubuntu/ groovy main restricted\ndeb http://de.archive.ubuntu.com/ubuntu/ groovy-updates main restricted\n
Run Code Online (Sandbox Code Playgroud)\n

安装的内核 5.8 + 模块 + 标头:

\n
apt install linux-image-5.8.0-53-generic linux-modules-extra-5.8.0-53-generic linux-headers-5.8.0-53-generic\n
Run Code Online (Sandbox Code Playgroud)\n

将 /etc/os-release 中的 VERSION_ID 更改回 20.04:

\n
root@localhost /e/apt# cat /etc/os-release\nNAME="Ubuntu"\nVERSION="21.04 (Hirsute Hippo)"\nID=ubuntu\nID_LIKE=debian\nPRETTY_NAME="Ubuntu 21.04"\nVERSION_ID="20.04"\nHOME_URL="https://www.ubuntu.com/"\nSUPPORT_URL="https://help.ubuntu.com/"\nBUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"\nPRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"\nVERSION_CODENAME=hirsute\nUBUNTU_CODENAME=hirsute\n
Run Code Online (Sandbox Code Playgroud)\n

更改为提取的驱动程序目录,例如在下载中:

\n
cd ~/Downloads/amdgpu-pro-20.50-1234664-ubuntu-20.04\n
Run Code Online (Sandbox Code Playgroud)\n

运行安装程序:

\n
./amdgpu-pro-install --opencl=rocr,legacy -y\n
Run Code Online (Sandbox Code Playgroud)\n

重启。

\n

然后,使用 xrandr 您应该能够看到 freesync 参数:

\n
[user@localhost]\xe2\x9e\x9c ~ xrandr --props | grep free\n freesync_capable: 0 \n freesync: 0 \n freesync_capable: 0 \n freesync: 0\n
Run Code Online (Sandbox Code Playgroud)\n

根据您的显示器连接(此处:DisplayPort-0),您可以将 freesync 更改为 1:

\n
[user@localhost]\xe2\x9e\x9c ~ xrandr --output DisplayPort-0 --set "freesync" 1\n[user@localhost]\xe2\x9e\x9c ~ xrandr --props | grep free\n freesync_capable: 0 \n freesync: 1\n freesync_capable: 0 \n freesync: 0\n
Run Code Online (Sandbox Code Playgroud)\n