From nobody Thu Dec 21 07:50:28 2023 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SwjKD0hzSz54THv for ; Thu, 21 Dec 2023 07:50:40 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SwjKC6sryz3HrB for ; Thu, 21 Dec 2023 07:50:39 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703145040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SmpY2HVj0HHTDmab0TZkT8SHfeYS1Hhuly0zwFOxKUU=; b=jQszv+wn7APQB5D/DjMJqADQ71IXWuP8SFV7bi5OvgW4kY4nP/bbKhRo779CEf8AVJV2go toYEcPHkGpiU/SbrFBuu+ZqhaTXr6iCHP+2YhM1PWUb3sixjGl4NNPnIpCUGgH3L7s12ta eBDssnVDtEjTE9eyaEjMfKvj+HQavN2uuAjxJjVja96eJDsSHSktA3UyX6mq6j0mTHJzII mxOPG1nkJy2Pql1dkwcOhB+JBkKIX323EnrohHj8XNcGRv1pDGiygQfG/rN1XSkVzMUTlK U8OlrcDpqyHbdn0ikyz6icwCBd0oCRIrJ7GxZEc6JRtJW61xt7SDTG/MiYE8Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703145040; a=rsa-sha256; cv=none; b=eGZGtw198xpvAkAk7DsbFz9D7fGT8bAYuPBT3tBifAfvA+w38wcWpQpBmXd7wcY8eys8eD BcAIrBdntaYbUV4KJc9fniR/zEpfSHOxL5Y47vGzCMRm477iNMU6PBXTpMesKYECBUMeSP umK3favwfS4TZPcEFJl5iERxvJA3sEJwDOatPUtgtydZtlqf8FpnXdTbJ/kitj4U1GlckA +nOziashIEclTlFRWmo8IKrW+AA16f0QuRDDsAJwZ9bb80BQEHNpCrCfx3UIyNPlwZXtV/ xSjjBoLFjkV+Ppb4dqJKEAuU3RWW2s6aMEeLqH0kFUIbzmG/6fV97HlEooLfyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703145040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SmpY2HVj0HHTDmab0TZkT8SHfeYS1Hhuly0zwFOxKUU=; b=Yj3y0zFbwo8lsZy15xsITuouHAJAnRIQqfGtPDAWKclRiY4FngkZqOqPdhGqi+zxXZj2jS ubo4TiOtpmMVKlWwCyjsFRG/uccHtIIPm7xkNeJtwKH9s8auBM2YQbaBoTMKfUnZUSSaqk UEP6uTibyzcGa7m7b6qWyGdRT6iBOelTq8o0MbtiDq4tvxvolGTVv1gVY8V8SniMVRtfo/ r6SbPkPz+hPk8RYzdVqVbAGWb8KeWLb6RXpcOzPlAhdPNZHdi1pyJRVog8VIHcMUz1jXvg rGMyCS9hpLrDf3Nqll+NsiQIrkQAtSrElNt+iSKjGS5Asl81BFwJNQ5H41C4tQ== Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SwjKC5pc6z11WC for ; Thu, 21 Dec 2023 07:50:39 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-4277c62426fso3187291cf.1 for ; Wed, 20 Dec 2023 23:50:39 -0800 (PST) X-Gm-Message-State: AOJu0YzOhFTF/xzbZr1PIuBK4rGuesQTcyq/oVJ4iXkvth3VX2FKj42m Jhdyum35BIiilpL64w8WtYZzr7OfLGGgGL4DS4w= X-Google-Smtp-Source: AGHT+IEbXuIcamYsK9BgTMcodROw7hoByXcKHacZWzHyPf1FXum0UQQ5+SjJvIh2w+JpgAY6/CYbx0EvOGXI7+w+7o8= X-Received: by 2002:a05:622a:181b:b0:425:4043:1d91 with SMTP id t27-20020a05622a181b00b0042540431d91mr5754088qtc.100.1703145039241; Wed, 20 Dec 2023 23:50:39 -0800 (PST) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 References: <101df7552fd1673ddc73e14daf518630402129c4.camel@FreeBSD.org> <6837a1f2-9b28-4a49-8db6-f410853518e2@Duedinghausen.eu> In-Reply-To: <6837a1f2-9b28-4a49-8db6-f410853518e2@Duedinghausen.eu> From: Nuno Teixeira Date: Thu, 21 Dec 2023 07:50:28 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bhyve nvidia gtx-1650 mobile passthru on win11 To: virtualization@freebsd.org Content-Type: multipart/alternative; boundary="00000000000010a810060d005b76" --00000000000010a810060d005b76 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Stephan, Yes, I can't run nvidia when "dynamic graphics" are enabled on bios, but I will continue to search if there is some config tweak for it. I've just found and I'm reading about a setup identical to mine (hybrid mode): https://forums.freebsd.org/threads/how-to-nvidia-in-hybrid-mode.90473/ I will post my results soon. Cheers, Stephan Althaus escreveu no dia quarta, 20/12/2023 =C3=A0(s) 19:58: > On 12/20/23 11:02, Nuno Teixeira wrote: > > Hi Corvin, > > intel: >> Requires a patched EDKII firmware [3]. Unfortunately, it's not merged >> yet. Btw. even if you only have an Intel card available you can use it >> for GPU passthrough. > > > I'm runing a laptop with intel graphics dynamics + dedicated nvidia > (Lenovo Legion 5i) and I'm thinking giving a try intel passtrhu: > > ### > vgapci1@pci0:*0:2:0*: class=3D0x030000 rev=3D0x05 hdr=3D0x00 vendor= =3D0x8086 > device=3D0x9bc4 subvendor=3D0x17aa subdevice=3D0x3fa5 > vendor =3D 'Intel Corporation' > device =3D 'CometLake-H GT2 [UHD Graphics]' > class =3D display > subclass =3D VGA > > vgapci0@pci0:*1:0:0*: class=3D0x030000 rev=3D0xa1 hdr=3D0x00 vendor= =3D0x10de > device=3D0x1f99 subvendor=3D0x17aa subdevice=3D0x3fa5 > vendor =3D 'NVIDIA Corporation' > device =3D 'TU117M [GeForce GTX 1650 Mobile / Max-Q]' > class =3D display > subclass =3D VGA > ### > > /boot/loader.conf: > vmm_load=3D"YES" > pptdevs=3D"*0/2/0*" > > etc/X11/xorg.conf.d/20-drivers.conf: > Section "Device" > Identifier "Card0" > Driver "nvidia" > BusID "PCI:*1:0:0*" > EndSection > > bhyve: > -s 6:0,passthru,*0/2/0* > (vm-bhyve vm config: > passthru0=3D"*0/2/0*") > > I've already did this: > - ppt gets configured for intel > - xorg doesn't start with xorg "nvidia" config > - xorg starts with scfb (with empty xorg config) > - start vm and crashes my laptop > > I'm just looking for the correct setup to try it again when EDKII firmwar= e > gets updated/patched. > > Thanks, > -- > Nuno Teixeira > FreeBSD Committer (ports) > > Hi Nuno! > If the laptops GPU setup is like "optimus" you will encounter problems > runing Xorg on your nvidia GPU. > I have a DELL 7720 with dedicated physical ports from the nvidia card to > the display output(s), running Xorg on nvidia here but having the intel > part _disabled_ in BIOS. > These mobile dual GPU setups aren't that easy like multiple PCIe cards in > a desktop "PC"... > > But maybe there is a solution for your laptop somewhere.. > > Regards, > Stephan > > --=20 Nuno Teixeira FreeBSD Committer (ports) --00000000000010a810060d005b76 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Stephan,

Yes, I can= 9;t run nvidia when "dynamic graphics" are enabled on bios, but I= will continue to search if there is some config tweak for it.

I've just found and I'm reading about a setup iden= tical to mine (hybrid mode):

I w= ill post my results soon.

Cheers,
<= br>
Stephan= Althaus <Stephan.Al= thaus@duedinghausen.eu> escreveu no dia quarta, 20/12/2023 =C3=A0(s)= 19:58:
=20 =20 =20
On 12/20/23 11:02, Nuno Teixeira wrote:
=20
Hi Corvin,

intel:
Requires a patched EDKII firmware [3]. Unfortunately, it's not merged
yet. Btw. even if you only have an Intel card available you can use it
for GPU passthrough.

I'm runing a laptop with intel graphics dynamics=C2=A0+ dedicated nvidia (Lenovo Legion 5i) and I'm thinking giving a try intel passtrhu:

###
vgapci1@pci0:0:2:0: =C2=A0 =C2=A0 class=3D0x030000 r= ev=3D0x05 hdr=3D0x00 vendor=3D0x8086 device=3D0x9bc4 subvendor=3D0x17aa subdevice=3D0x3fa5
=C2=A0 =C2=A0 vendor =C2=A0 =C2=A0 =3D 'Intel Corporation&#= 39;
=C2=A0 =C2=A0 device =C2=A0 =C2=A0 =3D 'CometLake-H GT2 [UH= D Graphics]'
=C2=A0 =C2=A0 class =C2=A0 =C2=A0 =C2=A0=3D display
=C2=A0 =C2=A0 subclass =C2=A0 =3D VGA

vgapci0@pci0:1:0:0: =C2=A0 =C2=A0 class=3D0x030000 re= v=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=3D0x1f99 subvendor=3D0x17aa subdevice=3D0x3fa5
=C2=A0 =C2=A0 vendor =C2=A0 =C2=A0 =3D 'NVIDIA Corporation&= #39;
=C2=A0 =C2=A0 device =C2=A0 =C2=A0 =3D 'TU117M [GeForce GTX= 1650 Mobile / Max-Q]'
=C2=A0 =C2=A0 class =C2=A0 =C2=A0 =C2=A0=3D display
=C2=A0 =C2=A0 subclass =C2=A0 =3D VGA
###

/boot/loader.conf:
vmm_load=3D"YES"
pptdevs=3D"0/2/0"

etc/X11/xorg.conf.d/20-drivers.conf:
Section "Device"
=C2=A0=C2=A0=C2=A0 Identifier "Card0"
=C2=A0=C2=A0=C2=A0 Driver "nvidia"
=C2=A0=C2=A0=C2=A0 BusID =C2=A0"PCI:1:0:0"
EndSection

bhyve:
-s 6:0,passthru,0/2/0
(vm-bhyve vm config:
=C2=A0passthru0=3D"0/2/0")

I've already did this:=C2=A0
- ppt gets configured for intel
- xorg doesn't start with xorg "nvidia" config=
- xorg starts with scfb (with empty xorg config)
- start vm and crashes my laptop

I'm just looking for the correct setup to try it again when EDKII firmware gets updated/patched.

Thanks,
--
Nuno Teixeira
FreeBSD Committer (ports)

Hi Nuno!
If the laptops GPU setup is like "optimus" you will encount= er problems runing Xorg on your nvidia GPU.
I have a DELL 7720 with dedicated physical ports from the nvidia card to the display output(s), running Xorg on nvidia here but having the intel part _disabled_ in BIOS.
These mobile dual GPU setups aren't that easy like multiple PCIe cards in a desktop "PC"...

But maybe there is a solution for your laptop somewhere..

Regards,
Stephan



--
Nuno Teixeira
FreeBSD Committ= er (ports)
--00000000000010a810060d005b76--