PA 5.1 surround vibrate(oscilate, vary)

Bug #772738 reported by cccccccc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

 Hi,
I have problems with PA few years. I understand that my onboard soundcard is culprit (Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)). But it's not my fault, right?
Last three years, surround was very problematic for me, but this very last problem is still present.
Everything works when I use stereo (2 channels). But switching to surround (5.1) sound from few channels begins to "vibrate" (or "oscilate"... I am not sure for appropriate word in English). I found this problem on the net, but complaining users used expression "stutter" which is no this case (stuttering means repeating the same thing on and on). My sound (from right front and rear) vibrates: I hear sound stops and goes two times per single second. It fluctuates (varies). If sound was light, I would use term flicker, but not sure how to describe the fact when sound is on and off all the time.
I have tried to apply some "stuttering fixes" in daemon.conf and default.pa files... but after restarting PA none have worked (like high-priority, nice-level, realtime-scheduling, realtime-priority, enable-remixing...). Maybe I set wrong values.
One year back I somewhere used tsched=0 (?) directive and I remember, that this problem has disappeared, but PA eats massively my CPU, so I had to switch it back (since I was not able to watch HD movies).
This complaint is like duplicate of part 2 of my bug 482709 -> you can discard bug 482709 since other parts works for me.

I have (always) latest ubuntu (PA from Ubuntu's repositories) - 11.04 PA 0.9.22+stable-queue-24-g67d18-0ubuntu3

Guys, please help me here and make this years lasting problem disappear forever. Thank you very much.

Cyril

Revision history for this message
David Henningsson (diwic) wrote :

Hi Cyril,

Is this bug also present when you bypass pulseaudio with this command:

pasuspender -- speaker-test -t sine -D plughw:0 -c 6

Please also attach an alsa-info according to these instructions: wiki.ubuntu.com/Audio/AlsaInfo

Thanks!

Revision history for this message
cccccccc (cccccccc) wrote :

Hi,
using your command, everything is OK. So is by using this:
speaker-test -Dplug:surround51 -c6 -l1 -twav - I used to try 5.1 surround.
Here is the file you've asked for. Thanks

Revision history for this message
David Henningsson (diwic) wrote :

Ok, I'm wondering whether it is possible for you to catch the noise for me, e g like this:

1) Start:
speaker-test -t sine -D pulse -c 6
...and notice that you have the "broken" sound.
2) Start audacity, make sure it records six channels and that the sound driver is set to "ALSA: default" or "ALSA: pulse". Start recording
3) Start pavucontrol and set audacity to record from the "monitor source" of the output.

Audacity should now record a six channel stream. If this stream is actually broken, could you attach the resulting six channel wave file here? Thanks!

Revision history for this message
cccccccc (cccccccc) wrote :

 Hi David,

 of course it is. Thanks for helping. I am not sure if I got you:

1. I ran your command and yes the sound is weird - bronken
2. I ran audacity with this configuration: ALSA-pulse-default: Line:0 - 1(Mono), I start recording (that is the "broken" part in my file starting from 0s to 12s)
3. I ran pavucontrol and set monitor source; suddenly, sound looks better (from 12 sec to the end)

In fact, sound has pretty "constant" graph in audacity (I've tried also setting "6" instead of "1(Mono)) - but 2 speaker channels (rear and front right) still vibrate - fluctuate (problem still presents). This is strange, isn't it?

If I can help more, please, do let me know. Once again, thanks!

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 772738] Re: PA 5.1 surround vibrate(oscilate, vary)

Without being able to access the recorded audio, the symptoms read a
lot like latency and/or optimization issues.

Please follow https://wiki.ubuntu.com/PulseAudio/Log, but this time
also prepend "PULSE_NO_SIMD=1" to the pulseaudio invocation.

Revision history for this message
cccccccc (cccccccc) wrote :

Hi Daniel, good to see you again.

>> Without being able to access the recorded audio
Are you suggesting, the mp3 link is incorrect?

I just tried your log advice. Strange thing happened. I was not able to reproduce bug - using David's speaker-test -t sine -D pulse -c 6. Everything was OK (I used PULSE_NO_SIMD=1 of course).

So than I have tried to play some mp3 or 5.1 movie for you, to detect bug in PA log, but I was no able to get it work. My Audacious didn't want to play. I have clicked on song, but time slider was moving on the same time 0:00 - so I have moved it forward to 2:00, and no sound - it like looped at 2:00.
So I have tried to play 5.1 movie with Smplayer - but result was the same as in Audacious - no movie was played - it has looped over and over on the same time (no video or audio). Maybe this is my fault(?).
So, I cancelled logging and am enclosing you the log file. Maybe you will see something there.
Thanks for helping and let me know. Bye.

Revision history for this message
David Henningsson (diwic) wrote :

cccccccc, thanks. I think there are two different bugs here, one being the vibrating noise, the other one being pulseaudio being stuck in "requesting rewind due to underrun" (causing playback to stall entirely).

