Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve macOS support for Big Sur and Monterey #271

Merged
merged 3 commits into from Dec 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions quickemu
Expand Up @@ -480,6 +480,10 @@ function vm_boot() {
exit 1
fi

OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')
# Disable S3 support in the VM to prevent macOS suspending during install
GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=${OSK}"

# Tune Qemu optimisations based on the macOS release, or fallback to lowest
# common supported options if none is specified.
# * VirtIO Block Media doesn't work in High Sierra (at all) or the Mojave (Recovery Image)
Expand All @@ -497,7 +501,8 @@ function vm_boot() {
BALLOON="-device virtio-balloon"
MAC_DISK_DEV="virtio-blk-pci"
NET_DEVICE="virtio-net"
USB_HOST_PASSTHROUGH_CONTROLLER="qemu-xhci"
USB_HOST_PASSTHROUGH_CONTROLLER="nec-usb-xhci"
GUEST_TWEAKS="${GUEST_TWEAKS} -global nec-usb-xhci.msi=off"
;;
*)
# Backwards compatibility if no macos_release is specified.
Expand All @@ -508,8 +513,7 @@ function vm_boot() {
USB_HOST_PASSTHROUGH_CONTROLLER="usb-ehci"
;;
esac
OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')
GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -device isa-applesmc,osk=${OSK}"

if [ -z "${disk_size}" ]; then
disk_size="96G"
fi
Expand Down