I have set a qemu version of MacOS in my Ubuntu 22.04. Everything is apparently ok (even if it is not always very fast), but sound is working quite bad. I can hear sound, but it is often flickering and when I try to open a youtube video in a browser the system starts to slow down.
I tried to check around some solutions (for instance using AC97 device or specifying the setting for PulseAudio [https://stackoverflow.com/questions/64560389/setting-up-pulseaudio-in-qemu]), but I am note sure if this could help.
My basic.sh has these lines
qemu-system-x86_64 \
-enable-kvm \
-m 8G \
-machine q35,accel=kvm \
-smp 4,cores=4 \
-cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \
-device isa-applesmc,osk="$OSK" \
-smbios type=2 \
-drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \
-drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \
-vga qxl \
-device ich9-intel-hda -device hda-output \
-usb -device usb-kbd -device usb-mouse \
-netdev user,id=net0 \
-device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
-device ich9-ahci,id=sata \
-drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \
-device ide-hd,bus=sata.2,drive=ESP \
-drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \
-device ide-hd,bus=sata.3,drive=InstallMedia \
-drive id=SystemDisk,if=none,file=macOS.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk \
-virtfs local,path=/home/rdw/VM/sharemacos,mount_tag=hostshare,security_model=none,id=hostshare