Video Playback in lucid stuttering

Bug #572580 reported by Ben Scholzen 'DASPRiD'
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Undecided
Unassigned
Nominated for Lucid by Ben Scholzen 'DASPRiD'

Bug Description

I reinstalled (not upgraded) from Karmic to Lucid yesterday, and I have serious issues now when trying to playback videos.

I tried several players, including Totem, Mplayer and VLC, and all of them show the same symptoms. When playing a video, every minute or so the video hangs for half a second and the audio stutters, then the playback resumes until the next hang. So much about the symptoms.

When looking at "top", I also saw that the CPU usage of of Xorg and compiz raises from 5%/5% to about 20%/20%. I surely already tried to disable compiz, but that didn't solve the problem. When looking at various logfiles, I also recognized the following error message repeating in /var/log/messages, but it those messages did not appear in sync with the stuttering:

pulseaudio[2049]: ratelimit.c: 2 events suppressed

I am using the NVidia binary driver by the way, running a GeForce GTX 240, if that is in any way relevant.

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

I just spotted another symptom which may help to find the source of the problem if it is related.

After playing a video, I started QuakeLive and the sound in there was delayed by about 1 or 2 seconds. After killing pulseaudio, the audio delay was gone. Killing pulseaudio did not solve the problem with the video stuttering, but I assume that this bug is related to pulseaudio now.

affects: ubuntu → pulseaudio (Ubuntu)
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 572580] Re: Video Playback in lucid stuttering

Is there any audio stuttering?

On Apr 30, 2010 4:46 PM, "Ben Scholzen &apos;DASPRiD&apos;" <
<email address hidden>> wrote:

I just spotted another symptom which may help to find the source of the
problem if it is related.

After playing a video, I started QuakeLive and the sound in there was
delayed by about 1 or 2 seconds. After killing pulseaudio, the audio
delay was gone. Killing pulseaudio did not solve the problem with the
video stuttering, but I assume that this bug is related to pulseaudio
now.

** Package changed: ubuntu => pulseaudio (Ubuntu)

--
Video Playback in lucid stuttering
https://bugs.launchpad.net/bugs/572580
You received this bug...
Status in “pulseaudio” package in Ubuntu: New

Bug description:

I reinstalled (not upgraded) from Karmic to Lucid yesterday, and I have
serious issues now when tryi...

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

In the video? Yes, as I wrote. In QuakeLive? As I said, there's this 1-2 second audio delay (and sometimes it misses to play some sounds).

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

Sorry, I should have been more precise: is there stuttering in
audio-only applications?

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

I didn't notice any yet at least (using mpd).

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

Is there any difference if you add the following line to
/etc/modprobe.d/alsa-base.conf and reboot?

options snd-hda-intel position_fix=1

On Apr 30, 2010 6:25 PM, "Ben Scholzen &apos;DASPRiD&apos;" <
<email address hidden>> wrote:

I didn't notice any yet at least (using mpd).

--
Video Playback in lucid stuttering
https://bugs.launchpad.net/bugs/572580
You received this bug...

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

Nope, no difference then.

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

Thanks. Please try linux-alsa-driver-modules-$(uname -r) from
ppa:ubuntu-audio-dev.

On Apr 30, 2010 8:00 PM, "Ben Scholzen &apos;DASPRiD&apos;" <
<email address hidden>> wrote:

Nope, no difference then.

--
Video Playback in lucid stuttering
https://bugs.launchpad.net/bugs/572580

You received this bug notification because you are a member of Ubuntu
Audio Team, which is subscribe...

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

I tried to install it, but that PPA also updated most pulseaudio packages. Now I don't have any sound, running "pulseaudio -vv" gives me the following error messages:

I: (alsa-lib)conf.c: function snd_func_refer returned error: No such file or directory
I: (alsa-lib)conf.c: Evaluate error: No such file or directory
I: (alsa-lib)pcm.c: Unknown PCM hdmi:1
I: alsa-util.c: Error opening PCM device hdmi:1: No such file or directory
D: alsa-mixer.c: Looking at profile output:hdmi-stereo+input:iec958-surround-40
D: alsa-mixer.c: Checking for playback on Digital Stereo (HDMI) (hdmi-stereo)
D: alsa-util.c: Trying hdmi:1 with SND_PCM_NO_AUTO_FORMAT ...
I: (alsa-lib)confmisc.c: Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2'
I: (alsa-lib)conf.c: function snd_func_refer returned error: No such file or directory
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed

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

Please use http://www.alsa-project.org/alsa-info.sh

On Apr 30, 2010 10:10 PM, "Ben Scholzen &apos;DASPRiD&apos;" <
<email address hidden>> wrote:

I tried to install it, but that PPA also updated most pulseaudio
packages. Now I don't have any sound, running "pulseaudio -vv" gives me
the following error messages:

I: (alsa-lib)conf.c: function snd_func_refer returned error: No such file or
directory
I: (alsa-lib)conf.c: Evaluate error: No such file or directory
I: (alsa-lib)pcm.c: Unknown PCM hdmi:1
I: alsa-util.c: Error opening PCM device hdmi:1: No such file or directory
D: alsa-mixer.c: Looking at profile
output:hdmi-stereo+input:iec958-surround-40
D: alsa-mixer.c: Checking for playback on Digital Stereo (HDMI)
(hdmi-stereo)
D: alsa-util.c: Trying hdmi:1 with SND_PCM_NO_AUTO_FORMAT ...
I: (alsa-lib)confmisc.c: Unable to find definition
'cards.USB-Audio.pcm.hdmi.0:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2'
I: (alsa-lib)conf.c: function snd_func_refer returned error: No such file or
directory
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed

--
Video Playback in lucid stuttering
https://bugs.launchpad.net/bugs/572580
You received this bug...

