Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Disable audio on the VM #60

Merged
merged 1 commit into from
Jul 11, 2019
Merged

Disable audio on the VM #60

merged 1 commit into from
Jul 11, 2019

Conversation

byrond
Copy link
Contributor

@byrond byrond commented Dec 12, 2018

Description

This adds flags to the call to modifyvm in the Vagrantfile to disable audio in the VM upon boot. If audio is enabled for a running VM, high CPU utilization will occur after waking the host from sleep.

(See https://forums.virtualbox.org/viewtopic.php?f=8&t=90027)

Testing instructions

  • Halt all running VMs on the host, except one.
  • Cause the host to sleep.
  • Wait about a minute.
  • Wake the host and notice high CPU utilization by the VBoxHeadless process in Activity Monitor.
  • Add the changes in the PR to the Vagrant file of the running VM.
  • vagrant halt && vagrant up ("reload" may not allow the audio to be disabled on the running VM; I haven't tested that)
  • Cause the host to sleep.
  • Wait about a minute.
  • Wake the host and notice there is no longer high CPU utilization.

@byrond byrond self-assigned this Dec 12, 2018
@byrond byrond requested a review from becw December 12, 2018 13:25
@becw
Copy link
Member

becw commented Dec 12, 2018

This affects Virtualbox version 5.2.20 and up, right now.

@froboy
Copy link
Contributor

froboy commented Dec 13, 2018

I just tested this by manually copying the line into an existing VM and it solved my problem. I was having sporadic issues with by music playing on bluetooth headphones getting interrupted when I spun up a machine! Apart from... playing music on bluetooth headphones while running vagrant up, you can confirm this setting works by going into VirtualBox, checking the settings of your machine, and observing "Enable Audio" is off.

federated-search-demo_federated-search-demo_1544739981405_67990_-_audio

@geerlingguy
Copy link

geerlingguy commented Dec 28, 2018

Just found out about this PR through a comment on an HN thread for a blog post I wrote earlier today. I would like to also incorporate this change into Drupal VM — @byrond would you be willing to file a PR to add it to Drupal VM's Vagrantfile so I can credit you with the fix?

@geerlingguy
Copy link

Can confirm this fixes the weird audio issues I was experiencing.

@byrond
Copy link
Contributor Author

byrond commented Jan 2, 2019

@geerlingguy, sorry for the delay in responding. We are just coming back from our holiday break. I see this was already fixed in Drupal VM, but thanks for offering the opportunity for credit. No worries though! :)

@becw becw merged commit de39690 into develop Jul 11, 2019
@becw becw deleted the disable-vm-audio branch July 11, 2019 20:49
@byrond
Copy link
Contributor Author

byrond commented Jul 12, 2019

This affects Virtualbox version 5.2.20 and up, right now.

This is still an issue without this patch on VirtualBox 5.2.30, only instead of high CPU after a host nap, a VM with audio enabled would be "aborted."

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants