Re: Virtual GPU for FreeBSD as guest virtualized with qemu / kvm -- best alternative ? Cirrus ?

From: Mario Marietto <marietto2008_at_gmail.com>
Date: Fri, 28 Jul 2023 14:42:43 UTC
In the last few days I found something better than the simple -vga std. It
is :

-device vmware-svga,id=video0,vgamem_mb=16,bus=pcie.0,addr=0x1


qemu supports it and FreeBSD,too....

On Fri, Jul 28, 2023 at 4:33 PM Jake Freeland <jake@technologyfriends.net>
wrote:

> On Fri, Jul 28, 2023 at 9:27 AM Mario Marietto <marietto2008@gmail.com>
> wrote:
>
>> Thanks. it does not work. This is the error I get : (on the attached
>> picture,you can read "segmentation fault"...
>>
>> [image: unnamed.png]
>>
>> On Fri, Jul 28, 2023 at 4:18 PM Ronald Klop <ronald@freebsd.org> wrote:
>>
>>> On 7/23/23 16:27, Mario Marietto wrote:
>>> > Hello to everyone.
>>> >
>>> >
>>> > I would like to virtualize FreeBSD on Windows 11 with qemu-kvm (for
>>> Windows). I've end up with the following parameters which are working :
>>> >
>>> >
>>> > |I:\OS\qemu\Linux\qemu\qemu-system-x86_64w.exe -accel whpx -machine
>>> q35 \ -cpu
>>> Westmere,vendor=GenuineIntel,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check
>>> \ -m 8G -vga qxl -audiodev dsound,id=snd0 -device ich9-intel-hda -device \
>>> hda-duplex,audiodev=snd0 \ -hda
>>> "I:\OS\ISO\FreeBSD\FreeBSD-13.2-RELEASE-amd64-disc1.iso" \ -hdb
>>> "I:\OS\qemu\Linux\FreeBSD.img" -rtc base=localtime \ -device
>>> nec-usb-xhci,id=xhci -device usb-tablet -device usb-kbd \ -global
>>> nec-usb-xhci.msi=off -smbios type=2 -nodefaults -netdev user,id=net0 \
>>> -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:11:22:33 \ -device
>>> ich9-ahci,id=sata -bios "I:\OS\qemu\Linux\OSX-KVM-master\OVMF_combined.fd"|
>>> >
>>> >
>>> > Now I'm trying to configure Xorg and the xfce4 desktop environment.
>>> Since I'm using qemu,there are a lot of display devices available to
>>> try,but I don't know which one is good for FreeBSD. In the website below
>>> there is a good list of all options available :
>>>
>>
> I've found that `-vga std` with the xf86-video-vesa package works best.
>
> This combination only appears to support a maximum resolution of 1920x1080,
> but I have not found anything better over the last few years.
>
>
>> >
>>> >
>>> > https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/ <
>>> https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/>
>>> >
>>> >
>>> > On FreeBSD I have installed the package drm-kmod and it suggests to me
>>> to add to the rc.conf file one of these parameters :
>>> >
>>> >
>>> >  1.
>>> >
>>> >     for amdgpu : kld_list="amdgpu"
>>> >
>>> >  2.
>>> >
>>> >     for intel : kld_list="i915kms"
>>> >
>>> >  3.
>>> >
>>> >     for radeonkms : kld_list="radeonkms"
>>> >
>>> >
>>> > qemu does not cover any of those. I don't know which option is decent
>>> for my case. I would like to try with the cirrus display driver. Maybe this
>>> one :
>>> >
>>> >
>>> > https://www.freshports.org/x11-drivers/xf86-video-cirrus/ <
>>> https://www.freshports.org/x11-drivers/xf86-video-cirrus/>
>>> >
>>> >
>>> > |So,I have installed this package : pkg install xf86-video-cirrus
>>> >
>>> > |
>>> >
>>> > I've rebooted and I have changed |-vga qxl to -vga cirrus|
>>> >
>>> > FreeBSD recognized it at 0:1:0
>>> >
>>> >
>>> > 2023-07-23 15_21_33-QEMU.png
>>> >
>>> > I have created xorg.conf with this content :
>>> >
>>> > |Section "Device" Identifier "Device0" Driver "cirrus" BusID
>>> "PCI:0:1:0" Screen 0 EndSection|
>>> >
>>> >
>>> > error : no screens found.
>>> > This is the reason why it does not work :
>>> >
>>> >
>>> > 2023-07-23 15 49 44.png
>>> >
>>> > but the module seems to be there :
>>> >
>>> > |cd /usr/local/lib/xorg/modules/drivers/ ls *cirrus_drv.so* ;
>>> modesetting_drv.so ; scfb_drv.so ; vesa_drv.so ;|
>>> >
>>> >
>>> > What should I do ?
>>> >
>>> > --
>>> > Mario.
>>>
>>>
>>> A https://www.freshports.org/x11-drivers/xf86-video-qxl/ driver exists.
>>> It didn't work on my qemu on Mac/ARM. Maybe it works for you.
>>>
>>> Ronald.
>>>
>>>
>>
>> --
>> Mario.
>>
>

-- 
Mario.