From nobody Sun Dec 04 09:40:25 2022 X-Original-To: hackers@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 4NQ1s30kPLz4jwl4; Sun, 4 Dec 2022 09:41:11 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4NQ1s30S00z3QPJ; Sun, 4 Dec 2022 09:41:11 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670146871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=t1/Ygguzvm9+aQHR+aMJxctEXO21jqeYxYZq/Z0HvT4=; b=CYAoYFfqdozTV/wxRDCPZW9pTRmZtag+TmJsGrSZHmzRopeA5/pkWhFyryhcAyEAUNqGty AdJpyht3t6pRa6+y0JWo9gNpLRziYHcMQUhrXX9K4IuXYUwSCL9cCOWOZ+ppiid0pRP4OB jQe071D5zWGKt/xGOIvGxIKddRqv2hwkl9eQi/duz5GRw2Q6q2on9T0K67dp7n+vfXkJFc aqPtMxWGJILh0F5fYxBg/gpFws7alIGBaAHXN5+Bbse6uVcsZ7uOV05HYVgHMv1+snTAnG aHyHhFvKSlhKBxa6/P2BAr0hWP6LC3mAQcDl0QDCCPDyGxx/iFCPc9PkkPUYvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670146871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=t1/Ygguzvm9+aQHR+aMJxctEXO21jqeYxYZq/Z0HvT4=; b=evkgQHTskZQqQW6RBnyKneT814RbMU6PNChnNG4EkAv4PmZyfMhfU8j/cPaN5dpNlZsX2/ ALO6NJjQV5dFAW4Wattah9zlxA+KOQ280/dQgZaFJKs0rU/RM4hxlsz41ggnJuov5kFcAG Epnsy02WfakrsmvHJkO21HNEDFsqF1WKuDfxQlPyEIvbjsNIL1ob9Sm0rWWbrZKK6WqhG1 xDTp2am7/GWFhLehXtCiIwfimbhEpodDVghgrgqt/YqVE3Z3ac0xyJSe3JHGX7jPPbYceT wozYMG7R3wY8J7Y8o/n/mffnHoeud1D0gHANtRrN5BZQW5JgGdHi2JFmPy2gRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670146871; a=rsa-sha256; cv=none; b=fG0ogEf+Ik8/7Mz5IrukPcUKk5tUy20MtSTVVLN4WyjZjfNKXb9WFfIFoAt72KzLC4C8pY M0WGalrsa0PLuGLGn+zz1NKaZospS88+UQetUXUd5HUaCXlB3S/6OxD+qtQ3czEtpxsNaP tIg76dUKxaMTkQYPgcuMQCmrYylPRcWX+E397p7DjQpO8NuLf8lCx/K0o/K04VzU4A6rGQ SHDnx9QUAZvTK1sh6vBDp+0twbTj3nH0hG1SpfU6zLJ8GiG/vF34Qh/ewKUqfRMVvgoaQX jdP+GEs4CpY8s4gtpAyH+xFdgjrD6juEeCRZ3vA8iDdiiqq6rtQNxu8pgRNeOg== Received: from [IPv6:::1] (p2003000601dfc6751d51642e08063309.dip0.t-ipconnect.de [IPv6:2003:6:1df:c675:1d51:642e:806:3309]) (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 did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NQ1rx6sr0zSBc; Sun, 4 Dec 2022 09:41:05 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Date: Sun, 04 Dec 2022 10:40:25 +0100 From: =?ISO-8859-1?Q?Corvin_K=F6hne?= To: Mario Marietto , =?ISO-8859-1?Q?Corvin_K=F6hne?= CC: virtualization@freebsd.org, freebsd-x11+help@freebsd.org, FreeBSD virtualization , hackers@freebsd.org Subject: =?US-ASCII?Q?Re=3A_How_to_use_the_framebuffer_?= =?US-ASCII?Q?as_primary_video_device_instead?= =?US-ASCII?Q?_of_the_nvidia_passed-through_g?= =?US-ASCII?Q?raphic_card_in_a_bhyve/linux_vm?= User-Agent: K-9 Mail for Android In-Reply-To: References: <2E8B4BF7-A39E-4B93-820D-FC66F8C2F94B@FreeBSD.org> Message-ID: Autocrypt: addr=corvink@FreeBSD.org; keydata= mQINBGNjZaIBEADDTrDNf+0pwiuRPBdClcnZW83dH1UhuOi0u+A1J2SatEBbNaFVtXXAavewCTuy V/ZbNidjlhq3R/pWyiKjFKvs5dj7PMCw+3z2D5OWpMdHg7TrB+fbdFPOEsu0zQVKNaO+pSKCfN0R e0m7bL3wuvl7PXvBufRwA3Guo1P4j3TXWaEkuso7VupTvE25zVGg9ONHrGOjA9RUy+Yg4Se3NLgt UdjBgA21SBQTDvRQV4fDmVenlwvWeE0Xm8FcDcpQb6sJTihaDku78mi3Ux1HCk7rTcepVEB0xIB6 qmFxv0sLlDmVv6Z6qg1y/Q5m23Pgz60o3TulMPV4F+3Itm8ifU+wgVSzBZbD29GYkd7LKqMkFbhv fSBk+5db3vbYY5OD//+LTM5AV7e2AhXuXMvG1UNBqXqSJTTSy6KZz+qmPQO0zos0dq46p8o82lKi BEGD2Hu0p+u0OyV+MmRYo1NIBFVbOPXp2MvUVl5II0UIJ3+N9gL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maI 82QxJuJjb5NJ6bgS+HPIUH8J1Iw958y/Rs5svzKW+/YYoZBDuhtbAeoJdiy7a7wtK6pBv+xMdpmK LBgVVXOeX6sucwJ/K68tb5aOmbuPLAaIoKgm/9IF8dqiI23JoM2ZhpYZjpVMpakGIxV6R4Kp2hrq C4oNpuVLJ7LQSMuocXduguvWYdYvVXSdpC1Ed+fLtFXA0h5fhDqHFDCDM2CgQX2DfzXe/rV7vChm 61fQYn+85md1vPiefnsaunEh3+cbcFfIshNmIRfAKwA2//75eqgBuC2D5ZIr93LsEUCcabnQZdaZ KGSo/ruWNZdPyjj/b6MhAifkoFFrkN4/dwIqYIev8wMbh3+7dcZIRza0foM= List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: multipart/signed; boundary="----RVWP21E210Y1WYVOOQ949O2E7KPGYQ"; protocol="application/pgp-signature"; micalg="pgp-sha512" X-ThisMailContainsUnwantedMimeParts: N ------RVWP21E210Y1WYVOOQ949O2E7KPGYQ Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary=----H6FBY8VGI8VXKDMZYDEM5KZVWOX61O ------H6FBY8VGI8VXKDMZYDEM5KZVWOX61O Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On December 3, 2022 7:14:29 PM GMT+01:00, Mario Marietto wrote: >ok=2E I tried like this,but it didn't work : > >bhyve -S -c sockets=3D1,cores=3D2,threads=3D2 -m 4G -w -H -A \ >-s 0,hostbridge \ >-s 2,virtio-blk,/mnt/$vmdisk1'p2'/bhyve/img/Linux/ubuntu2210=2Eimg,bootin= dex=3D1 \ >-s 3,virtio-blk,/dev/$vmdisk4 \ >-s 4,virtio-blk,/dev/$vmdisk2 \-s 7,fbuf,tcp=3D0=2E0=2E0=2E0:5919,w=3D160= 0,h=3D950,wait \ >-s 8:0,passthru,2/0/0 \ >-s 8:1,passthru,2/0/1 \ >-s 8:2,passthru,2/0/2 \ >-s 8:3,passthru,2/0/3 \ >-s 10,virtio-net,tap19 \ >-s 11,virtio-9p,sharename=3D/ \ >-s 30,xhci,tablet \ >-s 31,lpc \ >-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE=2Efd \ >vm0:19 < /dev/null & sleep 2 && vncviewer 0:19 > >I tried specifying the bus ID of the framebuffer and I have used this >xorg=2Econf file : > >Section "Files" > ModulePath "/usr/lib/xorg/modules" > FontPath "/usr/share/fonts/X11/misc" > FontPath "/usr/share/fonts/X11/cyrillic" > FontPath "/usr/share/fonts/X11/100dpi/:unscaled" > FontPath "/usr/share/fonts/X11/75dpi/:unscaled" > FontPath "/usr/share/fonts/X11/Type1" > FontPath "/usr/share/fonts/X11/100dpi" > FontPath "/usr/share/fonts/X11/75dpi" > FontPath "built-ins" >EndSection > >Section "Module" > Load "vnc" > Load "glx" >EndSection > > >Section "InputDevice" > Identifier "Keyboard0" > Driver "kbd" >EndSection > >Section "InputDevice" > Identifier "Mouse0" > Driver "mouse" > Option "Protocol" "auto" > Option "Device" "/dev/input/mice" > Option "ZAxisMapping" "4 5 6 7" > >EndSection > >Section "Monitor" > Identifier "Monitor0" > VendorName "Monitor Vendor" > ModelName "Monitor Model" >EndSection > >Section "Device" > Identifier "Card0" > Driver "modesetting" > BusID "PCI:0:7:0" > >EndSection > >Section "Screen" > Identifier "Screen0" > Device "Card0" > Monitor "Monitor0" > SubSection "Display" > Viewport 0 0 > Depth 1 > EndSubSection > SubSection "Display" > Viewport 0 0 > Depth 4 > EndSubSection > SubSection "Display" > Viewport 0 0 > Depth 8 > EndSubSection > SubSection "Display" > Viewport 0 0 > Depth 15 > EndSubSection > SubSection "Display" > Viewport 0 0 > Depth 16 > EndSubSection > SubSection "Display" > Viewport 0 0 > Depth 24 > EndSubSection >EndSection > >The error reported has been : > >https://ibb=2Eco/1KX2h26 >https://ibb=2Eco/Cv5FffB > >thanks=2E > >Il giorno sab 3 dic 2022 alle ore 17:34 Corvin K=C3=B6hne >ha scritto: > >> On December 3, 2022 4:49:46 PM GMT+01:00, Mario Marietto < >> marietto2008@gmail=2Ecom> wrote: >>> >>> Hello to everyone=2E >>> >>> what Im trying to do is to set the framebuffer video adapter as primar= y >>> graphic card on my bhyve-ubuntu vm instead of the nvidia RTX 2080 ti c= ard >>> that I have passed through=2E What I want to do really is to use both = the >>> graphic adapters,but the primary should be the framebuffer and the >>> secondary the nvidia=2E I tried different Xorg configurations,but what= I've >>> got is that Xorg failed to display some errors=2E So,the controller th= at you >>> see below should be used as primary inside the ubuntu vm : >>> >>> 00:1d=2E0 VGA compatible controller: Device fb5d:40fb >>> >>> while the ones you see below as secondary : >>> >>> 08:00=2E0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce= RTX 2080 Ti] (rev a1) >>> 08:00=2E1 Audio device: NVIDIA Corporation TU102 High Definition Audio= Controller (rev a1) >>> 08:00=2E2 USB controller: NVIDIA Corporation TU102 USB 3=2E1 Host Cont= roller (rev a1) >>> 08:00=2E3 Serial bus controller: NVIDIA Corporation TU102 USB Type-C U= CSI Controller (rev a1) >>> >>> >>> The script that I use to launch the vm is the following : >>> >>> #!/bin/sh >>> setxkbmap it >>> vms=3D"$(ls /dev/vmm/*)" >>> vncs=3D"$(ps ax | awk '/vncviewer [0]/{print $6}')" >>> >>> for vm in $vms; do >>> session=3D"${vm##*/}" >>> echo "bhyve session =3D $session" >>> echo "vnc session =3D $vncs" >>> if ! printf '%s\n' "${vncs}" | grep "${session}"; then >>> printf 'VNC session not found,destroyi= ng ghost vms\n' >>> bhyvectl --vm=3D$session --destroy >>> else >>> printf 'Found VNC session %s\n' "${ses= sion},no ghost vms found,not destroying them" >>> fi >>> done >>> >>> vmdisk1=3D`geom disk list | awk '/^Geom name: /{d=3D$NF} /^ *ident: (2= 015020204055E)/ && d{print d}'` >>> echo "TOSHIBA External USB 3=2E0 1=2E8 TB ; $vmdisk1" >>> >>> mount -t ufs /dev/$vmdisk1'p2' /mnt/$vmdisk1'p2' >>> >>> bhyve -S -c sockets=3D1,cores=3D2,threads=3D2 -m 4G -w -H -A \ >>> -s 0,hostbridge \ >>> -s 2,virtio-blk,/mnt/$vmdisk1'p2'/bhyve/img/Linux/ubuntu2210=2Eimg,boo= tindex=3D1 \ >>> -s 3,virtio-blk,/dev/$vmdisk4 \ >>> -s 4,virtio-blk,/dev/$vmdisk2 \ >>> -s 8:0,passthru,2/0/0 \ >>> -s 8:1,passthru,2/0/1 \ >>> -s 8:2,passthru,2/0/2 \ >>> -s 8:3,passthru,2/0/3 \ >>> -s 10,virtio-net,tap19 \ >>> -s 11,virtio-9p,sharename=3D/ \ >>> -s 29,fbuf,tcp=3D0=2E0=2E0=2E0:5919,w=3D1600,h=3D950,wait \ >>> -s 30,xhci,tablet \ >>> -s 31,lpc \ >>> -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE=2Efd \ >>> vm0:19 < /dev/null & sleep 2 && vncviewer 0:19 >>> >>> For sure ,on /boot/loader=2Econf I've added : >>> >>> /boot/loader=2Econf >>> >>> pptdevs=3D"2/0/0 2/0/1 2/0/2 2/0/3" >>> >>> As I said before,I tried two xorg conf files to achieve the goal=2E On= the >>> first one I tried to add only the framebuffer,like this : >>> >>> >>> Section "Files" >>> ModulePath "/usr/lib/xorg/modules" >>> FontPath "/usr/share/fonts/X11/misc" >>> FontPath "/usr/share/fonts/X11/cyrillic" >>> FontPath "/usr/share/fonts/X11/100dpi/:unscaled" >>> FontPath "/usr/share/fonts/X11/75dpi/:unscaled" >>> FontPath "/usr/share/fonts/X11/Type1" >>> FontPath "/usr/share/fonts/X11/100dpi" >>> FontPath "/usr/share/fonts/X11/75dpi" >>> FontPath "built-ins" >>> EndSection >>> >>> Section "Module" >>> Load "vnc" >>> Load "glx" >>> EndSection >>> >>> >>> Section "InputDevice" >>> Identifier "Keyboard0" >>> Driver "kbd" >>> EndSection >>> >>> Section "InputDevice" >>> Identifier "Mouse0" >>> Driver "mouse" >>> Option "Protocol" "auto" >>> Option "Device" "/dev/input/mice" >>> Option "ZAxisMapping" "4 5 6 7" >>> >>> EndSection >>> >>> Section "Monitor" >>> Identifier "Monitor0" >>> VendorName "Monitor Vendor" >>> ModelName "Monitor Model" >>> EndSection >>> >>> Section "Device" >>> Identifier "Card0" >>> Driver "modesetting" >>> BusID "PCI:0:29:0" >>> >>> EndSection >>> >>> Section "Screen" >>> Identifier "Screen0" >>> Device "Card0" >>> Monitor "Monitor0" >>> SubSection "Display" >>> Viewport 0 0 >>> Depth 1 >>> EndSubSection >>> SubSection "Display" >>> Viewport 0 0 >>> Depth 4 >>> EndSubSection >>> SubSection "Display" >>> Viewport 0 0 >>> Depth 8 >>> EndSubSection >>> SubSection "Display" >>> Viewport 0 0 >>> Depth 15 >>> EndSubSection >>> SubSection "Display" >>> Viewport 0 0 >>> Depth 16 >>> EndSubSection >>> SubSection "Display" >>> Viewport 0 0 >>> Depth 24 >>> EndSubSection >>> EndSection >>> >>> >>> but it didn't work=2E This is the log file that shows the errors repor= ted : https://pastebin=2Eubuntu=2Ecom/p/Gv7wgsDR4K/ >>> I have also removed the xorg=2Econf file,but it didn't work either=2E = This is the log file that shows the errors reported : >>> >>> >>> https://pastebin=2Eubuntu=2Ecom/p/wNcfQTByQm/ >>> >>> Can someone give me some suggestions that can help me to understand wh= ere the mistake is,please,thanks=2E >>> >>> -- >>> Mario=2E >>> >> >> Try to assign a lower pci slot number to the framebuffer device than to >> the nvidia gpu in your bhyve command=2E >> -- >> Best regards, >> Corvin >> > > >--=20 >Mario=2E I'm unfamiliar with X but according to your logs it looks like it selects = the framebuffer device as primary graphics in the first place: (--) PCI:*(0@0:7:0) =2E=2E=2E (--) PCI: (0@0:8:0) =2E=2E=2E --=20 Best regards, Corvin ------H6FBY8VGI8VXKDMZYDEM5KZVWOX61O Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On December 3, 2022 7:1= 4:29 PM GMT+01:00, Mario Marietto <marietto2008@gmail=2Ecom> wrote:
ok=2E I tried like this,but it didn't work :
bhyve -S -c sockets=3D1,cores=3D2,threads=3D2 -m =
4G -w -H -A \
-s 0,hostbridge \
-s 2,virtio-blk,/mnt/$vmdisk1'p2'/bhyve/img/Linux/ubuntu2210=2Eimg,bootind=
ex=3D1 \
-s 3,virtio-blk,/dev/$vmdisk4 \
-s 4,virtio-blk,/dev/$vmdisk2 \
-s 7,fbuf,tcp=3D0=2E0=2E0=2E0:5919,w=3D1600,h=3D950,wait \
-s 8:0,passthr= u,2/0/0 \ -s 8:1,passthru,2/0/1 \ -s 8:2,passthru,2/0/2 \ -s 8:3,passthru,2/0/3 \ -s 10,virtio-net,tap19 \ -s 11,virtio-9p,sharename=3D/ \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE=2Efd \ vm0:19 < /dev/null & sleep 2 && vncviewer 0:19

I tried specifying the bus ID of the framebuffer and I h= ave used this xorg=2Econf file :

=
Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/X11/misc"
    FontPath     "/usr/share/fonts/X11/cyrillic"
    FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/Type1"
    FontPath     "/usr/share/fonts/X11/100dpi"
    FontPath     "/usr/share/fonts/X11/75dpi"
    FontPath     "built-ins"
EndSection

Section "Module"
    Load  "vnc"
    Load  "glx"
EndSection


Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/input/mice"
    Option        "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Device"
   Identifier  "Card0"
   Driver      "modesetting"
   BusID       "PCI:0:7:0"

EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection
The error reported has been :
thanks=2E

=
Il giorno sab 3 dic 2022 alle ore 17:= 34 Corvin K=C3=B6hne <corvink@f= reebsd=2Eorg> ha scritto:
On December 3, 2022 4:49= :46 PM GMT+01:00, Mario Marietto <marietto2008@gmail=2Ecom> wrote:
Hello to everyone=2E

what Im trying to do is to set the framebuffer video adapter as primary=20 graphic card on my bhyve-ubuntu vm instead of the nvidia RTX 2080 ti=20 card that I have passed through=2E What I want to do really is to use both the graphic adapters,but the primary should be the framebuffer and the=20 secondary the nvidia=2E I tried different Xorg configurations,but what I'v= e got is that Xorg failed to display some errors=2E So,the controller that you see below should be used as primary inside the ubuntu vm :

00:1d=2E0 VGA compatible controller: Device fb5d:=
40fb

while the ones you see below as secondary :

08:00=2E0 VGA compatible controller: NV=
IDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)
08:00=2E1 Audio device: NVIDIA Corporation TU102 High Definition Audio Con=
troller (rev a1)
08:00=2E2 USB controller: NVIDIA Corporation TU102 USB 3=2E1 Host Controll=
er (rev a1)
08:00=2E3 Serial bus controller: NVIDIA Corporation TU102 USB Type-C UCSI =
Controller (rev a1)

