No sound in Windows guest

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Pok
Posts: 17
Joined: 1. Jul 2009, 14:00
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Linux, BSD, Windows

No sound in Windows guest

Post by Pok »

Hello,
Sound in virtual machines no longer works.
I have added my user to both vboxusers and pulse groups, have tried removing the pulseaudio config file.
No luck.
The exact same VM started with root works just fine, sound comes out from and goes into the VM.
With a regular user after I start the VM I always find the same error in the logs:

Code: Select all

00:00:00.977177 PulseAudio: Using v13.0.0
00:00:01.620180 PulseAudio: Failed to connect to server: Connection refused
00:00:01.620250 PulseAudio: Retrieving server information ...
00:00:01.620263 PulseAudio: Server information not available, skipping enumeration
Can anyone point me the right direction in figuring out what permission is missing where?

I don't know if this has any importance, but the host is a Slackware64 current OS.
Sound used to work, but I haven't used it for a while and I couldn't tell if the problem cropped up as a result of constant updating to the latest Slackware64 current or the latest VirtualBox.
Pok
Posts: 17
Joined: 1. Jul 2009, 14:00
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Linux, BSD, Windows

Re: No sound in Windows guest

Post by Pok »

So it seems the problem is somehow related to VBoxSVC being started during boot as a result of vboxwebsrv being started vs. VBoxSVC being started from the VirtualBox application (when starting vboxwebsrv is disabled).
In both cases VBoxSVC is running under my user account.
Wonder what's going on here.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No sound in Windows guest

Post by scottgus1 »

Sound started to have trouble in 6.1.20 and 6.1.22, but is reported fixed in 6.1.24.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: No sound in Windows guest

Post by arQon »

It may not quite be yet, because I just ran into this on 6.1.42, under very similar circumstances: a working VM+VDI was moved to a newly-created VM using the same VDI a few days ago, and I discovered today the sound no longer worked. GUI and VBoxManage attempts to resolve it didn't; but shutting all the VMs down and stopping** and disabling vboxweb brought it back on the next guest VM restart.

(** vboxwebsrv wasn't actually running, but VBoxSVC had stopped by the time I got that far so I can't tell what account it had been using).

I'd generally be inclined to suspect that the problem could have been permissions-related in some way, but given that I changed nothing else on either host or guest in between that's not really credible, and empirically I'll have to consider Pok's assessment as accurate (other than the topic wording, which should be "No sound in guests").

Log file from the silent run attached, just to keep fth0 amused. :P I'm not going to worry about it, but I don't see anything obvious in it and all the easily-inspected things came up empty, so I felt this thread deserved the necro. If it happens again at some point I'll poke at it a bit more then.
Attachments
vb-silent.7z
(31.24 KiB) Downloaded 6 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: No sound in Windows guest

Post by fth0 »

arQon wrote: 16. Oct 2023, 09:24 Log file from the silent run attached, just to keep fth0 amused. :P
You're so kind to me! ;)
arQon wrote: 16. Oct 2023, 09:24 I'm not going to worry about it, but I don't see anything obvious in it and all the easily-inspected things came up empty, so I felt this thread deserved the necro. If it happens again at some point I'll poke at it a bit more then.
I don't know how the audio implementation of VirtualBox works in detail, but I noticed something peculiar in the VBox.log file:
VBox.log.1 wrote:
01:39:54.013286 Audio: Disabling output for driver 'PulseAudio'
01:39:54.015304 Audio: Status has changed (input is disabled, output is disabled)
[...]
01:40:00.849147 Audio: Enabling output for driver 'PulseAudio'
01:40:00.849293 Audio: Enabling output for driver 'Untitled'
01:40:00.849428 Audio: Enabling output for driver 'Untitled'
01:40:00.851072 Audio: Status has changed (input is disabled, output is enabled)
[...]
02:11:21.102625 Audio: Disabling output for driver 'PulseAudio'
02:11:21.102796 Audio: Disabling output for driver 'Untitled'
02:11:21.102983 Audio: Disabling output for driver 'Untitled'
02:11:21.104610 Audio: Status has changed (input is disabled, output is disabled)
[...]
02:11:32.257619 Audio: Enabling output for driver 'PulseAudio'
02:11:32.257761 Audio: Enabling output for driver 'Untitled'
02:11:32.257884 Audio: Enabling output for driver 'Untitled'
02:11:32.259316 Audio: Status has changed (input is disabled, output is enabled)
[...]
In the beginning, there was only one audio output "object" (whatever that is), and later on there were three of them. In the Statistics at the end, there is information about three streams (search for "/Devices/ichac97/Stream"), and the second stream has more statistics counters than the other two. This could mean that a wrong assignment took place (or not ;)). So if you want to poke at some point in time, you have something to look for. :P
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: No sound in Windows guest

Post by arQon »

Thanks.

Odd, yes, but I don't think I'd be inclined to read too much into it. In the last few weeks Pulse has also repeatedly switched the output to headphones that don't exist (in the middle of a call the first time, which was fun...) until I disabled that, so I'm not at all surprised to see it hallucinating new unnamed devices. (I mean, maybe there's a short in there that just magically hasn't shown up at any point in the last several years or since; or cosmic rays hit the audio chip (something that actually happens!), etc...)

The call incident at least meant I thought to check that too when I had the VB problem (I'd already disabled the auto-switching by then, but recently enough that I couldn't be 100% sure it had worked), but music players etc were still fine - only VB was silent. It's possible VB got itself confused and switched to an imaginary output (or the unused audio out on the monitor), but if so it's a lot more capable than the GUI suggests (since "feed it to Pulse" is as far as that goes), and even if so it would be strange for it to switch there but not switch back, so that seems unlikely.

It hasn't happened since the previous post, and I don't really expect it to happen again. It was unexpected the first time too though, and since this thread provided the first successful solution I felt it deserved the bruising even if only as a good place to start from next time. :)
Post Reply