公司开发需要测试新的 AMD显卡,由于测试服务器上的显卡是英伟达的显卡所以换完后要安装相应的驱动。由于之前装机的同事装的ubuntu是18.04.5 恰巧18.04.5在amd官网上没有相匹配的驱动(这里由于开发之前在测试机上部署好了环境 就没有及时将系统降级 耽误了好久)
查看版本: lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
可能是版本不一致导致的中间的一些包装不了 换了个系统后再找相应的驱动包:https://www.amd.com/en/support/graphics/amd-radeon-5700-series/amd-radeon-rx-5700-series/amd-radeon-rx-5700-xt这是我的对应驱动包
安装:
我用的是 os x就用他的命令行scp过去后
解压
$ cd ~/Downloads
$ tar -Jxvf amdgpu-pro-YY.XX-NNNNNN.tar.xz
$ cd ~/Downloads/amdgpu-pro-YY.XX-NNNNNN
他里面会有amdgpu-install 的自动安装程序
执行./amdgpu-install 后观察安装过程有无报错
这样就差不多了 然后查看
出现红框内的参数就说明安装成功了
中间可能涉及到的辅助命令:
root@ubuntu18:~# dmesg | egrep "radeon|drm"
[ 2.091828] [drm] amdgpu kernel modesetting enabled.
[ 2.092435] [drm] amdgpu version: 5.6.0.20.20
[ 2.093056] [drm] OS DRM version: 4.15.0
[ 2.096776] fb: switching to amdgpudrmfb from EFI VGA
[ 2.097623] [drm] initializing kernel modesetting (NAVI10 0x1002:0x731F 0x1002:0x0B36 0xC1).
[ 2.097637] [drm] register mmio base: 0x9F200000
[ 2.097639] [drm] register mmio size: 524288
[ 2.116084] [drm] add ip block number 0 <nv_common>
[ 2.116086] [drm] add ip block number 1 <gmc_v10_0>
[ 2.116087] [drm] add ip block number 2 <navi10_ih>
[ 2.116088] [drm] add ip block number 3 <psp>
[ 2.116089] [drm] add ip block number 4 <smu>
[ 2.116091] [drm] add ip block number 5 <dm>
[ 2.116092] [drm] add ip block number 6 <gfx_v10_0>
[ 2.116093] [drm] add ip block number 7 <sdma_v5_0>
[ 2.116094] [drm] add ip block number 8 <vcn_v2_0>
[ 2.116095] [drm] add ip block number 9 <jpeg_v2_0>
[ 2.116174] [drm] VCN decode is enabled in VM mode
[ 2.116175] [drm] VCN encode is enabled in VM mode
[ 2.116177] [drm] JPEG decode is enabled in VM mode
[ 2.116195] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
[ 2.116211] [drm] Detected VRAM RAM=8176M, BAR=256M
[ 2.116212] [drm] RAM width 256bits GDDR6
[ 2.116332] [drm] amdgpu: 8176M of VRAM memory ready
[ 2.116335] [drm] amdgpu: 257874M of GTT memory ready.
[ 2.116338] [drm] GART: num cpu pages 131072, num gpu pages 131072
[ 2.116461] [drm] PCIE GART of 512M enabled (table at 0x0000008000300000).
[ 2.118042] [drm] Found VCN firmware Version ENC: 1.9 DEC: 5 VEP: 0 Revision: 0
[ 2.118048] [drm] PSP loading VCN firmware
[ 2.776381] [drm] reserve 0x900000 from 0x81fe400000 for PSP TMR
[ 3.039879] [drm] Display Core initialized with v3.2.81!
[ 3.103858] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.103861] [drm] Driver supports precise vblank timestamp query.
[ 3.105902] [drm] kiq ring mec 2 pipe 1 q 0
[ 3.117203] [drm] VCN decode and encode initialized successfully(under DPG Mode).
[ 3.118253] [drm] JPEG decode initialized successfully.
[ 3.121604] [drm] fb mappable at 0x804CA000
[ 3.121606] [drm] vram apper at 0x80000000
[ 3.121607] [drm] size 8294400
[ 3.121608] [drm] fb depth is 24
[ 3.121610] [drm] pitch is 7680
[ 3.121670] fbcon: amdgpudrmfb (fb0) is primary device
[ 3.124830] amdgpu 0000:44:00.0: fb0: amdgpudrmfb frame buffer device
[ 3.157040] [drm] Initialized amdgpu 3.37.0 20150101 for 0000:44:00.0 on minor 0
root@ubuntu18:~# lspci -nn |grep VGA
44:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73
1f] (rev c1)
apt install radeontop
root@ubuntu18:~# radeontop
amdgpu DRM driver is used, but amdgpu VRAM size reporting is not enabled
amdgpu DRM driver is used, but amdgpu VRAM usage reporting is not enabled
Failed to get VRAM usage, kernel likely too old
Unknown Radeon card. <= R500 won't work, new cards might.
Collecting data, please wait....
这就差不多了结束了 ,安装不成功首先要检查系统版本跟驱动版本的问题 要保持一致。
总结:
- 下载对应读驱动包
- 解压安装
- reboot(重点)
- lshw -C display
按照amd官网给的安装过程较好