From nobody Sat Dec 3 15:59:19 2022 X-Original-To: freebsd-x11@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 4NPZJZ714gz4jjd5 for ; Sat, 3 Dec 2022 15:59:58 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NPZJZ0qhDz3sx7 for ; Sat, 3 Dec 2022 15:59:58 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=TYYgKYJx; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2a00:1450:4864:20::62b as permitted sender) smtp.mailfrom=marietto2008@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x62b.google.com with SMTP id ud5so18100661ejc.4 for ; Sat, 03 Dec 2022 07:59:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ZoCFVHszamkD+tkcQB4MGALk87vbQ2t9WHtYmMwDYkE=; b=TYYgKYJxuflakza9EPZnfyjzq7IEk18YsWSf3yfRftm9H8ZdaOTpxmPlEqps1WLNaC GOvywqaDl7x/rB6jzFNNwVjxBgowSlpQndRL9mcy0eAg18CvMn+GK03ZKGoX6fb+ukcr ptHMVgTeZ4b25Q6mHtWZQ5IvbPScW0gdyAVSKvBC6Ok8y52BKAwvltM1Oy/gyVLgXEu+ LDygIh4wsC+C6CHsA1qBM7jauryrogOAu8l+EivQwa0D9hMzf7Tk+my9mIkpy10jq/l1 gz8WJXcxSyia6vAp8SGTcVTZNtTCB3zUNDA/RJIKKdZvyibvYWu0f81/Gk7pCFSZkWiQ OWBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZoCFVHszamkD+tkcQB4MGALk87vbQ2t9WHtYmMwDYkE=; b=k7lwKDoDogevlO3kvH47cvgXD6x+oiBMTHdb9e4dpYLUgZ9gFmac3TEIyCOZH5TnfQ RvIUS3dlDwv2yTkQdFBGhMWNYW3sNeP8Y4GUrXBWZG3lxzGcOwgjhnho6AdrurYurKxk nuk/z26FgqGjhvku0mKs6ikKpm7/3MIctKtqQLQA+mRzC9Xbjt6PR/kCUKnsQ/nk1V7A Z56pILO0AfBGQV8ioQuKR3F0cQ4CpJKLc8sucosoT2o1nY65N8Rf7IwiKdBdU99X8f1d AcNy4+D3kLbFPSWOuPeq5d/XDi1B5f7IUQJl1i5JXl2C+z5QmHcS6w3URSHomQu6P27m lWBQ== X-Gm-Message-State: ANoB5pnIGK6xEJHPh2m0gkHraPF0wSshzcc2YAOMKuJuXc523/J6t/T6 NQJ17gAWWXe8xEBiIrX024/OLR6LbSX2/pw2osJq3IGCHeTesw== X-Google-Smtp-Source: AA0mqf5i2T9V+2kb3nrZ9EzI+4a9nr+gocLFH8FGxCiZFWkiBxWMJXhOWRA71wOpH94mlrDhUB46xuWTFrZV+0r1YoQ= X-Received: by 2002:a17:906:448b:b0:7ad:8bd5:b7df with SMTP id y11-20020a170906448b00b007ad8bd5b7dfmr42116956ejo.57.1670083196014; Sat, 03 Dec 2022 07:59:56 -0800 (PST) List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 From: Mario Marietto Date: Sat, 3 Dec 2022 16:59:19 +0100 Message-ID: Subject: How to use the framebuffer as primary video device instead of the nvidia passed-through graphic card in a bhyve/linux vm To: freebsd-x11@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a4d8ad05eeee8b91" X-Spamd-Result: default: False [-0.38 / 15.00]; HTTP_TO_IP(1.00)[]; URI_COUNT_ODD(1.00)[9]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.62)[0.621]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62b:from]; PREVIOUSLY_DELIVERED(0.00)[freebsd-x11@freebsd.org]; FREEMAIL_FROM(0.00)[gmail.com]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; MLMMJ_DEST(0.00)[freebsd-x11@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4NPZJZ0qhDz3sx7 X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N --000000000000a4d8ad05eeee8b91 Content-Type: text/plain; charset="UTF-8" Hello to everyone. what Im trying to do is to set the framebuffer video adapter as primary graphic card on my bhyve-ubuntu vm instead of the nvidia RTX 2080 ti card that I have passed through. 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. I tried different Xorg configurations,but what I've got is that Xorg failed to display some errors. So,the controller that you see below should be used as primary inside the ubuntu vm : 00:1d.0 VGA compatible controller: Device fb5d:40fb while the ones you see below as secondary : 08:00.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1) 08:00.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Controller (rev a1) 08:00.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Host Controller (rev a1) 08:00.3 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="$(ls /dev/vmm/*)" vncs="$(ps ax | awk '/vncviewer [0]/{print $6}')" for vm in $vms; do session="${vm##*/}" echo "bhyve session = $session" echo "vnc session = $vncs" if ! printf '%s\n' "${vncs}" | grep "${session}"; then printf 'VNC session not found,destroying ghost vms\n' bhyvectl --vm=$session --destroy else printf 'Found VNC session %s\n' "${session},no ghost vms found,not destroying them" fi done vmdisk1=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (2015020204055E)/ && d{print d}'` echo "TOSHIBA External USB 3.0 1.8 TB ; $vmdisk1" mount -t ufs /dev/$vmdisk1'p2' /mnt/$vmdisk1'p2' bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \ -s 0,hostbridge \ -s 2,virtio-blk,/mnt/$vmdisk1'p2'/bhyve/img/Linux/ubuntu2210.img,bootindex=1 \ -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=/ \ -s 29,fbuf,tcp=0.0.0.0:5919,w=1600,h=950,wait \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \ vm0:19 < /dev/null & sleep 2 && vncviewer 0:19 For sure ,on /boot/loader.conf I've added : pptdevs="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. 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. This is the log file that shows the errors reported : https://pastebin.ubuntu.com/p/Gv7wgsDR4K/ I have also removed the xorg.conf file,but it didn't work either. This is the log file that shows the errors reported : https://pastebin.ubuntu.com/p/wNcfQTByQm/ Can someone give me some suggestions that can help me to understand where the mistake is,please,thanks. -- Mario. --000000000000a4d8ad05eeee8b91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello to everyone.

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. 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. I tried different Xorg configurations,but what I'= ve got is that Xorg failed to display some errors. So,the controller that you see below should be used as primary inside the ubuntu vm :

