amdgpu-pro-install在Ubuntu GNOME 16.04上使用R9 285和RX 480

我在为我的Ubuntu Gnome 16.04系统安装AMD GPU PRO驱动程序时遇到问题。 安装和重启后屏幕变黑。 GUI模式下的图像不完整,大多为黑色,登录屏幕的闪烁部分很小。 鼠标光标可见。

我可以访问tty并卸载它。

我从AMD官方网站链接下载了驱动程序。 他们说它与我的显卡兼容: AMD Radeon™R9 285显卡 。 我按照网站上提供的安装指南进行操作。 安装完成没有问题,重新启动后,屏幕为黑色。

运行uname -r给出:

 4.4.0-28-generic 

运行dpkg -l amdgpu-pro给出:

 dpkg-query: no packages found matching amdgpu-pro 

运行./amdgpu-pro-install给出:

 Reading package lists... Done Building dependency tree ........................... Reading state information... Done The following packages were automatically installed and are no longer required: gcc-5-base:i386 libdrm-radeon1:i386 libdrm2:i386 libelf1:i386 libssl1.0.0:i386 libstdc++6:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxshmfence1:i386 libxxf86vm1:i386 linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-image-4.4.0-21-generic linux-image-extra-4.4.0-21-generic Use 'sudo apt autoremove' to remove them. ...................... Reading package lists... Done deb file:/var/opt/amdgpu-pro/ ./ Reading package lists... Done W: The repository 'file:/var/opt/amdgpu-pro ./ Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-image-4.4.0-21-generic linux-image-extra-4.4.0-21-generic Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: amdgpu-pro-clinfo amdgpu-pro-computing amdgpu-pro-core amdgpu-pro-firmware amdgpu-pro-graphics amdgpu-pro-libopencl-dev amdgpu-pro-libopencl-dev:i386 amdgpu-pro-libopencl1 amdgpu-pro-libopencl1:i386 amdgpu-pro-opencl-icd amdgpu-pro-opencl-icd:i386 amdgpu-pro-vulkan-driver amdgpu-pro-vulkan-driver:i386 libdrm-amdgpu-pro-amdgpu1 libdrm-amdgpu-pro-amdgpu1:i386 libdrm2-amdgpu-pro libdrm2-amdgpu-pro:i386 libegl1-amdgpu-pro libegl1-amdgpu-pro:i386 libgbm1-amdgpu-pro:i386 libgbm1-amdgpu-pro libgl1-amdgpu-pro-dev libgl1-amdgpu-pro-dev:i386 libgl1-amdgpu-pro-dri libgl1-amdgpu-pro-dri:i386 libgl1-amdgpu-pro-glx:i386 libgl1-amdgpu-pro-glx libgles2-amdgpu-pro libgles2-amdgpu-pro:i386 libvdpau-amdgpu-pro libvdpau-amdgpu-pro:i386 xserver-xorg-video-amdgpu-pro The following NEW packages will be installed amdgpu-pro amdgpu-pro-clinfo amdgpu-pro-computing amdgpu-pro-core amdgpu-pro-dkms amdgpu-pro-firmware amdgpu-pro-graphics amdgpu-pro-lib32:i386 amdgpu-pro-libopencl-dev amdgpu-pro-libopencl-dev:i386 amdgpu-pro-libopencl1 amdgpu-pro-libopencl1:i386 amdgpu-pro-opencl-icd amdgpu-pro-opencl-icd:i386 amdgpu-pro-vulkan-driver amdgpu-pro-vulkan-driver:i386 libdrm-amdgpu-pro-amdgpu1 libdrm-amdgpu-pro-amdgpu1:i386 libdrm2-amdgpu-pro libdrm2-amdgpu-pro:i386 libegl1-amdgpu-pro libegl1-amdgpu-pro:i386 libgbm1-amdgpu-pro:i386 libgbm1-amdgpu-pro libgl1-amdgpu-pro-dev libgl1-amdgpu-pro-dev:i386 libgl1-amdgpu-pro-dri libgl1-amdgpu-pro-dri:i386 libgl1-amdgpu-pro-glx:i386 libgl1-amdgpu-pro-glx libgles2-amdgpu-pro libgles2-amdgpu-pro:i386 libvdpau-amdgpu-pro libvdpau-amdgpu-pro:i386 xserver-xorg-video-amdgpu-pro 0 to upgrade, 35 to newly install, 0 to remove and 0 not to upgrade. Need to get 0 B/84.0 MB of archives. After this operation, 400 MB of additional disk space will be used. 

