Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2025 08:31:36 +0200
From:      Stephan Althaus <Stephan.Althaus@Duedinghausen.eu>
To:        virtualization@freebsd.org
Subject:   Re: bhyve: GPU passthrough for Nvidia cards
Message-ID:  <90515dd4-3aca-45a2-b43e-3d4558ff5e7f@Duedinghausen.eu>
In-Reply-To: <89c5f73c-4b7a-4669-a1cf-d2837c096298@Duedinghausen.eu>
References:  <4785074a005d66ed92e5670b9fa4ce45a5d65eba.camel@FreeBSD.org> <c0cf8b11-3e21-4296-860c-17b87c9f2588@Duedinghausen.eu> <CAFDf7U%2BOCnez3YRtjAcSssdvdDCVqFyZxPZ3mXpxgD2WLNUuGg@mail.gmail.com> <89c5f73c-4b7a-4669-a1cf-d2837c096298@Duedinghausen.eu>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 6/27/25 08:00, Stephan Althaus wrote:
> On 6/26/25 23:47, Nuno Teixeira wrote:
>> Hello Stephan,
>>
>> A year a go I did try passtrhu a dedicated nvidia GTX 1650 while 
>> using integrated intel graphics (laptop Lenovo Legion 5 15IMH05). 
>> Windows detected card but nvidia drivers install failed at some point.
>> On this laptop I did setup bios to use integrated graphics so I can 
>> passthru dedicated nvidia.
>>
>> Think I will give a new try since I follow main.
>>
>> Are you using laptops for this usecase?
>>
>> Thanks!
>>
>> Stephan Althaus <Stephan.Althaus@duedinghausen.eu> escreveu (quinta, 
>> 26/06/2025 à(s) 15:50):
>>
>>     On 6/26/25 15:07, Corvin Köhne wrote:
>>     > Hi,
>>     >
>>     > I'm currently experimenting with GPU passthrough for Nvidia
>>     cards. All I have to
>>     > do to make it work with Ubuntu guests, is setting the INTPIN
>>     register to any
>>     > value instead of just 0x00. Unfortunately, I'm unfamiliar with
>>     PCI legacy
>>     > interrupts and how they work. The INTLINE register is set to
>>     0xFF (unconnected).
>>     > So, is it safe to set the INTPIN register or what has to be
>>     done for it to work
>>     > as expected?
>>     >
>>     > Any help would be appreciated.
>>     >
>>     >
>>     Hi!
>>
>>     You surely mean 'newer' NVidia cards, as my GT1030 works with
>>     FreeBSD
>>     14.2 Host and ubuntu guest, NVIdia driver 570, (and Win guest btw)
>>     out-of-the-box, no kernel/driver modding...
>>
>>     Regards,
>>
>>     Stephan
>>
>>
>>
>>
>>
>> -- 
>> Nuno Teixeira
>> FreeBSD UNIX: <eduardo@FreeBSD.org>  Web: https://FreeBSD.org 
>> <https://FreeBSD.org>;
>
> Hello!
>
> Oh, laptops... With this "Optimus"-called feature i am not shure if it 
> will work...
>
> But i think it's worth trying.
>
> Maybe you will need the GPU ROM. 
> (https://forums.FreeBSD.org/threads/current-state-of-bhyve-nvidia-passthrough.88244/post-706455)
>
> Good luck!
>
> Stephan
>
>
Hi!

Whilst trying to get it to work, i would suggest to always shut the host 
down, not only restart the guest/vm, to be on the safe side.

There may be side effects regarding the initialization of the GPU..

When you have a working setup, this may change and you may can reboot 
the vm and have always a working GPU, maybe..

Regards,

Stephan

[-- Attachment #2 --]
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 6/27/25 08:00, Stephan Althaus
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:89c5f73c-4b7a-4669-a1cf-d2837c096298@Duedinghausen.eu">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">On 6/26/25 23:47, Nuno Teixeira
        wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:CAFDf7U+OCnez3YRtjAcSssdvdDCVqFyZxPZ3mXpxgD2WLNUuGg@mail.gmail.com">
        <meta http-equiv="content-type"
          content="text/html; charset=UTF-8">
        <div dir="ltr">
          <div>
            <div>
              <div>
                <div>
                  <div>Hello Stephan,<br>
                    <br>
                  </div>
                  A year a go I did try passtrhu a dedicated nvidia GTX
                  1650 while using integrated intel graphics (laptop
                  Lenovo Legion 5 15IMH05). Windows detected card but
                  nvidia drivers install failed at some point.<br>
                </div>
                On this laptop I did setup bios to use integrated
                graphics so I can passthru dedicated nvidia.<br>
                <br>
              </div>
              Think I will give a new try since I follow main.<br>
              <br>
            </div>
            Are you using laptops for this usecase?<br>
            <br>
          </div>
          Thanks!</div>
        <br>
        <div class="gmail_quote gmail_quote_container">
          <div dir="ltr" class="gmail_attr">Stephan Althaus &lt;<a
              href="mailto:Stephan.Althaus@duedinghausen.eu"
              moz-do-not-send="true" class="moz-txt-link-freetext">Stephan.Althaus@duedinghausen.eu</a>&gt;
            escreveu (quinta, 26/06/2025 à(s) 15:50):<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
            6/26/25 15:07, Corvin Köhne wrote:<br>
            &gt; Hi,<br>
            &gt;<br>
            &gt; I'm currently experimenting with GPU passthrough for
            Nvidia cards. All I have to<br>
            &gt; do to make it work with Ubuntu guests, is setting the
            INTPIN register to any<br>
            &gt; value instead of just 0x00. Unfortunately, I'm
            unfamiliar with PCI legacy<br>
            &gt; interrupts and how they work. The INTLINE register is
            set to 0xFF (unconnected).<br>
            &gt; So, is it safe to set the INTPIN register or what has
            to be done for it to work<br>
            &gt; as expected?<br>
            &gt;<br>
            &gt; Any help would be appreciated.<br>
            &gt;<br>
            &gt;<br>
            Hi!<br>
            <br>
            You surely mean 'newer' NVidia cards, as my GT1030 works
            with FreeBSD <br>
            14.2 Host and ubuntu guest, NVIdia driver 570, (and Win
            guest btw)<br>
            out-of-the-box, no kernel/driver modding...<br>
            <br>
            Regards,<br>
            <br>
            Stephan<br>
            <br>
            <br>
            <br>
          </blockquote>
        </div>
        <div><br clear="all">
        </div>
        <br>
        <span class="gmail_signature_prefix">-- </span><br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div><font color="#888888">Nuno Teixeira</font></div>
            <div>
              <div><font color="#888888"> FreeBSD UNIX:  <a
                    class="moz-txt-link-rfc2396E"
                    href="mailto:eduardo@FreeBSD.org"
                    moz-do-not-send="true">&lt;eduardo@FreeBSD.org&gt;</a> 
                   Web:  <a href="https://FreeBSD.org" rel="noreferrer"
                    target="_blank" moz-do-not-send="true">https://FreeBSD.org</a><br>;
                </font></div>
            </div>
          </div>
        </div>
      </blockquote>
      <p>Hello!</p>
      <p>Oh, laptops... With this "Optimus"-called feature i am not
        shure if it will work...</p>
      <p>But i think it's worth trying.</p>
      <p>Maybe you will need the GPU ROM.
        (<a class="moz-txt-link-freetext"
href="https://forums.FreeBSD.org/threads/current-state-of-bhyve-nvidia-passthrough.88244/post-706455"
          moz-do-not-send="true">https://forums.FreeBSD.org/threads/current-state-of-bhyve-nvidia-passthrough.88244/post-706455</a>)</p>;
      <p>Good luck!</p>
      <p>Stephan</p>
      <p><br>
      </p>
    </blockquote>
    <p>Hi!</p>
    <p>Whilst trying to get it to work, i would suggest to always shut
      the host down, not only restart the guest/vm, to be on the safe
      side.</p>
    <p>There may be side effects regarding the initialization of the
      GPU..</p>
    <p>When you have a working setup, this may change and you may can
      reboot the vm and have always a working GPU, maybe..</p>
    <p>Regards,</p>
    <p>Stephan</p>
  </body>
</html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90515dd4-3aca-45a2-b43e-3d4558ff5e7f>