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

audio sound on macOS changes when VM is created #388

Closed
robbkidd opened this issue Nov 29, 2018 · 7 comments · Fixed by #392
Closed

audio sound on macOS changes when VM is created #388

robbkidd opened this issue Nov 29, 2018 · 7 comments · Fixed by #392

Comments

@robbkidd
Copy link
Contributor

robbkidd commented Nov 29, 2018

With macOS and VirtualBox, Audio quality changes in bluetooth headsets for the worse when Test-Kitchen (via kitchen-vagrant) starts up test VMs.

Current workaround: set your default sound input device to something other than your bluetooth headphones.


Reported by Omry in #test-kitchen room in the Chef Community Slack on Nov 20:

every time I create virtualbox vm through kitchen it hooks up with my microphone and change the audio volume, and instead of listening to music I listen to myself typing. anyone knows how to prevent that from happening? (this is on a mac laptop)

The problem was dismissed by Omry at the time as probably not reproducible.

I think this is specific to Boss QC-35 drivers.

Omry's Environment macos 10.14.1 virtualbox 5.2.20 Vagrant 2.2.0

Chef Development Kit Version: 3.3.23
chef-client version: 14.5.33
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks version: 7.0.6
kitchen version: 1.23.2
inspec version: 2.2.112


I've just started experiencing this today after setting up a macOS Mojave laptop with VirtualBox 5.2.22 (& 5.2.20).

The audio change seems to be triggered by starting up a VM in VirtualBox and your macOS default sound input device is your bluetooth headphones. VirtualBox starts the VM with audio enabled and engages the host OS's audio somehow to trigger the microphone to be used. Sound quality changes because the bluetooth device shifts to bidirectional mode for sound in and out.

Robb's Environment macos 10.14.1 virtualbox 5.2.20 & 5.2.22 Vagrant 2.2.1

Chef Workstation: 0.2.35
chef-run: 0.2.2
chef-client: 14.7.17
delivery-cli: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks: 7.0.6
test-kitchen: 1.23.2
inspec: 3.0.52

@tas50
Copy link
Member

tas50 commented Nov 29, 2018

I've actually been running into this lately and it drives me NUTS. I'm curious what we could do to resolve it.

@robbkidd
Copy link
Contributor Author

One possibility might be adding this to our Vagrantfile template.

config.vm.provider "virtualbox" do |v|
  v.customize ["modifyvm", :id, "--audio", "none"]
end

@robbkidd
Copy link
Contributor Author

Dunno if it's related, but VirtualBox 5.2.20 and 5.2.22 both seem to have a chew-up-CPU-when-waking-from-sleep issue (1 & 2) that's been correlated to audio being enabled for a VM.

@bdausses
Copy link

I'm hitting this too... running Bose QC-35II's.

@bdausses
Copy link

bdausses commented Jan 24, 2019

Pinged @tas50 on this and he still hadn't found a fix. I went off based on @robbkidd 's note above and found that if I add this to my .kitchen.yml, it seems to prevent this issue:

  - name: centos-7
    driver:
      customize:
        audio: none

@robbkidd
Copy link
Contributor Author

@bdausses Hey! That totally generates the right customize modifyvm line through the template. I'm looking to see if we can make audio: none a default.

@bdausses
Copy link

Awesome. I tried to get it inserted into the template, but didn't have much luck. Would love to see this integrated into TK as its almost never that we actually need audio. Looking forward to this being the default!

robbkidd added a commit that referenced this issue Jan 28, 2019
Fixes #388

As mentioned in that issue, modifying the VM to have audio set to "none"
will disable sound for the VM and prevent VirtualBox from connecting to
the host's audio which really cramps a user's style when they're
listening to something over bluetooth headphones.

This change opts to be simple-but-repetitive in the tests to include the
new default in each example VM config.

Signed-off-by: Robb Kidd <robb@thekidds.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants