在具有R9 285和RX 480的Ubuntu GNOME 16.04上进行amdgpu-pro-install


8

我在AMD GPU PRO为Ubuntu Gnome 16.04系统安装驱动程序时遇到问题。安装并重新启动后,屏幕将变黑。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 i386和尝试过sudo 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 <jroedel@suse.de>
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

2
考虑到您从中下载驱动程序的链接确实表明该驱动程序是beta版,因此完全有可能这实际上是驱动程序错误,如果您尝试向AMD报告问题,包括完整的dmesg输出和/ var的内容, /log/Xorg.0.log文件?他们可能比这里的任何人都处于更好的位置,可以帮助您解决实验驱动程序代码方面的问题。
MttJocy

我在全新安装的Ubuntu 16.04(未使用Gnome)上遇到了依赖项问题。该问题显然与i386软件包有关,但是我不确定如何解决它。幸运的是,您的问题使我sudo dpkg --add-architecture i386明白了这一点。谢谢!
thinkmassive

Answers:


4

引用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的COGL for AMDGPU-PRO驱动程序。 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)

如果为您构建成功结束,你只需要安装生成libcogl20的deb文件(父目录)用gdebidpkg

 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

专业提示,您可以使用debsums工具(来自debsums软件包)来检查您是从软件包中运行libcogl.so还是从像我这样经过快速修补的软件包中运行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安装的最后一部分看起来像这样


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


1
就像魅力一样,谢谢。请注意,根据您的情况,您可能需要先安装更多软件包。系统会在构建过程中告诉您哪个。如果是这样,您只需要在此后再次开始构建过程即可。另外,除了默认的可用Ubuntu存储库(例如您的debian)之外,不需要添加其他存储库,也不建议添加。您可能没有apt-get update在build-deb步骤之前执行过一个操作,或者没有启用/取消注释sources.list中已经可用的deb-src存储库。首先检查,然后apt-get update再次检查。
牧草
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.