What does not make sense to me, is that if pulse is actually mixing things wrong, we should be able to pick up the wrong sound through the digital loopback (according to comment #3). But the only difference between PULSE_NO_SIMD being there or not, is how pulse does its mixing. So it's hard to draw any conclusions at this point :-(

Revision history for this message
cccccccc (cccccccc) wrote :

Hi,

ok, David, can you (we) focus only on vibrating noise from channels? I am not sure if "rewind due to underrun" was not my fault.

I have filed another bug long time ago, because my sound sometimes went away completely. I was really desperate and thought this was pulseaudio issue. But by accident, I managed to find out, that the culprit was my fan on my motherboard's chipset few days back. It was old and sometimes did not cool temperature from chipset enough because the it did not rotate. I can tell you that I can fry my steak on it. I use 5.1 onboard sound card, so chipset disliking hot "weather" was destroying the sound according to the random fan cooling capabilities. So I've greased the fan as hell (we have closed reported bug also), and problem with slowing sound disappeared. HEUREKA!

But unluckily, the vibrating problem is still here. So what I did again (if it can help) is what I have written in #6. I was able to run mp3 and movies (still with vibrating problem) successfully this time. I'm enclosing file.
To be sure with correct no simd invocation, I ran this command: LANG=C PULSE_NO_SIMD=1 pulseaudio -vvvv > ~/pulseverbose2.log 2>&1
I first ran your #3 stuff with 6 channels (merged to final mp3 - but I have also audacity project saved), than ran some mp3 and also one 5.1 fullHD movie.

Revision history for this message
cccccccc (cccccccc) wrote :

Ou, and here is again new output from your #3 6 channels audacity merged to mp3.
This time, sound was crackling all the time I can swear (but the mp3 file says/sounds opposite, don't know why...).
First I have the option "Monitor of Internal Audio Analog Surround 5.1" (for about 30 seconds in enclosed mp3) and then I have chosen QuickCam Zoom Analog Mono. Sound did not change, but the wave in audacity have much smaller "wave" than in "Monitor .... " mode.
Bye.

Revision history for this message
David Henningsson (diwic) wrote :

So are you saying that using the same test case (running PULSE_NO_SIMD=1 pulseaudio ... ) the vibrating problem sometimes does not occur (comment #6) and sometimes does occur (comment #8)? I'm just trying to find some kind of pattern in what's causing the problem.

So far I'm leaning towards a driver rather than a pulseaudio issue, as you haven't been able to capture the noise through the monitor but it's difficult to know... (As for submitting audio samples though - if you actually are able to capture something purely digitally, wave is preferred over mp3 because mp3 is destructive compression.)

Are you able to reproduce the same vibrating problem on another computer - i e, you mentioned there have been hw problems before, can we rule out hw problems now?

Revision history for this message
cccccccc (cccccccc) wrote :

Hi,

no, problem is still present on 5.1 (so is with no simd). It is hard for me to detect it by your sound tests. What I use is always observation by listening to mp3 or movie.

I think it could be driver thing, too. But as I have mentioned in #1, in older Ubuntu, I have fixed this problem by tuning some values (but I do not remember the fixes now:(() in pulse configs (that was golden times for me!)... After new Ubuntu on the way - I have overwritten cfg and now problem is still here. Also, setting tsched=0 options somewhere works for me (except high cpu load), so I think there could be the way...
I could record you some audio samples direct from channel by mic - to understand my problem better, but it would probably not help.

Reproducing this bug on another PC would be impossible. I am sure, that this problem is caused by my old onboard realtek (or nVidia or what) soundcard and maybe by its drivers. Hmm... but I have friend which has the same motherboard - but does not have 5.1 channels. I think, I will try 5.1 on his PC to eliminate HW problem (and prove driver's problem?). Let you know. Thanks.

Revision history for this message
cccccccc (cccccccc) wrote :

So, I am back. It took me little longer to make my final test. I tried to run 5.1 surround at my friend's PC (he has the same motherboard - and so the same onboard sound card). He had the same problem as me, so we can definitely exclude some HW issues. This could be driver or pulseaudio...

Revision history for this message
David Henningsson (diwic) wrote :

Ok. Maybe tsched=0 could be something to try.

(Change /etc/pulse/default.pa, the line that says "load-module module-udev-detect", append " tsched=0" to that line)

Otherwise I'm out of ideas at the moment.

Revision history for this message
cccccccc (cccccccc) wrote :

yeah, thanks, this option solved the problem indeed, except for my high cpu load. playing mp3 eats 15 % (pulseaudio).

what's more interesting is, that CPU (when watching movies fullhd - but accelerated via gpu) is on 100% (mostly user space) even if sum of cpu processes via top show no more then 30 %...

I would like to ask you one last favour. Don't you know by chance if there is option to switch between sound stereo(2) and surround (5.1) via console (some bash command) script? Using gui via Sound Preferences takes me a lot of time.

If you have some news for me, let me know here, I will be coming here regularly in few months span.
Thanks you for your effort. Take care.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Yes, you can use pacmd or pactl to migrate the sink.

This really seems like a driver issue, so I'm going to triage it as such.

affects: pulseaudio (Ubuntu) → alsa-driver (Ubuntu)
Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for alsa-driver (Ubuntu) because there has been no activity for 60 days.]

Changed in alsa-driver (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.