PDA

View Full Version : [ubuntu] Pulseaudio causes skipping


Ed.Corcoran
August 27th, 2009, 01:10 AM
I know that this is an old problem and I've had it on every machine that pulse audio has gotten its grubby fingers on, but I figures I'd present it to the System76 experts.

Whenever I'm using sound ie almost all the time, the audio skips. It usually skips when I do something slightly processor intensive, but short. Like minimizing a window when compiz is enabled. It will also skip when I'm doing nothing at all.

This also happened on my previous computer, and I was hoping the extreme horsepower of my Wild Dog would fix the problem.

It hasn't. On my old machine, I just had a command that ran at startup that disabled pulseaudio. I haven't done that on this machine, as I'm hoping there's a way to fix pulseaudio rather than just disabling it.

Some details: the vast majority of sound played on my computer comes from Amarok 1.4, but I have also heard skips in audio from other programs. I have told Amarok to use both its pulseaudio driver and its alsa driver. In the Sound Preferences, I have alsa set for everything, but pulseaudio still runs.

thomasaaron
August 27th, 2009, 11:11 AM
Hmmm.... I've not heard any pulseaudio complaints for a while.

Off the wall question: If you disable desktop effects, does it still skip?
(Probably has nothing to do with it.)

Does it skip if you only have one sound-using application open?
Does it skip in Rhythmbox? (I don't mess with Amarok much.)
Open a terminal and run...
top
...and see if pulseaudio is hogging a lot of cpu time.

Ed.Corcoran
August 27th, 2009, 07:56 PM
Disabling desktop effects has no effect.

It has skipped when I have only Amarok and some terminals open.

It also skips in Rhythmbox.

I've been piping top to a file for the last couple minutes. The audio has skipped several times, but the only percentages of CPU usage that top shows for pulseaudio are 0, 1 and 2 percent.

thomasaaron
August 28th, 2009, 11:19 AM
Please give this a try...

http://lglinux.blogspot.com/2009/02/stuttering-sound-after-upgrade-to.html

If it doesn't work, go back to the default config.

Ed.Corcoran
August 28th, 2009, 01:57 PM
Now this is weird. As I mentioned in the thread on my crashes, I booted up using a wired Apple mouse and wired apple keyboard. Well, I've been using it since I did that about an hour ago, and the audio skipping has stopped. I still had a crash, but no audio skipping.

Weird.

I'm going to try plugging in the Logitech mouse and then the Logitech keyboard to see if one of those is causing the audio skipping for some weird reason.

Ed.Corcoran
August 28th, 2009, 02:17 PM
So as soon as I unplugged the Apple mouse, it started skipping for a few seconds and then stopped. I plugged the Apple mouse back in, and it skipped for a few seconds and then stopped. A second unplug and plug had no effect, though. Plugging in my Logitech mouse caused a single skip. Unplugging the Logitech and then plugging it back in had no effect.

Unplugging the Apple keyboard and then plugging it back in had to effect. Unplugging the Apple keyboard and plugging the Logitech in had no effect. After having the Logitech keyboard plugged in for a few minutes, I had a single skip when I switched to a new tab in Firefox. After using the computer for a few minutes with the Logitech keyboard and mouse plugged in, I have had several more skips.

Ed.Corcoran
August 28th, 2009, 02:21 PM
Please give this a try...

http://lglinux.blogspot.com/2009/02/stuttering-sound-after-upgrade-to.html

If it doesn't work, go back to the default config.

I went to try this, but it looks like my default.pa is already set to be that way.


#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
load-sample-dir-lazy /usr/share/sounds/ubuntu/stereo

.fail

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif


### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore

### Load audio drivers statically (it's probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-hal-detect.so
load-module module-hal-detect tsched=0
.else
### Alternatively use the static hardware detection module (for systems that
### lack HAL support)
load-module module-detect
.endif

### Automatically load driver modules for Bluetooth hardware
#.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover
#.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP reciever module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
#load-module module-rtp-send source=rtp.monitor

### Automatically restore the default sink/source when changed by the user during runtime
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
load-module module-console-kit

### Enable positioned event sounds
load-module module-position-event-sounds

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

### Make some devices default
#set-default-sink output
#set-default-source input

Ed.Corcoran
August 28th, 2009, 02:30 PM
I just had a skip with the Apple keyboard and Logitech mouse plugged in. I'm switching to both Apple keyboard and Apple mouse and I'll see if I get any skips that way.