Page 1 of 1
sound output has low pitch on Ubuntu guest
Posted: 20. Jul 2009, 04:26
by dr.malkovich
I tried searching to see if someone else had the same problem but I wasn't able to find anything. I'm running Ubuntu Jaunty guest on a Vista x64 host. When I start up the VM, sometimes the output will be a lower pitch than what it's supposed to be. Sometimes, but not very often, it'll play sounds correctly, and other times (after having played a game) the sound will stop working. I don't really mind the issue of the sound stopping as much as getting it to the right pitch. Is there any way to fix this?
Re: sound output has low pitch on Ubuntu guest
Posted: 22. Jul 2009, 05:24
by lshurr
I'm having the same problem with an Ubuntu 9.0.4 guest on Virtualbox 3.0.2 r49928 on a Vista 32 SP1 equipped Presario C700 laptop. The sound's not merely low pitched, it's slowed down. Sometimes, it's distorted. There is some variation depending on what software is used for audio playback. VideoLan VLC seems to be especially prone to distortion (periodic chirps). I do not know the significance of this variation. The same slow down/low pitch/distortion can be heard when sounds are played such as the drumbeat sound when the GDM login comes up or the Ubuntu musical phrase that plays as the Gnome desktop comes up. The trick is that the problem is consistently but temporarily cleared up by reinstalling the Guest Additions. My experience is that everything will be fine, even through reboots, until you shut down the virtual machine. Upon restart, the slow down/low pitch/distortion problem returns. The same problem also occurs with Virtualbox 2.2.4 r47978. It appears that video playback is also affected.
FWIW, a Windows XP SP3 guest seems to be unaffected under the same configuration.
Please do not admonish me not to run multimedia in a VM. I know it's not really the way to go. In fact, I'm amazed at how well it works when it works. However, the fact that it works well under one set of conditions and not under another says that we're missing something here. There's something wrong and it may have wider implications. I'd like to see it fixed. If I can help, I'd love to.
Re: sound output has low pitch on Ubuntu guest
Posted: 27. Jul 2009, 04:52
by lshurr
I'm replying to my own post, but what I've found is that, at least in my case, I discovered that if the running VM is exhibiting slow audio/low pitch/distortion, I simply had to shut it down and then restart it. Do not, as I had been doing, reinstall the Guest Additions.
If your experience is the same as mine, this seems to make the audio faults go away and stay away. As they say, YMMV, Your Mileage May Vary. Good luck.
You will, of course, still have to reinstall the Guest Additions each time the guest's linux kernel is updated. It may not be immediately evident, but you will lose full functionality (e.g., shared folders) until you do.
Re: sound output has low pitch on Ubuntu guest
Posted: 10. Oct 2009, 11:29
by mkiuchi
Hello lshurr.
I've experienced same problem. I'm using 3.0.8 r53138 on MacBook. My guest OS is Fedora 11. When I installed guest additions from virtual cdrom and played music by using audacious, I heared slow sound.
I turned off vboxadd and vboxadd-service services using chkconfig command and restart guest os. Everything goes ok. I need not reinstall guest addtions and whole guest os.
workaround found for sound output has low pitch on Ubuntu gu
Posted: 10. Dec 2009, 07:18
by lshurr
I'm posting the same text here that I posted for ticket #4605 which I opened on this issue back when. I hope it will help.
Workaround found -- see if it works for you. The workaround is in Linux's snd-intel8x0 driver, which has options for working around problems with various hardware and one of these allows you to disable auto-detect on the AC'97 codec clock and set it directly. Since I have never tried to use VB's Soundblaster 16 emulation, AFAIK nothing I say here applies to it.
I use openSUSE 11.1 now instead of Ubuntu, so I used YAST to change the setting. With other distros, YMMV. In YAST, select Hardware->Sound->Edit. In the Advanced Sound Options window, select the "AC'97 codec clock (0 = auto-detect)" option and click the Edit button. Enter the value 48000 and click the OK button, returning you to the "Sound Configuration" window, where you will click the OK button again. At this point, you're finished, but YAST will update the settings and reset the audio interface before you returning you to the YAST Control Center window, which you can close.
O.K., this works for me. So far, there's no slow, distorted sound, even after powering down the emulated machine, which always induced the failure before now.
Good luck. I hope it's not too hard to apply this finding for other distros.
Re: sound output has low pitch on Ubuntu guest
Posted: 10. Dec 2009, 07:37
by lshurr
Whoops! Some inaccuracy in the YAST instructions. This should be a little better.
I use openSUSE 11.1 now instead of Ubuntu, so I used YAST to change the setting. With other distros, YMMV. In YAST, select Hardware->Sound->Edit. In the Advanced Sound Options window, select the "AC'97 codec clock (0 = auto-detect)" option and click the Edit button. Enter the value 48000 and click the OK button, returning you to the "Sound Card Advanced Options" window, where you will click the Next button. This will return you to the Sound configuration window where you should click the OK button. At this point, you're finished, but YAST will first update the settings and reset the audio interface before returning you to the YAST Control Center window, which you can close.
Re: sound output has low pitch on Ubuntu guest
Posted: 14. Dec 2009, 03:04
by lshurr
Good news for non-openSUSE users. The setting for the AC'97 codec clock workaround I mentioned in my previous post is saved in the modprobe parameters. You can download a copy of the file /etc/modprobe.d/sound by referencing ticket number 4605, "Ubuntu Linux guest audio output slow and distorted" or you can just cut and paste it from here:
options snd-intel8x0 ac97_clock=48000
options snd slots=snd-intel8x0
# CvwD.FAMlirE10w6:82801AA AC'97 Audio Controller
alias snd-card-0 snd-intel8x0
I copied this into /etc/modprobe.d/sound on my long-dormant Ubuntu 9.04 VM and it works like a charm.
Post edited for awkward grammar.
Re: sound output has low pitch on Ubuntu guest
Posted: 12. Dec 2012, 20:47
by rusl
I'm getting this same problem today. It seems to be for all mp3 audio files I play no matter what program. However, youtube seems to be playing at normal speed.
I'm going to try the reboot because I'm a little worried that modprobe stuff is dated now (2009)
It's ubuntu 12.04 as the guest inside of a Macbook OSX host. All the software is up to date including guest additions. I won't write specific versions as it seems this problem is more general than that.
Very weird bug.