sound output has low pitch on Ubuntu guest

Discussions related to using VirtualBox on Windows hosts.

sound output has low pitch on Ubuntu guest

Postby dr.malkovich » 20. Jul 2009, 04:26

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?
dr.malkovich
 
Posts: 1
Joined: 15. Jul 2009, 03:56
Primary OS: MS Windows Vista
VBox Version: OSE self-compiled
Guest OSses: Ubuntu 9.04

Re: sound output has low pitch on Ubuntu guest

Postby lshurr » 22. Jul 2009, 05:24

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.
lshurr
 
Posts: 16
Joined: 22. Jul 2009, 03:50
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu 9.0.4, openSUSE 11.1, Windows XP SP3

Re: sound output has low pitch on Ubuntu guest

Postby lshurr » 27. Jul 2009, 04:52

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.
lshurr
 
Posts: 16
Joined: 22. Jul 2009, 03:50
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu 9.0.4, openSUSE 11.1, Windows XP SP3

Re: sound output has low pitch on Ubuntu guest

Postby mkiuchi » 10. Oct 2009, 11:29

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.
mkiuchi
 
Posts: 1
Joined: 10. Oct 2009, 11:21
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Fedora 11

workaround found for sound output has low pitch on Ubuntu gu

Postby lshurr » 10. Dec 2009, 07:18

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.
lshurr
 
Posts: 16
Joined: 22. Jul 2009, 03:50
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu 9.0.4, openSUSE 11.1, Windows XP SP3

Re: sound output has low pitch on Ubuntu guest

Postby lshurr » 10. Dec 2009, 07:37

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.
lshurr
 
Posts: 16
Joined: 22. Jul 2009, 03:50
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu 9.0.4, openSUSE 11.1, Windows XP SP3

Re: sound output has low pitch on Ubuntu guest

Postby lshurr » 14. Dec 2009, 03:04

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.
lshurr
 
Posts: 16
Joined: 22. Jul 2009, 03:50
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu 9.0.4, openSUSE 11.1, Windows XP SP3

Re: sound output has low pitch on Ubuntu guest

Postby rusl » 12. Dec 2012, 20:47

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.
rusl
 
Posts: 13
Joined: 7. Mar 2008, 09:53
Location: vancouver, bc
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: windoze, (various)buntu


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: kst and 46 guests