Ashark / archlinux-amdgpu-pro

Radeon Software for Linux (AMDGPU PRO) PKGBUILD generator for ArchLinux AUR
https://aur.archlinux.org/pkgbase/amdgpu-pro-installer/
119 stars 25 forks source link

WIP: update to 17.30 #52

Closed corngood closed 7 years ago

corngood commented 7 years ago

This is meant to work with linux 4.10 and xorg 1.19.

I had to compile my kernel with KALLSYMS_ALL y. Without it you will probably get an error like:

kernel: Error: fail to get symbol drm_gem_prime_dmabuf_ops
kernel: ------------[ cut here ]------------
kernel: kernel BUG at /tmp/nix-build-amdgpu-pro-17.30-4.9.47.drv-0/amdgpu-pro-17.30-465504/root/usr/src/amdgpu-pro-17.30-465504/amd/amdkcl/kcl_common.h:34!

check your booted kernel with:

$ gunzip -c /proc/config.gz | grep KALLSYMS_ALL
CONFIG_KALLSYMS_ALL=y
ranisalt commented 7 years ago

Both linux and linux-zen for Arch Linux are compiled with KALLSYMS_ALL unset :(

corngood commented 7 years ago

From https://packages.ubuntu.com/source/xenial/linux-hwe, it looks like they enable KALLSYMS_ALL in ubuntu 16.04.3.

As far as I can tell, the only other option (without major changes to the kernel module) would be to patch the kernel to make drm_gem_prime_dmabuf_ops public. Then you're trading a kernel config for a patch, which doesn't feel like an improvement.

I would suggest trying linux-lts (4.9) modified with KALLSYMS_ALL=y, and then try updating it to 4.10 if it doesn't work. I hit the drm_gem_prime_dmabuf_ops thing first on 4.9, and assumed it was incompatible, but it also happened on 4.10, and I never tried 4.9 again after fixing it.

Tuerai commented 7 years ago

I recompiled my kernel to have KALLSYMS_ALL=y, but I can't get all the dependencies to build this. Specifically, hsakmt-roct won't build for me.

Edit: Read the part about needing kernel 4.10. I will work on that.

qiu-x commented 7 years ago

I have a problem with hsakmt-roct too. I tried linux-lts and linux 4.10 and it's not compiling on both.

cyboerg42 commented 7 years ago

@Qiu3344 https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/issues/14

qiu-x commented 7 years ago

@cyborg00222 So how to fix it? Should I edit "CMakeList.txt"?

corngood commented 7 years ago

What's the dependency chain leading to hsakmt-roct?

qiu-x commented 7 years ago

"amdgpu-pro" requies "hsakmt-roct".

corngood commented 7 years ago

@Qiu3344 I don't see it in the .SRCINFO... are you sure it's not indirect? In any case, if you need to fudge dependencies, you should be able to do it at:

https://github.com/corngood/archlinux-amdgpu/blob/5a5490f960d324d5cf3830a0e81514040eaf4524/gen-PKGBUILD.py#L230

qiu-x commented 7 years ago

@corngood Thanks! This will probably fix the problem. Did you ever think about documenting the package?

corngood commented 7 years ago

@Qiu3344 Not seriously. I inherited it from someone else, and it got an overhaul in the last update from another contributor.

If anyone's interested in taking over maintainership, let me know.

qiu-x commented 7 years ago

@corngood How to apply changes that I made in gen-PKGBUILD.py?

corngood commented 7 years ago

@Qiu3344 Your best reference is the travis build script:

https://github.com/corngood/archlinux-amdgpu/blob/17.30/.travis.yml

At the top it lists the arch deps, then theres sudo pip install python-debian, and ./build.sh. That should be all you need to generate the PKGBUILD.

qiu-x commented 7 years ago

@corngood when I run build.sh I get an error that amdgpu-pro is i386 and should begin with lib32.

heavysink commented 7 years ago

Successfully built, installed and run without problem with my RX550 on Linux 4.13.6 and Xorg 1.19.5 with some modifications. Four main modifications:

  1. Ignore the DKMS module.
  2. Delete the libgbm.so* under /usr/lib from mesa-noglvnd. It is causing compatibility problem (undefined symbol) to the driver. I have made mesa-noglvnd-nogbm package on ArchlinuxCN repo.
  3. Remove glamor related extract_deb inside PKGBUILD and use glamor provided by xorg-server package. It is also causing undefined symbol problem.
  4. Add a 20-amdgpu.conf in /etc/X11/xorg.conf.d which include device and screen0 information.
brainpower commented 7 years ago

@Qiu3344 : the i386 / lib32 error is fixed by the update to the packages_map in commit 5d02f39 of PR #54 .

corngood commented 7 years ago

Thanks @brainpower. I'll close this one in favour of #54. Anyone who can, please test and comment on it.