Announcement

Collapse
No announcement yet.

Hybrid Graphics Intel + Amd

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

  • Hybrid Graphics Intel + Amd

    DRI_PRIME supposed to work with a following configuration? xrandr --listproviders sees only one "provider". Am I supposed to do something special with xorg.conf?

    Toshiba l50-b-281

    Same results with both Kubuntu 15.10 and 16.04 + Oibaf PPA
    i5 4210u with HD4400 and r7 m260 as a second gpu.

    lspci:
    00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
    00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
    00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
    00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
    00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
    00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
    00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
    00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
    00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
    00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
    00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
    01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
    07:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)
    08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
    09:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265]

    xrandr --listproviders:

    Providers: number : 1
    Provider 0: id: 0x47 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 4 associated providers: 0 name:Intel













  • #2
    So first: xrandr --listproviders is only relevant for offloading with dri2
    You need xf86-video-intel AND xf86-video-ati installed for this (or whatever your distribution calls it... xserver-xorg-video-ati or something?).
    If you have a /etc/X11/xorg.conf config file, or config files in /etc/X11/xorg.conf.d/ with settings for radeon, then try removing them. Apparently this can interfere with the detection.
    Then next would be to look at /var/log/Xorg.0.log whether both drivers get loaded.

    The next thing would be to use DRI3 for offloading. With dri3 you do NOT need xrandr --setprovideroffloadsink and you do NOT need xf86-video-ati, only setting DRI_PRIME=1 will make it work fully automatically (it can have extreme tearing though). For that your intel driver needs DRI3 support. If you're lucky your distribution has compiling the dri3 option enabled and all you need to do is creating the file /etc/X11/xorg.conf.d/20-intel.conf with
    Code:
    Section "Device"
       Identifier "Intel Graphics"
       Driver "intel"
       Option "DRI" "3"
    EndSection
    and restarting X.
    A quick test with modern mesa and glxinfo should say "libGL: Using DRI3 for screen 0" somewhere when doing LIBGL_DEBUG=verbose glxinfo | grep OpenGL

    Comment


    • #3
      IIRC the Topaz GPU is VI so video-amdgpu or video-modesetting...
      Test signature

      Comment


      • #4
        Aha! Updated kernel to 4.5 and it seems to work now. Very cool!

        $ glxinfo | grep -i opengl
        OpenGL vendor string: Intel Open Source Technology Center
        OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
        OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
        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 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
        OpenGL shading language version string: 1.30
        OpenGL context flags: (none)
        OpenGL extensions:
        OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
        OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
        OpenGL ES profile extensions:
        $ DRI_PRIME=1 glxinfo | grep -i opengl
        OpenGL vendor string: X.Org
        OpenGL renderer string: Gallium 0.4 on AMD ICELAND (DRM 3.1.0, LLVM 3.8.0)
        OpenGL core profile version string: 4.1 (Core Profile) Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
        OpenGL core profile shading language version string: 4.10
        OpenGL core profile context flags: (none)
        OpenGL core profile profile mask: core profile
        OpenGL core profile extensions:
        OpenGL version string: 3.0 Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
        OpenGL shading language version string: 1.30
        OpenGL context flags: (none)
        OpenGL extensions:
        OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
        OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
        OpenGL ES profile extensions:

        Performance almost decent with Source games like Dota2 and TF2 but Unigine Heaven is acting strange in a sense that performance is pretty bad, motion "stutters" and the screen tears like crazy (maybe something to do with the clocks?).

        Unigine Heaven 4.0 (720p, High)

        AMD R7 M260

        FPS: 5.4
        Score: 136
        Min FPS: 2.9
        Max FPS: 12.3

        Intel HD 4400 (single channel)

        FPS: 11.5
        Score: 290
        Min FPS: 5.4
        Max FPS: 21.3


        Last edited by blindfrog; 08 March 2016, 05:50 AM.

        Comment


        • #5
          There's no power management support for iceland/topaz chips right now so they currently always use low clocks.

          Comment


          • #6
            Thanks! That explains it then. Hopefully it arrives at some point. Gotta try fglrx again when it arrives for 16.04. The one in 15.10 is slower than this and Crimson 15.12 doesn't seems to like this machine but that's off-topic anyway.

            Comment


            • #7
              Does anyone has a working Intel + AMD hybrid graphics setup working on Ubuntu 16.04?

              I have a Radeon R7 M370:
              OpenGL renderer string: Gallium 0.4 on AMD OLAND (DRM 2.46.0 / 4.8.0-040800rc6-generic, LLVM 3.9.0)

              And Intel HD 520:
              OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)

              Problem is that using DRI_PRIME=1 results in very low performance (Unigine-Heaven = 2.52 FPS @ 1920x1080) when radeon DPM is set to low:
              echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level

              That is kinda expected. But when radeon DPM is set to high or auto then using DRI_PRIME=1 just results in crashes.

              Tried with amdgu as well but that always crashes when using DRI_PRIME=1. At the moment the Radeon card is unusable in 16.04.

              fglrx driver seems to work normally on 14.04 (Unigine-Heaven = 8.21 FPS @ 1920x1080)

              Comment


              • #8
                I have a Skylake laptop (Dell Precision 3510) with Intel+AMD at work and running Debian Testing (now Squeeze) on it. Intel works ok (except occasional crashes when plugging/unplugging monitors), bt i cannot gwt the dedicated card to work with 3d workloads (it works with video playback for example).
                Now i use intel+glamor on it, but i tried modesetting driver too, same results.

                Code:
                 
                 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus LE [Radeon HD 8830M] (rev ff)  
                 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
                The dedicated card is in fact a FirePro W5130M. Attempting to run for example Steam games on it lead to gpu lockup and the card remains in powered state and only a reboot brings it back to a manageable state. glxinfo for the integrated card
                Code:
                   
                 glxinfo |grep OpenATTENTION: default value of option vblank_mode overridden by environment. ATTENTION: default value of option vblank_mode overridden by environment. ATTENTION: option value of option vblank_mode ignored.     Vendor: Intel Open Source Technology Center (0x8086) OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)  OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.3 OpenGL core profile shading language version string: 4.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: ATTENTION: option value of option vblank_mode ignored. OpenGL version string: 3.0 Mesa 12.0.3 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: ATTENTION: option value of option vblank_mode ignored. OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.3 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 OpenGL ES profile extensions:
                glxinfo for AMD:
                Code:
                 glxinfo |grep Open ATTENTION: default value of option vblank_mode overridden by environment. OpenGL vendor string: X.Org OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE (DRM 2.43.0 / 4.6.0-1-amd64, LLVM 3.8.1) OpenGL core profile version string: 4.1 (Core Profile) Mesa 12.0.3 OpenGL core profile shading language version string: 4.10 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.0 Mesa 12.0.3 OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.3 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00 OpenGL ES profile extensions:

                Comment


                • #9
                  Originally posted by blindfrog View Post
                  Aha! Updated kernel to 4.5 and it seems to work now. Very cool!

                  $ glxinfo | grep -i opengl
                  OpenGL vendor string: Intel Open Source Technology Center
                  OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
                  OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
                  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 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
                  OpenGL shading language version string: 1.30
                  OpenGL context flags: (none)
                  OpenGL extensions:
                  OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
                  OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
                  OpenGL ES profile extensions:
                  $ DRI_PRIME=1 glxinfo | grep -i opengl
                  OpenGL vendor string: X.Org
                  OpenGL renderer string: Gallium 0.4 on AMD ICELAND (DRM 3.1.0, LLVM 3.8.0)
                  OpenGL core profile version string: 4.1 (Core Profile) Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
                  OpenGL core profile shading language version string: 4.10
                  OpenGL core profile context flags: (none)
                  OpenGL core profile profile mask: core profile
                  OpenGL core profile extensions:
                  OpenGL version string: 3.0 Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
                  OpenGL shading language version string: 1.30
                  OpenGL context flags: (none)
                  OpenGL extensions:
                  OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.3.0-devel (git-c82086f 2016-03-07 wily-oibaf-ppa)
                  OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
                  OpenGL ES profile extensions:

                  Performance almost decent with Source games like Dota2 and TF2 but Unigine Heaven is acting strange in a sense that performance is pretty bad, motion "stutters" and the screen tears like crazy (maybe something to do with the clocks?).

                  Unigine Heaven 4.0 (720p, High)

                  AMD R7 M260

                  FPS: 5.4
                  Score: 136
                  Min FPS: 2.9
                  Max FPS: 12.3

                  Intel HD 4400 (single channel)

                  FPS: 11.5
                  Score: 290
                  Min FPS: 5.4
                  Max FPS: 21.3

                  Kernel 4.8.6

                  $glxinfo |grep OpenGL
                  OpenGL vendor string: Intel Open Source Technology Center
                  OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)
                  OpenGL core profile version string: 4.5 (Core Profile) Mesa 13.1.0-devel

                  $DRI_PRIME=1 glxinfo |grep OpenGL
                  OpenGL vendor string: X.Org
                  OpenGL renderer string: Gallium 0.4 on AMD ICELAND (DRM 3.3.0 / 4.8.6-040806-generic, LLVM 3.9.0)
                  OpenGL core profile version string: 4.5 (Core Profile) Mesa 13.1.0-devel


                  Unigine Heaven 4.0 (720p, High)

                  AMD R7 M360

                  FPS: 5.8
                  Score: 146
                  Min FPS: 3.1
                  Max FPS: 13.1

                  Intel HD Graphics 520 (dual channel)

                  FPS: 21.6
                  Score: 543
                  Min FPS: 7.1
                  Max FPS: 40.9

                  Comment


                  • #10
                    Originally posted by agd5f View Post
                    There's no power management support for iceland/topaz chips right now so they currently always use low clocks.
                    Is there DPM support for higher clocks in iceland/topaz in 4.9-wip? Someone filed a bug at https://bugs.freedesktop.org/show_bug.cgi?id=97403 and mentioned much increased performance in 4.9 compared to 4.8.

                    I am a little bit confused now. Isn't iceland supposed to be controlled by Powerplay instead of DPM?

                    I guess DPM or powerplay was working for a while in drm-next-4.9-wip for iceland/topaz and then it broke at some major rework before it got pulled into 4.9 mainline where the regression was reported in https://bugzilla.kernel.org/show_bug.cgi?id=185681 and https://bugs.freedesktop.org/show_bug.cgi?id=98357 .

                    I also had "powerplay initialization failed" testing the latest 4.9rc4. Bringing the chip from crawling slow to a full stop. Intel Graphics never looked better.

                    Is there a chance that this get fixed in mainline until 4.9 release so those Intel iGPU / AMD dGPU laptops sold over the last year could finally make use of topaz?

                    Comment

                    Working...
                    X