00:1d.0 VGA compatible controller: Device fb5d:40f=
b

while the ones you see below as secondary :

08:00.0 VGA compatible controller: NVIDI=
A Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)
08:00.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Contro=
ller (rev a1)
08:00.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Host Controller (r=
ev a1)
08:00.3 Serial bus controller: NVIDIA Corporation TU102 USB Type-C UCSI Con=
troller (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,destroyin=
g ghost vms\n'
                                bhyvectl --vm=3D$session --destroy         =
                 =20
                else
                                printf 'Found VNC session %s\n' &qu=
ot;${session},no ghost vms found,not destroying them"
                fi
done

vmdisk1=3D`geom disk list | awk '/^Geom name: /{d=3D$NF} /^ *ident: (20=
15020204055E)/ && d{print d}'`
echo "TOSHIBA External USB 3.0 1.8 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.img,bo=
otindex=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.0.0.0:=
5919,w=3D1600,h=3D950,wait \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \
vm0:19 < /dev/null & sleep 2 && vncviewer 0:19

For sure ,on /boot/loade= r.conf I've added :
=


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. 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


bu= t it didn't work. This is the log file that shows the errors reported :=

https://pastebin.ubuntu.com/p/Gv7wgsDR4= K/


I h= ave also removed the xorg.conf file,but it didn't work either.

= This is the log file that shows the errors reported :

https://pastebin= .ubuntu.com/p/wNcfQTByQm/


Can someone give m= e some suggestions that can help me to understand where the mistake is,plea= se,thanks.
--
Mario.
--000000000000a4d8ad05eeee8b91--