Announcement

Collapse
No announcement yet.

Need help with hardware 3D using Vega GPU

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with hardware 3D using Vega GPU

    Has anyone had any experience getting hardware 3D working with a Vega graphics card? I'm running Debian 9. I've built a 4.15.0-rc2 kernel which seems to have made my monitors detect correctly. I've put the firmware binaries from the kernel git into /lib/firmware which includes blobs for Vega10 in the amdgpu directory. I've updated libdrm to 2.4.88 for Mesa and have built Mesa 17.3.0-rc5. I manually specify the new Mesa's use when starting specific applications like I always have in the past with my custom Mesa builds. Unfortunately, I seem to only have software 3D via llvmpipe though when using games or glxinfo.

    Is there another piece of the puzzle that I'm missing? Perhaps an update to x11 or something? I looked at the guide published here at Phoronix from August, but I wasn't able to discern anything that I had missed from reading it.

    Edit: The answer is that a copy of Mesa built against LLVM 5.0 or later was required. Debian 9 comes with LLVM 3.9. Even building a super-new Mesa 18.0 doesn't help if LLVM 3.9 is used. LLVM 5.0.1 is available in Debian backports.
    Last edited by Particle; 02-12-2018, 01:28 AM.

  • #2
    I appreciate your contribution, but I'm interested in getting Debian 9 working rather than switching to something else. I additionally wish to avoid third party repositories.

    Side note: With regards to building a Debian kernel, please note that make-kpkg as referred to in your linked post isn't published in Debian 9.0 release or beyond. They've switched to supporting make more directly. "make deb-pkg" now produces the debs a Debian user needs. Fakeroot is also not needed anymore. Something like "time make deb-pkg -j16" does the trick after configuring.
    Last edited by Particle; 12-06-2017, 10:42 AM.

    Comment


    • #3
      Originally posted by Particle View Post
      Has anyone had any experience getting hardware 3D working with a Vega graphics card? I'm running Debian 9. I've built a 4.15.0-rc2 kernel which seems to have made my monitors detect correctly. I've put the firmware binaries from the kernel git into /lib/firmware which includes blobs for Vega10 in the amdgpu directory. I've updated libdrm to 2.4.88 for Mesa and have built Mesa 17.3.0-rc5. I manually specify the new Mesa's use when starting specific applications like I always have in the past with my custom Mesa builds. Unfortunately, I seem to only have software 3D via llvmpipe though when using games or glxinfo.

      Is there another piece of the puzzle that I'm missing? Perhaps an update to x11 or something? I looked at the guide published here at Phoronix from August, but I wasn't able to discern anything that I had missed from reading it.
      Can you pastebin X log and dmesg output then post links here ?

      At first glance the most likely issues are (a) firmware not being picked up via initrd, (b) I didn't see you mention updating the amdgpu X driver.

      Actually before you do that, what do you get if you run a GL app (glxgears or something) with "LIBGL_DEBUG=verbose <app>" ?

      Comment


      • #4
        Regarding a 3D application with debug set to verbose, I get something like this:
        Code:
        GL_VENDOR: VMware, Inc.
        GL_RENDERER: llvmpipe (LLVM 3.9, 128 bits)
        GL_VERSION: 3.0 Mesa 17.4.0-devel (git-12a96aaf90)
        (I tried again yesterday after building Mesa 17.4.0-git.)

        In order to update libdrm2, I had to do all of these:
        Code:
        libdrm2_2.4.88-1_amd64.deb
        libdrm2_2.4.88-1_i386.deb
        libdrm-common_2.4.88-1_all.deb
        libdrm-amdgpu1_2.4.88-1_amd64.deb
        libdrm-amdgpu1_2.4.88-1_i386.deb
        libdrm-intel1_2.4.88-1_amd64.deb
        libdrm-intel1_2.4.88-1_i386.deb
        libdrm-nouveau2_2.4.88-1_amd64.deb
        libdrm-nouveau2_2.4.88-1_i386.deb
        libdrm-radeon1_2.4.88-1_amd64.deb
        libdrm-radeon1_2.4.88-1_i386.deb
        libdrm-dev_2.4.88-1_amd64.deb
        libdrm-dev_2.4.88-1_i386.deb
        I'm multi-arch because of Steam.

        I installed xserver-xorg-video-amdgpu_1.4.0-1_amd64.deb after reading your post. No change after a reboot.

        I think the firmware is getting loaded correctly as the GPU shows up and is running with the amdgpu driver.

        Code:
        44:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 687f (rev c1) (prog-if 00 [VGA controller])
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 6b76
        Flags: bus master, fast devsel, latency 0, IRQ 149
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Memory at e0000000 (64-bit, prefetchable) [size=2M]
        I/O ports at e000 [size=256]
        Memory at ec400000 (32-bit, non-prefetchable) [size=512K]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu
        Last edited by Particle; 12-07-2017, 01:15 AM.

        Comment


        • #5
          Can you pastebin X log and dmesg output then post links here ?

          Comment


          • #6
            X log:
            https://pastebin.com/qf8dBNRY

            dmesg:
            https://pastebin.com/A6BeVXzK

            Comment


            • #7
              As a test, I've moved from 9.0 to testing since it has newer core mesa libs. I would appear to still be missing something though. As before, I can see my device using lspci and also see that it is using the amdgpu kernel driver. No hardware 3D is available yet though.

              Code:
              OpenGL vendor string: VMware, Inc.
              OpenGL renderer string: llvmpipe (LLVM 5.0, 128 bits)
              OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.2.5
              OpenGL core profile shading language version string: 3.30
              OpenGL core profile context flags: (none)
              OpenGL core profile profile mask: core profile
              OpenGL core profile extensions:
              OpenGL version string: 3.0 Mesa 17.2.5
              OpenGL shading language version string: 1.30
              OpenGL context flags: (none)
              OpenGL extensions:
              OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.2.5
              OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
              OpenGL ES profile extensions:
              Code:
              44:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] (rev c1) (prog-if 00 [VGA controller])
                  Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64]
                  Flags: bus master, fast devsel, latency 0, IRQ 149
                  Memory at d0000000 (64-bit, prefetchable) [size=256M]
                  Memory at e0000000 (64-bit, prefetchable) [size=2M]
                  I/O ports at e000 [size=256]
                  Memory at ec400000 (32-bit, non-prefetchable) [size=512K]
                  Expansion ROM at 000c0000 [disabled] [size=128K]
                  Capabilities: <access denied>
                  Kernel driver in use: amdgpu
                  Kernel modules: amdgpu

              Comment


              • #8
                Sorry, I missed your earlier post. Your dmesg output looks OK but I saw the following in your X log.

                [ 17.988] EGL_MESA_drm_image required.
                [ 17.989] (EE) AMDGPU(0): glamor detected, failed to initialize EGL.
                I expected more output from running an app with verbose debug - maybe that's not the right option, will check.

                Comment


                • #9
                  No luck with Vega on Mesa 18.0.0-rc3 and Linux kernel 4.15.0. My kernel firmware is up-to-date. I never did figure out how to get around that EGL_MESA_drm_image required error. It must not have anything to do with Mesa itself, the Linux kernel, or kernel firmware.

                  Code:
                  [email protected]:~/scripts$ glxinfo | grep OpenGL
                  OpenGL vendor string: VMware, Inc.
                  OpenGL renderer string: llvmpipe (LLVM 3.9, 128 bits)
                  OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.0-rc3
                  OpenGL core profile shading language version string: 3.30
                  OpenGL core profile context flags: (none)
                  OpenGL core profile profile mask: core profile
                  OpenGL core profile extensions:
                  OpenGL version string: 3.0 Mesa 18.0.0-rc3
                  OpenGL shading language version string: 1.30
                  OpenGL context flags: (none)
                  OpenGL extensions:
                  OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.0.0-rc3
                  OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
                  OpenGL ES profile extensions:
                  Code:
                  44:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 687f (rev c1) (prog-if 00 [VGA controller])
                      Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 6b76
                      Flags: bus master, fast devsel, latency 0, IRQ 147
                      Memory at d0000000 (64-bit, prefetchable) [size=256M]
                      Memory at e0000000 (64-bit, prefetchable) [size=2M]
                      I/O ports at e000 [size=256]
                      Memory at ec400000 (32-bit, non-prefetchable) [size=512K]
                      Expansion ROM at 000c0000 [disabled] [size=128K]
                      Capabilities: [48] Vendor Specific Information: Len=08 <?>
                      Capabilities: [50] Power Management version 3
                      Capabilities: [64] Express Legacy Endpoint, MSI 00
                      Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                      Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
                      Capabilities: [150] Advanced Error Reporting
                      Capabilities: [200] #15
                      Capabilities: [270] #19
                      Capabilities: [2a0] Access Control Services
                      Capabilities: [2b0] Address Translation Service (ATS)
                      Capabilities: [2c0] Page Request Interface (PRI)
                      Capabilities: [2d0] Process Address Space ID (PASID)
                      Capabilities: [320] Latency Tolerance Reporting
                      Kernel driver in use: amdgpu
                      Kernel modules: amdgpu
                  Code:
                  [    21.491] (II) Loading sub module "glamoregl"
                  [    21.491] (II) LoadModule: "glamoregl"
                  [    21.491] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
                  [    21.496] (II) Module glamoregl: vendor="X.Org Foundation"
                  [    21.496]    compiled for 1.19.2, module version = 1.0.0
                  [    21.496]    ABI class: X.Org ANSI C Emulation, version 0.4
                  [    21.496] (II) glamor: OpenGL accelerated X.org driver based.
                  [    21.500] (II) glamor: EGL version 1.4 (DRI2):
                  [    21.500] EGL_MESA_drm_image required.
                  [    21.500] (EE) AMDGPU(0): glamor detected, failed to initialize EGL.
                  Last edited by Particle; 02-01-2018, 11:03 PM.

                  Comment


                  • #10
                    Mystery solved.

                    I had to build Mesa against a newer version of LLVM. I tried LLVM 5.0 from Buster's repos manually installed which worked before someone pointed out that the LLVM project provides their own official repos for Debian. I then switched to that and rebuilt Mesa against LLVM 7.0.

                    In both cases, the newer LLVM allowed for my Vega 64 to finally light up and provide hardware 3D through Mesa.

                    Code:
                    $ glxinfo | grep OpenGL
                    OpenGL vendor string: X.Org
                    OpenGL renderer string: Radeon RX Vega (VEGA10 / DRM 3.23.0 / 4.15.0-gms-amd64, LLVM 7.0.0)
                    OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.0-rc3
                    OpenGL core profile shading language version string: 4.50
                    OpenGL core profile context flags: (none)
                    OpenGL core profile profile mask: core profile
                    OpenGL core profile extensions:
                    OpenGL version string: 3.0 Mesa 18.0.0-rc3
                    OpenGL shading language version string: 1.30
                    OpenGL context flags: (none)
                    OpenGL extensions:
                    OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.0-rc3
                    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
                    OpenGL ES profile extensions:

                    Comment

                    Working...
                    X