LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-19-2022, 10:27 AM   #1
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
VirtualBox 6.1.32 guests choppy sound after Slackware 15 upgrade


Hello, guys, hopefully someone can offer some ideas. I've searched here and Google but not finding any recent ideas about this.

Up to two weeks ago my VirtualBox guests were fine, running on a Slackware 14.2 host with kernel 5.10.80 and pulseaudio. I could also have Audacious playing music on the host while playing games in a WinXP guest.

After upgrading Slackware to 15.0 and kernel 5.10.99, I had a problem at first with pulseaudio not finding any devices, and solved it by deleting the old /var/lib/alsa/asound.state. Now audio works fine on the host but all of my VirtualBox guests have terrible choppiness/stuttering using pulseaudio as the host driver and Intel ICH controller. Also, anything else playing sound on the host at the same time suffers the same. Below is my entire ~/.asoundrc:
Code:
pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}
I have not changed any host hardware or guest VM settings. The host is a 4-core cpu with 16GB Ram and a 2GB GTX750Ti. My XP and 7 guests are set for 1 cpu core at 100% cap with 2GB ram, legacy paravirtualization, and 64MB video ram with vboxsvga controller.

I have tried changing the host driver to ALSA, then Windows sounds are good but the games and other applications have no sound I also tried reinstalling VB from the .run file to rebuild the kernel modules. One idea I read in an Arch forum suggested it is a timing issue caused by pipewire, but I do not have pipewire enabled. Other reddit posts and ubuntu forums suggest installing the guest additions, but I already have the 6.1.32 guest additions and extension pack installed.
 
Old 03-21-2022, 05:31 PM   #2
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Original Poster
Rep: Reputation: 63
Since posting this 4 weeks ago I have tried alsa again and found that some games play sound while others don't. For example, Diablo and Diablo II have no sound , while Mageslayer does have sound. A week ago I installed alien's multilib packages and wine 7.3, and I spent this past weekend updating all of my SBo packages now that the SlackBuilds.org 15.0 repo is up. None of that helped VirtualBox. I tried removing /opt/Virtualbox and the kernel modules from /lib/modules/5.10.99/blah/blah, then reboot and reinstall 6.1.32. Then I tried rolling back to 6.0.24, the last version with software virtualization support in case that is the problem, but it won't install because the kernel modules won't compile.

I could try recreating the VMs, hopefully using the same disk images, but it feels like something that should have a simpler solution.
The VMs are not laggy, just choppy sound.
 
Old 03-23-2022, 01:41 PM   #3
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Original Poster
Rep: Reputation: 63
I finally found a simple enough workaround. Keeping the host audio driver as pulseaudio and changing the guests' device from ICH AC97 to SB16 fixed the choppy sound. Of course, the guest OS has to install SB16 drivers software.

Edit 03-27-2022: Switching to SB16 was not as effective as originally thought. Windows guest system sounds worked fine but in games the audio lagged by 1-2 seconds and voices sounded like a cassette tape at 50% speed.
I just now found that having pavucontrol open at the same time as a guest is enough to fix the choppy audio. While the guest is running if I close pavucontrol the audio immediately becomes choppy again, and when I reopen pavucontrol it is fixed again. So I made a little shellscript that opens pavucontrol before VirtualBox. Very weird...

Last edited by dracolich; 03-27-2022 at 08:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound gone since a while in VirtualBox 6 guests FlinchX Slackware 4 05-09-2019 11:03 AM
Video playback is choppy sooo choppy... BW-userx Linux Mint 22 01-21-2019 08:13 PM
[SOLVED] Choppy audio playback in any VirtualBox Guests. Host = Centos 6.5. readmore Linux - Software 1 01-31-2014 10:39 PM
All my guests crash on Fedora 11 with VirtualBox green_dood Linux - Software 2 05-28-2009 02:37 PM
LXer: VirtualBox 2: How To Pass Through USB Devices To Guests On An Ubuntu 8.10 Host LXer Syndicated Linux News 0 04-05-2009 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration