8 Replies Latest reply on Aug 14, 2018 10:47 AM by gostal

    amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3

    t170925

      I followed the suggestions given in the thread: https://community.amd.com/message/2816979#comment-2816979 , and I followed the steps on: How To Install-Uninstall AMDGPU-PRO driver on a SUSE® Enterprise Linux System 

      (I updated the rpmbuild replacement value with the corresponding version number from AMD.)

      After applying the patch (and before) the build for the kernel fails with the following output:

       

      5/18) Installing: amdgpu-pro-dkms-17.30-465504.noarch ..........................................................................................................................................................[done]
      Additional rpm output:
      Loading new amdgpu-pro-17.30-465504 DKMS files...
      Building for 4.4.87-25-default
      Building initial module for 4.4.87-25-default
      Error! Bad return status for module build on kernel: 4.4.87-25-default (x86_64)
      Consult /var/lib/dkms/amdgpu-pro/17.30-465504/build/make.log for more information.
      warning: %post(amdgpu-pro-dkms-0:17.30-465504.noarch) scriptlet failed, exit status 10

      Make log file output: https://paste.opensuse.org/78197197

      I removed the DRM kernel package already.

       

      Any suggestions are welcome.

        • Re: amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3
          t170925

          In case it may help debugging output of

           

          /sbin/lspci -nnk |grep -A3 VGA

          00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics] [1002:1313]
            Subsystem: ASUSTeK Computer Inc. Device [1043:85cb]
            Kernel driver in use: radeon
            Kernel modules: radeon
            • Re: amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3
              cajus

              I also had this problem and I modified the recipe from https://community.amd.com/message/2816979#comment-2816979 until I was able to compile and load the kernel modules.

              My modifications are really quick and dirty, the modified RPM will not work on other Linux disributions or other versions than the amdgpu-pro 17.30

              I wrote a small script, that does the modifications.

              The script expects the amdgpu-pro 17.30 package extracted at ~/AMDGPU-PRO.

              Download the script and the patch file, e.g. to ~/Downloads. Extract the patch file (the zip archive seems to be created automatically, when attaching a file!?)

              cd ~/Downloads

              ./rebuild_dkms.sh

              This should create a modified amdgpu-pro-dkms-17.30-465504.noarch.rpm in ~/Downloads

              Copy the file to its original location at ~/AMDGPU-PRO/amdgpu-pro-17.30-465504/RPMS/noarch

              and install the driver with amdgpu-pro-install

              This worked for me with the latest kernel linux-4.4.87-25

               

              Some notes about the amdgpu-pro 17.30 on openSUSE-LEAP 42.3:

              The drivers for video-accelleration (mesa-amdgpu-pro-vdpau-drivers-17.0.1-465504_x86_64.rpm) cannot be installed, because the dependency to mesa-filesystem cannot be fulfilled. I did not find any matching package with the software-search on openSUSE. Therefore you will still have issues (like with the radeon driver), when watching videos. Any help with this will be appreciated!

              VMware Workstation 14 will not run with the amdgpu-pro driver and "Accellerate 3D" activated for a virtual machine (which was the main reason, why I tried the proprietary AMD driver).

              VMware will stick at "Waiting for connection" and only a reboot of the host will make VMware Workstation accessible again. It seems to work if you uncheck "Accellerate 3D" for all VMs, which is the same I have to do with the radeon driver. The radeon driver will crash my host, when I enable "Accellerate 3D" and use a function in my VM that uses 3D.

              I use a "VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Oland XT [Radeon HD 8670 / R7 250/350]", which seems to be more problematic than a 6570 or 5450, which I also tried, but the 6570 and 5450 are even slower and mostly unusable vor watching video in FullHD.

              2 of 2 people found this helpful
                • Re: amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3
                  juan37

                  Many thanks for Your help!

                   

                  With the driver amdgpu-pro-dkms-16.60 the video cards R7 240 was not supported (I had one), but now with 17.30 I see are all the R7 supported:

                   

                  AMDGPU-PRO Driver for Linux Release Notes

                   

                  Actually I'm using Mesa 17.2.1 from Get openSUSE and the opensource amdgpu driver, and it works fine. But they are 2 problems:

                  1- VLC crashes with the error:

                  [  102.940450] vlc[2836]: segfault at 22c0090 ip 00007f57e11adbe3 sp 00007f57d6d57fe0 error 4 in libLLVMSupport.so.4.0.1[7f57e1113000+fc000]

                  [  143.211138] vlc[2881]: segfault at 42040090 ip 00007f2ab61ddbe3 sp 00007f2aa2f47f80 error 4 in libLLVMSupport.so.4.0.1[7f2ab6143000+fc000]

                   

                  The library libLLVMSupport.so.4.0.1 is part of Mesa 17.2.1.

                   

                  2- I could'nt get to work Opencl of Mesa with Davinci Resolve 14

                   

                  Here are 2 test results with Mesa 17.2.1, I hope with amdgpu-pro 17.30 I will get better results than the actually with Mesa 17.2.1:

                   

                  Unigine Valley Benchmark 1.0

                  FPS:

                  55.4

                  Score:

                  2316

                  Min FPS:

                  6.5

                  Max FPS:

                  65.2

                  System

                  Platform:

                  Linux 4.4.87-25-default x86_64

                  CPU model:

                  AMD FX-8320E Eight-Core Processor (3440MHz) x8

                  GPU model:

                  Unknown GPU (256MB) x1

                  Settings

                  Render:

                  OpenGL

                  Mode:

                  1920x1080 fullscreen

                  Preset

                  Custom

                  Quality

                  Medium

                   

                  Unigine Heaven Benchmark 4.0

                  FPS:

                  75.8

                  Score:

                  1909

                  Min FPS:

                  13.6

                  Max FPS:

                  151.6

                  System

                  Platform:

                  Linux 4.4.87-25-default x86_64

                  CPU model:

                  AMD FX-8320E Eight-Core Processor (3440MHz) x8

                  GPU model:

                  Unknown GPU (256MB) x1

                  Settings

                  Render:

                  OpenGL

                  Mode:

                  1920x1080 fullscreen

                  Preset

                  Custom

                  Quality

                  Medium

                  Tessellation:Disabled
                  • Re: amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3
                    t170925

                    Thank you for your script and patch. I got the driver successfully installed. I did remove it however due to instability of the driver.

                    • Re: amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3
                      gostal

                      I first  enabled the Leap 42.3 version of Bumblebee-Project repo to satisfy some dependency requirement.

                       

                      I then tried to install using zypper but building of the kernel module failed as described above. zypper went ahead and installed amdgpu-pro anyway.

                       

                      I managed to patch amdgpu-pro-dkms-17.30-465504.noarch.rpm and replaced the original. Since I had used zypper to install beforehand I had to remove the packages amdgpu-pro and amdgpu-pro-dkms-17.30-465504.noarch.rpm before I could have another go with the modified amdgpu-pro-dkms-17.30-465504.noarch.rpm. The compilation of the kernel module finished cleanly but on reboot I got to the login screen but after entering the password amdgpu_dri.so segfaults:

                      ---snip---

                      [ 7485.933784] ksplashqml[4575]: segfault at 0 ip 00007fe8133a02c7 sp 00007ffdd113ade0 error 4 in amdgpu_dri.so[7fe810e75000+2a6c000]

                      [ 7486.096175] klauncher[4600]: segfault at 0 ip 00007f9b733a02c7 sp 00007fffbafc3660 error 4 in amdgpu_dri.so[7f9b70e75000+2a6c000]

                      [ 7486.174996] ksmserver[4605]: segfault at 0 ip 00007f23bf3a02c7 sp 00007fffc8a91ae0 error 4 in amdgpu_dri.so[7f23bce75000+2a6c000]

                      ---end snip---

                      and X restarts back to the login screen. The errors in Xorg.0.log are:

                      ---snip---

                      X.Org X Server 1.18.3

                      Release Date: 2016-04-04

                      [  7486.722] X Protocol Version 11, Revision 0

                      [  7486.722] Build Operating System: openSUSE SUSE LINUX

                      [  7486.722] Current Operating System: Linux k2003734.win.foi.se 4.4.140-62-default #1 SMP Tue Jul 17 12:14:34 UTC 2018 (951943d) x86_64

                      [  7486.722] Kernel command line: BOOT_IMAGE=/vmlinuz-4.4.140-62-default root=UUID=de1b8a17-5cfd-49ca-8b1f-af4d8f5dfdd6 resume=/dev/nvme0n1p2 splash=silent quiet showopts resume=/dev/nvme0n1 showopts

                      [  7486.722] Build Date: 14 March 2018  10:01:54PM

                      [  7486.722]

                      [  7486.722] Current version of pixman: 0.34.0

                      [  7486.722]  Before reporting problems, check http://wiki.x.org

                      to make sure that you have the latest version.

                      [  7486.722] Markers: (--) probed, (**) from config file, (==) default setting,

                      (++) from command line, (!!) notice, (II) informational,

                      (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

                      Using a default monitor configuration.

                      [  7486.731] (EE) Failed to load module "fglrx" (module does not exist, 0)

                      [  7486.806] (EE) open /dev/dri/card0: No such file or directory

                      [  7486.806] (EE) open /dev/dri/card0: No such file or directory

                      [  7486.806] (EE) Screen 0 deleted because of no matching config section.

                      [  7486.814] (EE) AIGLX: reverting to software rendering

                      [  7486.885] (EE) AIGLX error: dlopen of /usr/lib64/dri/swrast_dri.so failed (/usr/lib64/dri/swrast_dri.so: undefined symbol: is64bitelf)

                      [  7486.889] (EE) GLX: could not load software renderer

                      ---end snip---

                      Ideas, anyone?

                      • Re: amdgpu-pro 17.30: building kernel module fails on openSUSE Leap 42.3
                        gostal

                        Update:

                        Before overwriting

                         

                        /boot/initrd

                         

                        the process backed up the old one. I copied it back and then rebooted. No segmentation fault this time! But I was fooled by names and thought it was the open source driver running again:

                         

                        /sbin/lspci -nnk |grep -A3 VGA:

                        03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere

                        [Radeon Pro WX 7100] [1002:67c4]

                                Subsystem: Dell Device [1028:0b0d]

                                Kernel driver in use: amdgpu

                                Kernel modules: amdgpu

                         

                        For some reason the AMD people have chosen the same name for the open source and the proprietary driver. I didn't find out until I for some reason looked at

                         

                        /var/log/Xorg.0.log

                         

                        again:

                         

                        gostal@k2003734:/var/log> cat Xorg.0.log|grep amdgpu

                        [274861.355] (**) ModulePath set to "/opt/amdgpu-pro/lib64/xorg/modules,/usr/lib64/xorg/modules"

                        [274861.375] (II) Loading /opt/amdgpu-pro/lib64/xorg/modules/extensions/libglx.so

                        [274861.376] (II) Applying OutputClass "amdgpu-pro" to /dev/dri/card0

                        [274861.376]    loading driver: amdgpu

                        [274861.376] (==) Matched amdgpu as autoconfigured driver 0

                        [274861.376] (II) LoadModule: "amdgpu"

                        [274861.376] (II) Loading /opt/amdgpu-pro/lib64/xorg/modules/drivers/amdgpu_drv.so

                        [274861.376] (II) Module amdgpu: vendor="X.Org Foundation"

                                All GPUs supported by the amdgpu kernel driver

                        [274861.520] (EE) AMDGPU(0): Failed to open amdgpu hybrid version

                        [274861.526] (II) Loading /opt/amdgpu-pro/lib64/xorg/modules/libglamoregl.so

                        [274861.850] (II) AMDGPU(0): [DRI2]   DRI driver: amdgpu

                        [274861.850] (II) AMDGPU(0): [DRI2]   VDPAU driver: amdgpu

                        [274861.970] (II) AIGLX: Loaded and initialized amdgpu

                         

                        So I have the pro driver running my card and by the looks of it I also have hardware acceleration enabled:

                        ---snip /var/log/Xorg.0.log---

                        [274861.850] (==) AMDGPU(0): DRI3 enabled

                        [274861.850] (==) AMDGPU(0): Backing store enabled

                        [274861.850] (II) AMDGPU(0): Direct rendering enabled

                        [274861.953] (II) AMDGPU(0): Use GLAMOR acceleration.

                        [274861.954] (II) AMDGPU(0): Acceleration enabled

                        --- end snip ---

                         

                        glxinfo:

                        direct rendering: Yes

                        OpenGL renderer string: AMD Radeon (TM) Pro WX 7100

                        ...

                         

                        glxgears reports some 7000 FPS which seems impressive, not that I have any reference numbers but anyway.

                         

                        Xorg.0.log actaully tells the reason for the segmentation fault. The symbol "is64bitelf" is not defined in /usr/lib64/dri/swrast_dri.so which is part of Mesa. So with the new /boot/initrd the driver tried to use Mesa for the DRI but couldn't because of the missing symbol. With the old /boot/initrd the driver somehow bypasses Mesa and provides the DRI by itself. Would be interesting to share any insight into this that anybody might have.