Audio Team, which is subscribed to pulseaudio in ubuntu.

Status in “pulseaudio” package in Ubuntu: ...

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

After another reboot, I have sound again, but the videos still hang, together with the sound stuttering:

http://www.alsa-project.org/db/?f=1f3e3815451d56c0b706a8aa959f3ea793d9e668

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

Is there any update on this issue? Today I even noticed the sound delay in QuakeLive after a fresh restart without watching videos, and a bunchload of errors in /var/log/messages repeated for a hundred times:

pulseaudio[2107]: ratelimit.c: 12 events suppressed

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

By the way, today I found the proof that it is definetly Pulseaudio's fault:

MPD usually uses ALSA by default. I tried to switch the output device to Pulseaudio, and immediently got stuttering when playing music. Switching back to ALSA solved it there.

I wonder if I can just remove/disable Pulseaudio completly without loosing any functionallity?

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

There seem to be many users by the way experiencing this problem:

http://ubuntuforums.org/showthread.php?t=1471262

Apparently, for some the tsched=0 worked, for another guy it was fixed with kernel 2.6.34.

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

Before you blame PA, make sure you update openal-soft (libopenal1) from lucid-proposed.

Revision history for this message
dr.spock (dr.spock) wrote :

I'm a Second Life user and I have found after some hours of powering on the laptop, I get up to 5-6 seconds sound delay with Second Life Viewer or Emerald viewer. It didn't happen before upgrading to Lucid. The only way to sync again the sound is to reboot the computer.

Revision history for this message
gruntlips_ (castaldo) wrote :
Download full text (3.2 KiB)

Hi,

I have the same problem, both in 9.10 and 10.04, and both after fresh installs. When I play mp3 files or video in banshee, rhythmbox, mplayer, or vlc the sound skips/stutters randomly during the song (every 20 seconds to 1 minute). I installed the following codecs and programs after the 10.04 install:

sudo apt-get install ubuntu restricted extras
sudo /usr/share/doc/libdvdread4/install-css.sh
sudo apt-get install mplayer smplayer
sudo apt-get install vlc vlc-plugin-pulse

When I remove pulseaudio using system76's code (below) the stuttering stops in both audio and video.

touch ~/.pulse-a11y-nostart
echo autospawn = no|tee -a ~/.pulse/client.conf
killall pulseaudio

When I enable pulseaudio (below) the stuttering begins again.

rm ~/.pulse-a11y-nostart
rm ~/.pulse/client.conf

I started this thread http://ubuntuforums.org/showthread.php?t=1471262 to see if anybody had some answers. Based on that I have tried the following to no avail:

1) Tweaked the default-fragments and default-fragment-size-msec default values in the file /etc/pulse/daemon.conf
2) sudo dpkg-reconfigure pulseaudio
3) Changed realtime priority from 5 to 8 in /etc/pulse/daemon.conf
4) Added tsched=0 to load-module module-hal-detect in system.pa

I am attaching a bit of the user log when I watch video with pulse and it stutters. It seems I get a lot of the following statements:

May 19 14:11:38 coldwater-laptop pulseaudio[1478]: ratelimit.c: 5 events suppressed
May 19 14:40:07 coldwater-laptop pulseaudio[1424]: pid.c: Daemon already running.
May 19 14:45:32 coldwater-laptop pulseaudio[1402]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
May 19 14:45:32 coldwater-laptop pulseaudio[1402]: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
May 19 14:45:32 coldwater-laptop pulseaudio[1402]: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
May 19 14:46:04 coldwater-laptop pulseaudio[1402]: ratelimit.c: 8 events suppressed
May 19 14:46:30 coldwater-laptop pulseaudio[1402]: ratelimit.c: 1112 events suppressed
May 19 14:48:33 coldwater-laptop pulseaudio[1402]: ratelimit.c: 1300 events suppressed

I have been posting on your forum these last few weeks about this issue. It appears that a significant number of us are having problems with pulse and that there is no ready solution. Is there either a way to fix this bug and continue using pulse or to disable pulse and do the following.

1) Fully disable pulse and install whatever replacement alsa packages are required
2) Setup up alsa so that one can change the volume controls with the fn F7,F8
3) Install an alsa applet for the top panel so one can switch inputs, outputs etc,
4) Change the loudness or gain. When under pulse I could keep the volume around 2/3 and it was plenty loud. Under alsa, it is up all the way and it is not loud enough.

Thanks,

- Chris

My specs:
System76 Serval Performance - serp4
Intel Core 2 Duo (2.50 GHz) - 4GB DDR3 RAM
Nvidia GeForce 8600M GT, 512MB RAM
320GB HDD @ 7200 RPM
Ubuntu 10.04 LTS + Gnome ...

Read more...

Revision history for this message
Pau Tallada Crespí (ptallada) wrote :

It happens to me too, using fresh install of Lucid.
$lshw
[...]
  *-multimedia
             description: Audio device
             product: SBx00 Azalia (Intel HDA)
             vendor: ATI Technologies Inc
             physical id: 14.2
             bus info: pci@0000:00:14.2
             version: 00
             width: 64 bits
             clock: 33MHz
             capabilities: bus_master cap_list
             configuration: driver=HDA Intel latency=32
             resources: irq:16 memory:fe024000-fe027fff
[...]

`mplayer -ao oss` work fine, `mplayer -ao alsa` works fine. But `mplayer -ao pulse` shows the problem. Symptoms:
 - audio stops for fractions of a second
 - the music hangs and the last fraction of a second is repeated, like a echo.

It is impossible to hear anything, just turns me crazy!

It happens also playing videos.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 10.04 (lucid) reached end-of-life on May 9, 2013.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please upgrade to the latest version and re-test.

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

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

Changed in pulseaudio (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.