No Audio in VBox >= 6.1.24

Discussions about using Linux guests in VirtualBox.
Post Reply
aabb
Posts: 5
Joined: 18. May 2022, 10:32

No Audio in VBox >= 6.1.24

Post by aabb »

I've been using VBox 6.1.6 for quite some time on Windows 10 host with Linux Mint Mate 20.x guest without problems. Since 6.1.6 is already 2 years old, I wanted to upgrade to a newer VBox version and found that from 6.1.24 onwards I don't have any audio output. I understand that in this version, there have been major audio changes, which may be the reason for the problem.

Audio players, video players, browsers, all seemingly work as intended (e.g., video is shown), just no sound.

I tried the fix described here: (sorry, can't post links yet) , i.e. added the line "options snd-intel8x0 ac97_clock=48000" to the file "/etc/modprobe.d/alsa-base.conf" .

This brought partial improvements: Video is now played with sound -- no matter whether from the internet or my own local .mp4 files. The test "aplay /usr/share/sounds/alsa/Front_Center.wav" works. However, my own .mp3 and .wav files, ripped from CD, still don't produce any output.

Attached two log files: One before applying the above-mentioned fix, one after. There are Audio errors in there; however, I have no idea what can be done about them. Any help is greatly appreciated.
Attachments
Linux Mint Mate-2022-05-17-15-32-17 with audio fix.zip
Log after applying fix
(27.73 KiB) Downloaded 4 times
Linux Mint Mate-2022-05-17-16-08-21 without audio fix.zip
Log before applying fix
(42.87 KiB) Downloaded 4 times
aabb
Posts: 5
Joined: 18. May 2022, 10:32

Re: No Audio in VBox >= 6.1.24

Post by aabb »

By accident, I found a workaround for the problem.

Prerequisite: The line "options snd-intel8x0 ac97_clock=48000" has been added to the file "/etc/modprobe.d/alsa-base.conf", as mentioned in previous post.
Then do aplay /usr/share/sounds/alsa/Front_Center.wav and immediately stop it with Ctrl-z.

From now on sound output works.

So it seems that this aplay command does some sound initializations that are necessary but missing. What could that be? Or, second best solution, would there be a way to automate this workaround so that it could be performed every time I start the VM?

(Unfortunately, I have no way to check whether the same problem also arises when Linux is run directly on my hardware. However, since it works up to VBox 6.1.22, I think it is a sound assumption that VBox has something to do with this.)
aabb
Posts: 5
Joined: 18. May 2022, 10:32

Re: No Audio in VBox >= 6.1.24

Post by aabb »

Based on the above observations, I have now implemented the following workaround:
Created script file with contents

Code: Select all

aplay /usr/share/sounds/alsa/Front_Center.wav &
sleep 1.5
kill -SIGSTOP $(pgrep -f aplay)
and added it to the Startup Applications.

This works (verified with 6.1.28), but I'd say it is extremely crude. Are there no better ideas? Should I file a bug report?
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 Audio in VBox >= 6.1.24

Post by scottgus1 »

I'm no guru about sound issues, so I can't help. But here's the link to the Bugtracker.
Post Reply