[HOME] [DOWNLOAD] [DOCS] [NEWS] [SUPPORT] [TIPS] [ISSUES] [DONATE]

No sound in workstation (VirtualBox on Linux host)

Hello.

I found some related information not specific to Whonix but Linux guests in VirtualBox in general. There seems to be some problems with clock rate estimates.

On my Whonix workstation, running

dmesg | grep “intel8x0”

produces

[ 5.720136] snd_intel8x0 0000:00:05.0: intel8x0_measure_ac97_clock: measured 54601 usecs (32696 samples)
[ 5.722697] snd_intel8x0 0000:00:05.0: measured clock 598816 rejected
[ 6.080232] snd_intel8x0 0000:00:05.0: measure - unreliable DMA position…
[ 6.440220] snd_intel8x0 0000:00:05.0: measure - unreliable DMA position…
[ 6.445118] snd_intel8x0 0000:00:05.0: clocking to 48000

so it seems to set the clock to 48KHz after all, which should be the correct setting that other solutions are aiming for.

Anything else I can try?

Is host sound functional?

I just tested audio on Whonix-13-Workstation in Virtualbox. Wasn’t working for me either.

I got it to work by making 2 changes:

  1. Virtualbox VM Settings > Audio > Change Host Audio Driver from Pulseaudio to ALSA Audio Driver
  2. sudo apt-get install pulseaudio
  3. Reboot.

No idea why that works for me. Hope it works for you. I will never understand audio in Linux.

entr0py:

  1. sudo apt-get install pulseaudio

On host or in VM?

Installed in Whonix-Workstation. Host (Debian-8 / XFCE4) already had pulseaudio installed.

But I just realized I have a non-standard setup. Host is running virtualbox 5.1.8 from jessie-backports which pulls in pulseaudio 7.1 from backports and guest is running virtualbox-guest-x11 from jessie-backports also. OP, YMMV.

1 Like

Thanks for your replies.

It is.

So this is odd. I made the same changes. Immediately after reboot, sound works, but it stops working within a minute. I’m testing using

aplay /usr/share/sounds/alsa/Front_Center.wav

When it works, it plays properly and returns to the prompt. When it doesn’t, it doesn’t return to the prompt at all.

The issue itself probably has nothing to do with Whonix, but can someone maybe tell me how to determine the Whonix equivalent of this?

sudo sysctl -w hw.snd_intel8x0.ac97rate=48000

Even though it says clocking to 48000, I’d still like to try.

&@*&$&@!! Here is why sound on Linux is a mess: http://tuxradar.com/content/how-it-works-linux-audio-explained

Basically, in KDE4, we have phonon running on top of pulseaudio, running on top of alsa - and all of them can interact with user processes.

Here is my situation and attempt to troubleshoot:

Host: Debian 8: kernel 3.16
virtualbox 5.1.8 (jessie-backports)
pulseaudio 7.1 (jessie-backports)

Guest: Whonix 13 Workstation
virtualbox-guest-x11 5.1.8 (jessie-backports)
pulseaudio: not installed

When the VM is set to use Host Audio Driver: Pulseaudio, no sound works in VM. I have no idea why. Maybe it requires pulseaudio in the guest? In any case, first step should be getting sound through alsa.

Change Host Audio Driver to ALSA Audio Driver and now all alsa related functions should work in the guest, including your test command: aplay. The test functions in System Settings > Multimedia should also work. VLC should also work. useful commands: alsamixer, aplay

Sound does not work in Tor Browser. According to [1], firefox will eventually make pulseaudio a hard dependency. Requirement may already be downstreamed to Tor Browser (don’t know). So install pulseaudio (other useful packages: pavucontrol, paman). useful commands: pavucontrol, paman, pavumeter, pactl. Sound now works in Tor Browser.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1247056

Switch Host Audio Driver back to Pulseaudio and it still doesn’t work. Who the hell knows…


I would agree with that.

I don’t know how to do that. I have the same messages in dmesg as you, but my sound is now working. I would guess that is not the culprit.

Does Host Audio Driver: Pulseaudio work when using virtualbox, pulseaudio from Debian stable?


@Patrick Given [1], we may need to install pulseaudio by default in Whonix. I think it was removed from Whonix 12 -> Whonix 13.

A great lecture! :slight_smile:

Seems reasonable.[quote=“nsnd, post:6, topic:3202”]
The issue itself probably has nothing to do with Whonix, but can someone maybe tell me how to determine the Whonix equivalent of this?
[/quote]

That is a command that should work on any Linux distribution the same way.

[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Investors] [Priority Support] [Professional Support]