The script that I use to launch the vm is the following :

#!/bin/sh
setxkbmap it
vms=3D"$(ls /dev/vmm/*)"
vncs=3D"$(ps ax | awk '/vncviewer [0]/{print $6}')"

for vm in $vms; do
                session=3D"${vm##*/}"
                echo "bhyve session =3D $session"
                echo "vnc session =3D $vncs"
                if ! printf '%s\n' "${vncs}" | grep "${session}"; then
                                printf 'VNC session not found,destroying g=
host vms\n'
                                bhyvectl --vm=3D$session --destroy        =
                  =20
                else
                                printf 'Found VNC session %s\n' "${session=
},no ghost vms found,not destroying them"
                fi
done

vmdisk1=3D`geom disk list | awk '/^Geom name: /{d=3D$NF} /^ *ident: (20150=
20204055E)/ && d{print d}'`
echo "TOSHIBA External USB 3=2E0 1=2E8 TB ; $vmdisk1"

mount -t ufs /dev/$vmdisk1'p2' /mnt/$vmdisk1'p2'

bhyve -S -c sockets=3D1,cores=3D2,threads=3D2 -m 4G -w -H -A \
-s 0,hostbridge \
-s 2,virtio-blk,/mnt/$vmdisk1'p2'/bhyve/img/Linux/ubuntu2210=2Eimg,bootind=
ex=3D1 \
-s 3,virtio-blk,/dev/$vmdisk4 \
-s 4,virtio-blk,/dev/$vmdisk2 \
-s 8:0,passthru,2/0/0 \
-s 8:1,passthru,2/0/1 \
-s 8:2,passthru,2/0/2 \
-s 8:3,passthru,2/0/3 \
-s 10,virtio-net,tap19 \
-s 11,virtio-9p,sharename=3D/ \
-s 29,fbuf,tcp=3D0=
=2E0=2E0=2E0:5919,w=3D1600,h=3D950,wait \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE=2Efd \
vm0:19 < /dev/null & sleep 2 && vncviewer 0:19

For sure ,on /boot/load= er=2Econf I've added :

/boot/loader=2Econf

pptdevs=3D"2/0/0 2/0/1 2/0/2 2/0/3"

As I said before,I trie= d two xorg conf files to achieve the goal=2E On the first one I tried to add only the framebuffer,like this :

Section "Files" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/X11/cyrillic" FontPath "/usr/share/fonts/X11/100dpi/:unscaled" FontPath "/usr/share/fonts/X11/75dpi/:unscaled" FontPath "/usr/share/fonts/X11/Type1" FontPath "/usr/share/fonts/X11/100dpi" FontPath "/usr/share/fonts/X11/75dpi" FontPath "built-ins" EndSection Section "Module" Load "vnc" Load "glx" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5 6 7" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" EndSection Section "Device" Identifier "Card0" Driver "modesetting" BusID "PCI:0:29:0" EndSection Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" SubSection "Display" Viewport 0 0 Depth 1 EndSubSection SubSection "Display" Viewport 0 0 Depth 4 EndSubSection SubSection "Display" Viewport 0 0 Depth 8 EndSubSection SubSection "Display" Viewport 0 0 Depth 15 EndSubSection SubSection "Display" Viewport 0 0 Depth 16 EndSubSection SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection


b= ut it didn't work=2E This is the log file that shows the errors reported : = https://pastebin=2Eubuntu=2Ecom/p/Gv7wgsDR4K= /
I have a= lso removed the xorg=2Econf file,but it didn't work either=2E This is the l= og file that shows the errors reported :


