7 Replies Latest reply on Mar 14, 2016 4:55 AM by natasha

    fglrx driver and Kernel version 4.x

    rakoenig

      Tried to compile fglrx 15.201.1701 on Fedora 23 with Kernel 4.x. Failed dramatically, so I started to look around after extracting the files.

       

      First complaint is about a missing <linux/version.h> that comes from detect_requirements.sh. The critical code section is this:

       

      # in /lib/modules/<kernel-version> there is a symlink for latest kernel

      # which calls "build" and points to the directory where modules were built.

      if  [ "$uname_r_major" -eq 3 -a "$uname_r_minor" -gt 6 ]; then

              if [ ! -f /lib/modules/${uname_r}/build/include/generated/uapi/linux/version.h ]; then

                      #system does not have the kernel build environment for kernel release > 3.7

                      echo "fglrx installation requires that the system have kernel headers for 3.7 release.  /lib/modules/${uname_r}/build/include/generated/uapi/linux/version.h cannot be found on this system." >> ${LOG_FILE}

                      status=1

              fi

      else

              if [ ! -f /lib/modules/${uname_r}/build/include/linux/version.h ]; then

                      #system does not have the kernel build environment

                      echo "fglrx installation requires that the system have kernel headers.  /lib/modules/${uname_r}/build/include/linux/version.h cannot be found on this system." >> ${LOG_FILE}

                      status=1

              fi

      fi

       

      Yeah, great. So loks at the right place for all 3.x kernels where the minor version is above 6, but it looks at the wrong place for kernel version 4.x. Easy to fix, but that doesn't help.

       

      Next obstacle are moved files in the Kernel ABI. i387.h now moved to fpu/api.h and fpu-internal.h moved to fpu/internal.h. Also easy to fix with a few symlinks.

       

      But after that it gets really weird. The compilation of the kernel module throws a lot of errors.

       

      make -C /lib/modules/4.3.4-300.fc23.x86_64/build SUBDIRS=/usr/lib/modules/fglrx/build_mod/2.6.x modules

      make[1]: Entering directory '/usr/src/kernels/4.3.4-300.fc23.x86_64'

        CC [M]  /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o

      /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘firegl_major_proc_read’:

      /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:626:9: error: void value not ignored as it ought to be

           len = seq_printf(m, "%d\n", major);

               ^

      Bad news: seq_printf is no longer returning an int.

       

      /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘kcl__cmpxchg’:

      /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1745:12: error: implicit declaration of function ‘__fgl_cmpxchg’ [-Werror=implicit-function-declaration]

           return __fgl_cmpxchg(ptr,old,new,size);

                  ^

       

      looked at this in firegl_public.c. The function is declared a few lines above that call, but only if __i386__ is defined. So, on my x86_64 system we get this error.

       

      More errors are in the log, but at this point I realized that its probably not my job to fix all the bugs.

       

      Yes, I know that its had to maintain a driver that should fit to a wide range of kernel versions. But I have customers that want to use this driver on recent kernels and they run into the same problems that I just found.

       

      So questions are:

      1. Is AMD working on a maintenance release that also supports recent kernels?
      2. If so, when can we expect a working driver for kernel versions >= 4?

       

      Best regards

      Rainer

        • Re: fglrx driver and Kernel version 4.x
          natasha

          I use openSUSE 42.1;

           

          > lsb_release -idrc && echo Kernel Release: `uname -r`

          Distributor ID: SUSE LINUX

          Description:    openSUSE Leap 42.1 (x86_64)

          Release:        42.1

          Codename:       n/a

          Kernel Release: 4.1.15-8-default

           

          All fglrx versions don't detect my videocard (Radeon HD 8750M). This card was properly detected at all earlier kernels. Unlike you, I didn't explore this, but I feel this is the problem with driver-kernel interaction.

            • Re: fglrx driver and Kernel version 4.x
              das_linux

              Hi there,

               

              I just installed an ASUS R7 360 in my machine.

              The current driver version for the R7 360 is 15.302 (Crimson).

              Like you I use openSUSE Leap 42.1 with kernel 4.

              Installation was smooth and successful.

               

              Did building the fglrx module succeed on your machine?

              If not, before building the module did you do this on your openSUSE box:

              cd /usr/src/linux

              make cloneconfig

              This has been necessary with Nvidia to properly configure the kernel sources to the running kernel, I will keep this habit with AMD now.

                • Re: fglrx driver and Kernel version 4.x
                  natasha

                  Hi! Thank you for the response. I have tried your advice, but it hasn't helped:

                  # cd /usr/src/linux

                  # make cloneconfig

                  Cloning configuration file /proc/config.gz

                   

                  #

                  # configuration written to .config

                  #

                   

                  # ./amd-driver-installer-15.302-x86.x86_64.run --buildpkg SuSE/SUSE-autodetection

                  Created directory fglrx-install.2fsFS1

                  Verifying archive integrity... All good.

                  Uncompressing AMD Proprietary Driver-15.302...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

                  =====================================================================

                  AMD  Proprietary Driver Installer/Packager

                  =====================================================================

                  Generating package: SuSE/SUSE-autodetection

                  Auto detection mode:

                    Distribution: openSUSE

                    Version:      42.1

                    Architecture: x86_64

                    Package name: SUSE421-AMD64

                  Requested package is not supported.

                  Removing temporary directory: fglrx-install.2fsFS1

                   

                  In principle, this is logically, since SUSE421* is absent among available packages:

                  # ./amd-driver-installer-15.302-x86.x86_64.run --listpkg | grep 'SuSE'

                  Created directory fglrx-install.9evuLY

                  SuSE Packages:

                          SuSE/SLE10-IA32

                          SuSE/SLE10-AMD64

                          SuSE/SLE11-IA32

                          SuSE/SLE11-AMD64

                          SuSE/SLE12-AMD64

                          SuSE/SUSE121-IA32

                          SuSE/SUSE121-AMD64

                          SuSE/SUSE122-IA32

                          SuSE/SUSE122-AMD64

                          SuSE/SUSE123-IA32

                          SuSE/SUSE123-AMD64

                          SuSE/SUSE131-IA32

                          SuSE/SUSE131-AMD64

                          SuSE/SUSE132-IA32

                          SuSE/SUSE132-AMD64

                          SuSE/SUSE-autodetection

                   

                  But what does it build at your system?..

                   

                  When I try simply execute .run-file, it writes that it doesn't see a desired device.

              • Re: fglrx driver and Kernel version 4.x
                das_linux

                Crimson 15.302 succeeded to build on kernel 4.1.15 on my box (openSUSE 42.1) without problems or errors.

                1 of 1 people found this helpful
                  • Re: fglrx driver and Kernel version 4.x
                    rakoenig

                    Yes, the Crimson 15.302 would build on Kernel 4.x but it doesn't solve my problem because I get a message box telling me that my hardware is not supported by the driver.

                     

                    Hardware is:

                    00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] (rev 06)

                    00:01.0 0300: 1002:9851 (rev 06)

                     

                    Radeon R4/R5 is listed as "supported devices" on the driver download page, but doesn't look like it really is. :/

                     

                    On the other hand I'm aware that R4/R5 is just what lspci or the pci.ids database thinks should map to the device ID 1002:9851. So the question is now, how do I find a suitable driver that compiles on kernel 4.x and supports that hardware.

                      • Re: fglrx driver and Kernel version 4.x
                        das_linux

                        So, how old is your R4/R5 device?

                        I read somewhere, newer Catalyst/Crimson drivers may drop support for older devices.

                         

                        Can´t you find a driver at Download Drivers ?

                         

                        I think the Linux kernel "radeon" module should support "older" devices. You need to exchange "fglrx" with "radeon" in your xorg.conf.

                        Try the radeon driver instead fglrx.

                         

                        I read, newer Linux kernels 4.2 or 4.3 have a new AMD GPU driver named amdgpu and AMD officially helps to work on that driver.

                        If the radeon driver in your current kernel does not work, you may upgrade to Linux kernel 4.2/4.3 and use the "amdgpu" module.

                      • Re: fglrx driver and Kernel version 4.x
                        natasha

                        I have tried to build and install .rpm-s corresponding to openSUSE 13.2 -- they have been installed formally successfully. In my case, graphics doesn't really start with this driver -- but this is another problem (it is being discussed, for example, here).