3 Replies Latest reply on Oct 27, 2016 3:33 AM by boris59

    Linux support for mobile R9 M385X GPU (Ubuntu 16.04+ only uses AMD FX 8800P Carrizo APU)

    boris59

      Moin all.

       

      Is it true that modern Linux distros (such as Ubuntu 16.04 or 16.10) cannot benefit from the AMD Radeon R9 M385X (and probably other) GPUs? Whatever I try on my Lenovo Y700-15ACZ with the AMD FX 8800P (Carrizo) APU, all I get is the Carrizo APU. The dedicated GPU does not even show up.

       

      There is no point for me to keep a product I cannot use, and it seems I bought a notebook from which I cannot use the GPU.

       

      Thanks for any hints showing me where I missed something.

       

      Cheers, Boris

        • Re: Linux support for mobile R9 M385X GPU (Ubuntu 16.04+ only uses AMD FX 8800P Carrizo APU)
          boris59

          Just found an intermediate solution. It is related to the hybrid APU-GPU mode that seems to be forced on Ubuntu users (I'm not a Linux/Ubuntu crack, so I don't know any better).

           

          First check if Ubuntu recognizes your dedicated GPU. You can use this command (found at the German site https://forum.ubuntuusers.de/topic/welche-angaben-zum-system-sind-fuer-ein-neues--2/ ):

          • lspci -nnk | grep "VGA\|'Kern'\|3D\|Display" -A2

          Contrary to the command lspci -nn | grep 'VGA' which I found somewhere on the AMD site it shows not only VGA-compatible hardware but also GPUs that show up with other identifiers (in my case Display controller, see below).
          The additional parameter -A2 shows you not just the grep'd line but the next two lines following it as well. You can extend that to -A3 etc.

          On my laptop (by now Ubuntu 16.10) this showed the following:

          • 00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Carrizo [1002:9874] (rev c4)
                Subsystem: Lenovo Carrizo [17aa:3807]
                Kernel driver in use: amdgpu
          • 03:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Bonaire XT [Radeon R9 M280X] [1002:6646] (rev ff)
                Kernel driver in use: radeon
                Kernel modules: radeon

          The first is my APU graphics, the second is the dedicated GPU (showing as M280X possibly because the M385X is the same hardware, just rebranded;  List of AMD graphics processing units - Wikipedia indicates almost identical stats for both GPUs).

           

          Seeing that both APU and GPU are found and a driver being present, I looked for a way to force the use of my (stronger) GPU since neither the Unigine benchmark nor the jMonkeyEngine SDK seem to trigger an "automated upgrade" to the GPU's power once the APU runs into hefty performance limits. I found it by digging further from the German article mentioned above and found https://wiki.ubuntuusers.de/Hybrid-Grafikkarten/PRIME/ (German again). It indicates that prefixing an executable with DRI_PRIME=1 makes it use the second graphics card, in my case the GPU. To test that I ran glxinfo (part of the mesa-utils package) which gives you information on the OpenGL capabilities of your graphics card. Here are the outputs for mine, filtered for OpenGL-specifics (shortened):

          • glxinfo | grep OpenGL
            OpenGL vendor string: X.Org
            OpenGL renderer string: Gallium 0.4 on AMD CARRIZO (DRM 3.3.0 / 4.8.0-26-generic, LLVM 3.8.1)
            OpenGL core profile version string: 4.1 (Core Profile) Mesa 12.0.3
            ...
            OpenGL version string: 3.0 Mesa 12.0.3
            OpenGL shading language version string: 1.30
            ...
          • DRI_PRIME=1 glxinfo | grep OpenGL
            OpenGL vendor string: X.Org
            OpenGL renderer string: Gallium 0.4 on AMD BONAIRE (DRM 2.46.0 / 4.8.0-26-generic, LLVM 3.8.1)
            OpenGL core profile version string: 4.1 (Core Profile) Mesa 12.0.3
            ...
            OpenGL version string: 3.0 Mesa 12.0.3
            OpenGL shading language version string: 1.30
            ...

          As you can see I get two different stats, the second one being my dedicated GPU. Prefixing the Unigine benchmark (via phoronix-test-suite package) and the jMonkeyEngine SDK executables with DRI_PRIME=1 as well finally got me to enjoy the full power of my GPU :-)

           

          Now why is this just an intermediate solution? Because for one the pure OSS drivers used automatically by Ubuntu are known to be slower than the proprietary AMDGPU-PRO drivers provided by AMD and also don't support all capabilities: the output above shows that my GPU supports OpenGL 3.0 with the amdgpu OSS driver while the hardware is capable of OpenGL 4.5. So I am left with hoping that either AMD adds more capabilities to the amdgpu driver or adds support for my GPU to  their proprietary AMDGPU-PRO driver. But for now (I don't want to play games on my laptop, just a bit of hardware acceleration to make 3D stuff such as jMonkeyEngine and Blender run better) this should be enough for me.

           

          Hope this helps others as well!

           

          P.S: Be careful with using DRI_PRIME=1 for all your applications. In some cases, e.g. web browsers, the dedicated GPU is over-qualified and consumes an unnecessary amount of energy (if you run on battery at times). Better stick to the APU in general and make use of the GPU whenever you really need it.