问题:如何继续,我应该在哪里寻找错误的依赖关系或阻止驱动程序正常运行的东西,如何使其工作?

到目前为止,我试过这个:

  • 我已经使用HDMI和DisplayPort进行了测试,两者都给出了相同的结果。

  • 尝试使用sudo dpkg --add-architecture i386sudo apt -get update

dmesg输出:(我在dmesg日志中包含了可能有助于识别问题的片段。)

 amdgpu: module verification failed: signature and/or required key missing - tainting kernel [drm] amdgpu kernel modesetting enabled. AMD IOMMUv2 driver by Joerg Roedel  AMD IOMMUv2 functionality not available on this system fb: switching to amdgpudrmfb from VESA VGA amdgpu 0000:01:00.0: Invalid ROM contents ATOM BIOS: C76601 amdgpu 0000:01:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used) amdgpu 0000:01:00.0: GTT: 2048M 0x0000000080000000 - 0x00000000FFFFFFFF amdgpu 0000:01:00.0: amdgpu: using MSI. [drm] amdgpu: irq initialized. Can't find requested voltage id in vdd_dep_on_sclk table! amdgpu: powerplay initialized amdgpu 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000008, cpu addr 0xffff880425497008 [drm] [FeatureOverride_overriden feature] Overridden FEATURE_ENABLE_GPU_SCALING is enabled now fbcon: amdgpudrmfb (fb0) is primary device amdgpu 0000:01:00.0: fb0: amdgpudrmfb frame buffer device [drm] Initialized amdgpu 3.2.0 20150101 for 0000:01:00.0 on minor 0 

引自http://www.phoronix.com/scan.php?page=article&item=amd-gpu-pro&num=1

起初我正在尝试使用其打包的Xenial内核的Ubuntu 16.04每日系统。 但是,即使这个打包的AMDGPU二进制驱动程序使用DKMS,也会破坏与Linux 4.4的内核驱动程序代码的兼容性。 由于Linux 4.4的DRM内核接口发生了一些变化,因此构建DKMS模块失败 。 正如Bridgman在论坛中所指出的那样,这应该由AMD 解决 ,但就目前而言, 简单的解决方法就是在Ubuntu 16.04盒子上安装Linux 4.2

我没有尝试轻松修复,但是我在当天早些时候发现了一个难点,它对我没有任何问题。

但是,如果您尝试此操作,我建议您在尝试之前备份系统。

对于Ubuntu GNOME上的AMDGPU-PRO的问题是COGL无法正确编译。

有一个补丁文件:

由Ashley Sommer为AMDGPU-PRO驱动程序修复COGL。 https://gist.github.com/ashleysommer/25118d366bf8c1608f3b1a64bc52d4e5

  --- a/cogl/driver/gl/gl/cogl-driver-gl.c +++ b/cogl/driver/gl/gl/cogl-driver-gl.c @@ -403,9 +403,13 @@ &ctx->glsl_minor); } - if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 2)) - /* We want to use version 120 if it is available so that the - * gl_PointCoord can be used. */ + if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 5)) + ctx->glsl_version_to_use = 150; + else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 4)) + ctx->glsl_version_to_use = 140; + else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 3)) + ctx->glsl_version_to_use = 130; + else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 2)) ctx->glsl_version_to_use = 120; else ctx->glsl_version_to_use = 110; 

用户illwieckz有一个关于如何在这里应用修复程序的指南:

https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/amd-linux/881527-amdgpu-pro-16-30-released-with-rx-480-support/page5

要做的事:

您必须重建libcogl20包。 由于我无法成功重建cogl包,我只是替换了libcogl.so二进制文件本身。

  sudo apt-get build-dep cogl 

