<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Will this launch firefox on the dGPU ?</p>
    <p>$ DRI_PRIME=1 && firefox</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 5/16/20 1:58 AM, Alex Deucher wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CADnq5_NS6Fy3z5DWN772kWLr+7qkOBvJsAELJFTSaJXcXtJ55A@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>source and sink only make sense in the specific randr
          commands to set this up.  Essentially a source is a producer
          and sink is a consumer.  In a nutshell, devices can either:
          drive displays, render content, or both.  For example, a USB
          to VGA adapter can just display, but it has no graphics engine
          to actually draw any content.  You can also have devices which
          have no display hardware (like the chip in this thread) or no
          displays physically wired to the chip which can only render. 
          Finally you have the traditional case where you have a device
          which has display hardware with display connectors wired up
          which also has a graphics engine.  Regardless of what hardware
          capabilities the device has, the display manager can pick
          which one(s) will be used for display and which one will be
          used for rendering.  If the rendering and display device is
          the same, everything happens on the device directly.  If the
          rendering and display devices are separate, the rendering
          device will render to it's own memory and the the contents
          will be copied to a buffer suitable for use by the display
          device.</div>
        <div><br>
        </div>
        <div>Alex</div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, May 15, 2020 at 12:46
          PM IL Ka <<a href="mailto:kazakevichilya@gmail.com"
            moz-do-not-send="true">kazakevichilya@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">Thank you, Alex.
            <div><br>
            </div>
            <div>I am not topic starter, just a curious one. This is how
              it works:</div>
            <div><br>
            </div>
            <div>* AMD card renders some 3D output to some memory region
              (this card is called "source" by randr)</div>
            <div>* Intel sends it to the output  (this card is called
              "sink")</div>
            <div><br>
            </div>
            <div>By setting "DRI_PRIME=1" you are asking app to use AMD
              to render.</div>
            <div><br>
            </div>
            <div>Is it correct?</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
          <div
            id="gmail-m_7974421917490793411DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
            <table style="border-top:1px solid rgb(211,212,222)">
              <tbody>
                <tr>
                  <td style="width:55px;padding-top:18px"><a
href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"
                      target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png"
                        alt="" style="width: 46px; height: 29px;"
                        moz-do-not-send="true" width="46" height="29"></a></td>
                  <td
style="width:470px;padding-top:17px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Без
                    вирусов. <a
href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"
                      style="color:rgb(68,83,234)" target="_blank"
                      moz-do-not-send="true">www.avg.com</a> </td>
                </tr>
              </tbody>
            </table>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Fri, May 15, 2020 at
              7:16 PM Alex Deucher <<a
                href="mailto:alexdeucher@gmail.com" target="_blank"
                moz-do-not-send="true">alexdeucher@gmail.com</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir="ltr">
                <div dir="ltr">Most modern desktop environments set this
                  up already.  All you need to do is set the env var
                  DRI_PRIME=1 when running an app and it will run on the
                  dGPU.  Many desktop environments also provide a GUI
                  based option to choose which GPU to run a particular
                  application on.</div>
                <div dir="ltr"><br>
                </div>
                <div>Alex<br>
                </div>
                <div dir="ltr"><br>
                </div>
                <div dir="ltr">On Fri, May 15, 2020 at 8:23 AM IL Ka
                  <<a href="mailto:kazakevichilya@gmail.com"
                    target="_blank" moz-do-not-send="true">kazakevichilya@gmail.com</a>>
                  wrote:<br>
                </div>
                <div class="gmail_quote">
                  <blockquote class="gmail_quote" style="margin:0px 0px
                    0px 0.8ex;border-left:1px solid
                    rgb(204,204,204);padding-left:1ex">
                    <div dir="ltr">Then what is the right thing to do
                      here?
                      <div>Use AMD only for rendering, but not for the
                        output. Something like:</div>
                      <div>$ xrandr --setprovideroffloadsink provider
                        sink</div>
                      <div>?</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                    <div
id="gmail-m_7974421917490793411gmail-m_2971641462066569585gmail-m_-1550470071674472515DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
                      <table style="border-top:1px solid
                        rgb(211,212,222)">
                        <tbody>
                          <tr>
                            <td style="width:55px;padding-top:18px"><a
href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"
                                target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png"
                                  alt="" style="width: 46px; height:
                                  29px;" moz-do-not-send="true"
                                  width="46" height="29"></a></td>
                            <td
style="width:470px;padding-top:17px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Без
                              вирусов. <a
href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail"
                                style="color:rgb(68,83,234)"
                                target="_blank" moz-do-not-send="true">www.avg.com</a>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                    <br>
                    <div class="gmail_quote">
                      <div dir="ltr" class="gmail_attr">On Thu, May 14,
                        2020 at 9:52 PM Alex Deucher <<a
                          href="mailto:alexdeucher@gmail.com"
                          target="_blank" moz-do-not-send="true">alexdeucher@gmail.com</a>>
                        wrote:<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px 0.8ex;border-left:1px solid
                        rgb(204,204,204);padding-left:1ex">On Thu, May
                        14, 2020 at 2:47 PM IL Ka <<a
                          href="mailto:kazakevichilya@gmail.com"
                          target="_blank" moz-do-not-send="true">kazakevichilya@gmail.com</a>>
                        wrote:<br>
                        ><br>
                        > Here is what happened:<br>
                        >><br>
                        >> [   347.043] (WW) RADEON(0): No outputs
                        definitely connected, trying again...<br>
                        >> [   347.043] (WW) RADEON(0): Unable to
                        find connected outputs - setting 1024x768
                        initial framebuffer<br>
                        >> [   347.043] (II) RADEON(0): mem size
                        init: gart size :7fbcf000 vram size: s:80000000
                        visible:fbbe000<br>
                        ><br>
                        ><br>
                        > It seems that you have 2 video cards: intel
                        (built into CPU I believe) and ATI.<br>
                        > Intel is connected, not ATI.<br>
                        ><br>
                        > I think you need to enable ATI video card
                        in your BIOS settings.<br>
                        > There should be something like "discrete
                        video card" or "on board video card" switch.<br>
                        <br>
                        Not possible on this system.  The dGPU in
                        question has no display<br>
                        hardware at all so it cannot drive a display. 
                        It can only support<br>
                        render offload.<br>
                        <br>
                        Alex<br>
                      </blockquote>
                    </div>
                  </blockquote>
                </div>
              </div>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Regards,
Sreyan</pre>
  </body>
</html>