https://pastebi= n=2Eubuntu=2Ecom/p/wNcfQTByQm/

Can someone give me som= e suggestions that can help me to understand where the mistake is,please,th= anks=2E
--
Mario=2E

Try to assign a lower pci slot number= to the framebuffer device than to the nvidia gpu in your bhyve command=2E<= br>
--
Best regards,
Corvin<= /div>

I'm unfamiliar with X but according to your logs it looks l= ike it selects the framebuffer device as primary graphics in the first plac= e:


(--) PCI:*(0@0:7:0) =2E=2E=2E
(--) PCI: (0@0:8:0) =2E=2E= =2E

--
Best regards,
Corvin
------H6FBY8VGI8VXKDMZYDEM5KZVWOX61O-- ------RVWP21E210Y1WYVOOQ949O2E7KPGYQ Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQJBBAABCgArJBxDb3J2aW4gS8O2aG5lIDxjb3J2aW5rQEZyZWVCU0Qub3JnPgUC Y4xrCQAKCRDYVNpWMV4CarxeD/sG7n++0ZdYzXBzRqMy1wkbQ7aKRyUXfavw4rRi Ac76xISHv7uWKh0gk0MJgZ9TF3++NzVL4zSie2tLDLUEuWX42ZuEFyfTZuAk/KpJ zLR0AbHbYrNA+uu5+itdq6AXaVT1ViRzx5+DiUmb/m7CthTk/OO2gCs3wuIwzfYp 1jmrfLr6dYJ0aSK5oB7j1cY5SeaRTjQ6i69Y1znp7s7ScpzaECaKlt0FEdaGSQXu 2yuJ231o2zv4Gtx5GVZOmC8qu5l8Pm031NRIX/+fsed0qZc+FAempR1MdlVVcz+S XsZjaDJnhH/LQlCu7QAgO2L9BeECq2Dxuf2H6DoXPY2FWgtD+3NruB6xKSWDXMer IOmLnbVnn3rkHs6aquIwLIeHHVgVE8yGckRjoeMaPWCZJIlG5U2mH4OLemZapRXJ ZxG56XZV06qW/4F0Lhxjz6RyW/KEp8xFHmWjyOcpaJce3HhAl2rNLXtxv8rVOi8a VBGx9GiDajn+Xq17xhwrTsrzppTjLfFq0bXnfL0gcnMkASbXnrHxrMUCYGPzzHTS 2OhwxfmlqMhpFK4TN77qcLIM3SijQTt7WYlMYaRacVrbNs2VuXihqgppA6T4Wmys 9lONeuePJAIsRnYo1fuAezC371QlKPzSlLoxs85gx5bcn5bVzNOkVDacACQiAF61 k0rLww== =6qaz -----END PGP SIGNATURE----- ------RVWP21E210Y1WYVOOQ949O2E7KPGYQ--