foxlet / macOS-Simple-KVM

Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
13.63k stars 1.14k forks source link

Sound only works with basic.sh, not virt-manager #57

Open geckolinux opened 5 years ago

geckolinux commented 5 years ago

Hi there,

Can anybody confirm or deny if sound (output) works with virt-manager? I can only get it work with basic.sh. There appears to be some difference in the virt-manager template.xml that make.sh generates. In the template.xml there is:

    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
    </controller>

Whereas basic.sh uses -device ich9-ahci,id=sata

Also, is there any way to a make integrated microphone input work with in macOS-Simple-KVM?

Thanks!

foxlet commented 5 years ago

Those are the hard disk and USB controllers, nothing to do with sound.

idnovic commented 5 years ago

I need to reinstall the vm but as far as i remember sound did not work for me

geckolinux commented 5 years ago

Hm, OK. Well for me, sound output worked great (microphone didn't work) with basic.sh, but no sound devices under virt-manager.

idnovic commented 5 years ago

So I reinstalled macOS 10.13 and sound did work under virt-manager. But Since i found out that 10.14 just started supporting virt-io I deleted the vm again and I am doing the virt-io setup now :)

ironicbadger commented 5 years ago

@idnovic could you elaborate on 'supporting virt-io'? I'm quite familiar with the process of virtio drivers in Winbloze and Linux.

idnovic commented 5 years ago

@idnovic could you elaborate on 'supporting virt-io'? I'm quite familiar with the process of virtio drivers in Winbloze and Linux.

Well since around 10.14.3 macOS includes some virt-io drivers. I can tell you that the qemu-std gpu driver works. Virt-io for block devices does not work for me. Ethernet is still e1000.

https://www.kraxel.org/blog/2019/06/macos-qemu-guest/ https://github.com/foxlet/macOS-Simple-KVM/blob/master/virtio.sh

idnovic commented 5 years ago

about the sound issue: sound did work for me on 10.13 sound does not work for me on 10.14 both virt-manager both the same config as suggested/included in this repo

foxlet commented 5 years ago

virtIO can only be used for existing installations, the Installer environment doesn't include Block drivers, only the final install.

idnovic commented 5 years ago

virtIO can only be used for existing installations, the Installer environment doesn't include Block drivers, only the final install.

I can not boot with virtio after install. I just get the grey x at around 50%

foxlet commented 5 years ago

Gray X? There should be no graphics but verbose messages if you're using the proper ESP.

idnovic commented 5 years ago

Gray X? There should be no graphics but verbose messages if you're using the proper ESP.

Yes. I deactivated the verbose output because the vm boots faster without it. It does work with the sata driver. Just not with virtio drive. (after install)

macOS 10.14 installed with apfs even thought I did not choose apfs. I will just wait until virtio is more useable with macOS.

If you want the information I can boot with -v and tell you the problem with virtio hard drive I had.

kode54 commented 5 years ago

It could be the fact that libvirtd sets it up with an hda-duplex device, while basic.sh pairs it with a hda-output device.

Add <codec type='output'/> inside the <sound...> tag block.

Ah, nope, that didn't work, and neither did the sound type 'usb'.

E: I found an alternative: Running shairport-sync on the host, and AirPlaying from the guest.

E2: I think I know why it's not working. Clover is apparently out of date, and can't inject kernel modules?

E3: Welp. I needed to load the latest VoodooHDA from within the VM, after installing it to /Libraries/Extensions, which is the common way to install signed extensions in a normal macOS machine. I guess I was right about Clover being too old. Too bad the latest Clover is busted in Qemu.

eliasailenei commented 3 years ago

Sound does work on Virtual Machine Manager and i can show you how. I actually found this out after many days researching with no solution. First, re install mac OS high sierra and don't put the GPU yet. Once done install, put GPU and DO NOT REMOVE THE SPICE YET. Install the driver by putting this in the terminal. bash <(curl -s https://raw.githubusercontent.com/Benjamin-Dobell/nvidia-update/master/nvidia-update.sh)

Then shutdown don't restart.

Remove the spice, and then launch mac os for the first time.

Shutdown and then add the spice manually and don't modify them. Just modify audio to be ich6.

That's it! It would prioritize your GPU and you have audio.

Only bad thing is that it is from Linux not macOS but audio is audio unless your deaf lmao.