cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

krjdev
Adept II

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

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’

      pfn);

      ^

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/Makefile.build:259: 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   /var/lib/dkms/amdgpu-pro/16.60-379184/build/amd/amdgpu/amdgpu_kms.o

/usr/src/linux-4.4.46-11/scripts/Makefile.build:418: 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

Steps:

  • 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.

Edit:

Removed:

lsmod_4.4.27-2-default

messages_4.4.27-2-default

Xorg.0.log_4.4.27-2-default

lsmod_4.4.46-11-default

messages_4.4.46-11-default

Xorg.0.log_4.4.46-11-default

Edited by krjdev:

- Corrected step "Apply the patch" (wrong usage of the patch command)

20 Replies
krjdev
Adept II

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

For the black screen issue with Kernel version 4.4.46 and above, i have written a bug-report in openSUSE's bugzilla.

0 Kudos
krjdev
Adept II

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

I have solved (with help)) the issue. Maybe there is a bug or wrong configuration in the DKMS program, which build the kernel driver and subsequently executes dracut. There was no firmware in the initrd-image. Now i forced to rebuild the initrd-image with dracut. It works now!

0 Kudos
rassegan
Adept I

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

Hi krjdev​, i have the same problem as you. How do you fixed and how i rebuild the initrd-image with dracut. Thanks

0 Kudos
rassegan
Adept I

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

I forgot to mention my current kernel is 4.4.49-16 i had thinking upgrade from the openSUSE repositories to 4.10.1.1 but i saw in some forums the AMDGPU-Pro drivers just works until 4.9 kernel

0 Kudos
krjdev
Adept II

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

Hello

First of all, the amdgpu pro packages should be installed.

Then you can rebuild the initird-image with dracut.

For example:

$ dracut -force

The above command rebuild the initrd-image with the currently running kernel.

If you want to rebuild the initrd-image with a specific kernel version, just excecute the following.

For example:

$ dracut -force --kver 4.4.49-16-default

$ lsinitrd /boot/initrd-4.4.49-16-default | grep -e amdgpu -e amdkcl -e amdttm

If you see an output like the attachment lsinitrd_amdgpu, then it should work.

(amdgpu.ko, amdttm.ko and amdkcl.ko are the amdgpu-pro kernel modules -> They should also been included in the initrd-image.)

After that, you can reboot your PC.

A question to the moderators:

Is it possible, with this forum-software, to add a code widget with a scrollbar with the editor?

rassegan
Adept I

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

Ok, thx alot. I need some help , i'm following your steps but at moment to apply the patch its not working; the cursor its blinkin and never go to the prompt.

In my case i am doing this, tell me if i am wrong.

$ 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:
  1. $ cd ~/.tmp/rpmrebuild.4738/work/root 

  • Apply the patch:
  1. $ patch -p1  /home/username/Downloads/patch.diff 

Steps:

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

  • Change to the directory where the rpm package amdgpu-pro-dkms is:
  1. $ 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:
  1. $ cd ~/.tmp/rpmrebuild.4738/work/root 

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

  • Close the shell window
krjdev
Adept II

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

Hello,

Sorry, it was my fault.

I corrected the step "Apply the patch". (Missing argument of the patch command)

Here is the right command usage:

patch -p1 < ~/downloads/amdgpu/patch.diff

The successful output, after this command, should be the following message:

patching file usr/src/amdgpu-pro-16.60-379184/Makefile

rassegan
Adept I

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

Hi krjdev​ thanks alot, its working now and i am running with the amdgpu-pro driver. Just a couple of question do you made any tweak in your config ( amdgpu.conf file )?? and i have a pink V-Line in the left side. Do you know how i can fix it ??

0 Kudos
hohnny
Journeyman III

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

worked for me, thanks.

Which team needs to fix this? openSUSE, AMD, kernel?

0 Kudos