amdgpu-pro 16.60: building kernel module (amdgpu-pro-dkms) fails on openSUSE Leap 42.2

Discussion created by krjdev on Feb 22, 2017
Latest reply on Nov 20, 2017 by matszpk

When i install the latest version of the amdgpu-pro driver, i get a black screen after reboot because the build of the kernel module fails.


Summary of the error in the logfile:

/var/lib/dkms/amdgpu-pro/16.60-379184/build/ttm/ttm_bo_vm.c: In function ‘ttm_bo_vm_fault’:

/var/lib/dkms/amdgpu-pro/16.60-379184/build/ttm/ttm_bo_vm.c:251:6: error: incompatible type for argument 3 of ‘vm_insert_mixed’



In file included from /usr/src/linux-4.4.46-11/include/drm/drm_vma_manager.h:28:0,

                 from /var/lib/dkms/amdgpu-pro/16.60-379184/build/include/drm/ttm/ttm_bo_api.h:35,

                 from /var/lib/dkms/amdgpu-pro/16.60-379184/build/include/drm/ttm/ttm_bo_driver.h:33,

                 from /var/lib/dkms/amdgpu-pro/16.60-379184/build/ttm/ttm_bo_vm.c:35:

/usr/src/linux-4.4.46-11/include/linux/mm.h:2157:5: note: expected ‘pfn_t’ but argument is of type ‘long unsigned int’

int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,


/usr/src/linux-4.4.46-11/scripts/ recipe for target '/var/lib/dkms/amdgpu-pro/16.60-379184/build/ttm/ttm_bo_vm.o' failed

make[4]: *** [/var/lib/dkms/amdgpu-pro/16.60-379184/build/ttm/ttm_bo_vm.o] Error 1

make[4]: *** Waiting for unfinished jobs....

  CC [M]  /var/lib/dkms/amdgpu-pro/16.60-379184/build/amd/amdgpu/amdgpu_kms.o

/usr/src/linux-4.4.46-11/scripts/ recipe for target '/var/lib/dkms/amdgpu-pro/16.60-379184/build/ttm' failed

See the complete logfile (make.log) for details.



My Workaround (quick and dirty ):


Attention: This workaround modifys the content (Makefile in the rpm package amdgpu-pro-dkms) of the driver package. NO WARRANTY!


Required utils:
- rpmrebuild

- patch



  • Extract driver package:
$ tar -Jxvf amdgpu-pro-16.60-379184.tar.xz


  • Change to the directory where the rpm package amdgpu-pro-dkms is:
$ cd amdgpu-pro-16.60-379184/RPMS/noarch


  • Execute rpmrebuild with the following:
$ rpmrebuild -ep amdgpu-pro-dkms-16.60-379184.noarch.rpm


This opens vim. Attention: Do not close vim yet!


  • Open a new shell window and change to the directory where the contents of the rpm file are:
$ cd ~/.tmp/rpmrebuild.4738/work/root


  • Apply the patch:
$ patch -p1 < path/to/patch.diff


  • Close the shell window


  • Change to the window where vim is still open and quit vim with :wq


  • rpmrebuild displays the message "Do you want to continue ? (y/N)". Type yes.


  • Now replace the original rpm file with the modified (Found in ~/rpmbuild/RPMS/noarch).


  • Install the driver (Execute amdgpu-pro-install)


This works with Kernel version 4.4.27-2-default.

With version 4.4.46-11-default and above, i get a black screen after reboot. It is impossible to switch to the console with [CTRL]+[ALT]+[F1 to F6]. Only ssh works.












Edited by krjdev: - Corrected step "Apply the patch" (wrong usage of the patch command)