如果你得到: E: Unable to find a source package for cogl

  sudo gedit /etc/apt/sources.list 

并在文件的末尾添加:

  # COGL deb-src ftp://ftp.de.debian.org/debian/ stable main contrib 

下一个:

  sudo apt-get update && sudo apt-get build-dep cogl 

安装构建cogl所需的几个包:

  sudo apt-get install devscripts libcogl-gst-dev 

然后继续:


  The following commands I executed from the home directory, because of permission errors and `command is not found` errors I was getting. 

  apt-get source cogl cd cogl-1.22.0 wget -O /tmp/cogl.patch https://gist.githubusercontent.com/ashleysommer/25118d366bf8c1608f3b1a64bc52d4e5/raw/e35e535e7ea9684538a63fe6ea0eb2709b1813f1/cogl_driver_gl_gl_cogl-driver-gl.c patch -p1 < /tmp/cogl.patch dpkg-source --commit debuild -us -uc -j$(nproc) 

如果构建成功结束,则只需使用gdebidpkg安装生成的libcogl20 deb文件(在父目录中):

  sudo dpkg -i libcogl20_1.22.0-2_amd64.deb 

如果它失败了,你觉得它失败了,还有另外一个选择,你可以像我一样。

因为在我结束时,构建在一些不必要的部分失败了,但修补后的lib构建得很好,我只是手工替换了二进制文件:

码:

  sudo cp -a debian/tmp/usr/lib/x86_64-linux-gnu/libcogl.so.20.4.1 /usr/lib/x86_64-linux-gnu/libcogl.so.20.4.1 

桌面冻结了几秒钟。

由于我覆盖了来自包的文件,因此我将包标记为“保持”以确保将来的更新不会覆盖它,如果您成功构建了包,也是一个好主意,出于同样的原因。

码:

sudo apt-mark hold libcogl20

如果你想要还原脏东西,你只需要做:

码:

  sudo apt-mark unhold libcogl20 sudo apt-get install --reinstall libcogl20 

Pro-tip,您可以使用debsums工具(来自debsums包)来检查您是从包中运行libcogl.so还是像我一样快速修补它:

码:

  debsums -s libcogl20 debsums: changed file /usr/lib/x86_64-linux-gnu/libcogl.so.20.4.1 (from libcogl20:amd64 package) 

如果您成功构建了软件包并以dpkg方式安装它,则debsums不会抱怨。

amdgpu-pro instalation的最后一部分看起来像这样


 Setting up amdgpu-pro (16.30.3-315407) ... Setting up amdgpu-pro-dkms (16.30.3-315407) ... Loading new amdgpu-pro-16.30.3-315407 DKMS files... First Installation: checking all kernels... Building for 4.4.0-36-generic and 4.8.0-rc5 Building for architecture x86_64 Building initial module for 4.4.0-36-generic Done. amdgpu: Running module version sanity check. - Original module - Installation - Installing to /lib/modules/4.4.0-36-generic/updates/dkms/ depmod.... DKMS: install completed. Building initial module for 4.8.0-rc5 ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-pro-dkms.0.crash' Error! Bad return status for module build on kernel: 4.8.0-rc5 (x86_64) Consult /var/lib/dkms/amdgpu-pro/16.30.3-315407/build/make.log for more information. update-initramfs: deferring update (trigger activated) Setting up amdgpu-pro-lib32:i386 (16.30.3-315407) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for initramfs-tools (0.122ubuntu8.1) ... update-initramfs: Generating /boot/initrd.img-4.8.0-rc5 Warning: Not updating LILO; /etc/lilo.conf not found! 

更新10-9-2016 :使用RX 480。

在此处输入图像描述

使用4.4.0-36-generic内核安装成功,

但内核4.8.0-rc5的模块构建失败。

确保你有: sudo apt-mark hold libcogl20

此命令阻止gnome package updater用更新的版本替换已编译的libgogl20

它还会阻止安装其他软件包,因为某些软件包依赖于更新版本的cogl ,依此类推。

我们只需要等待这个问题的正式修复,直到那时amdgpu-pro驱动程序在Ubuntu Gnome 16.04上运行的好方法。