PDA

View Full Version : 13.04 -> 13.10 = Choppy/Crappy sound with Pulseaudio



evolutionv8-5
October 17th, 2013, 05:34 PM
Hello.

I've just finished upgrading the system from 13.04 to 13.10, and now I am facing a problem of weird pulseaudio behavior: the sound goes REALLY choppy, everything is just impossible to be heard. Just some scratchy-weirdy noises. Basically, it looks like the problem is caused by the sound latency on pulse 4.0, cause skype with 30/60ms goes without any problem. The only thing which fixes the problem until some other sound starts playing is to change the sound output and get it back using the sound control in system settings. Also, Flash sound doesn't work whenever you try to trigger it.

If there is a need of posting some logs, please, tell me which ones should be taken and sent here.

Thanks.

kostkon
October 17th, 2013, 10:15 PM
You could try reseting your pulseaudio configuration, by deleting the folder .pulse (i.e. in your home folder press CTRL+H or select View -> Show Hidden Files from the menu to be able to find that folder) and then logging out.

evolutionv8-5
October 18th, 2013, 12:08 PM
You could try reseting your pulseaudio configuration, by deleting the folder .pulse (i.e. in your home folder press CTRL+H or select View -> Show Hidden Files from the menu to be able to find that folder) and then logging out.
That didn't help. At all. Even purging + installing again didn't help.

kostkon
October 18th, 2013, 12:18 PM
That didn't help. At all. Even purging + installing again didn't help.
Try to configure your audio in the ubuntu sound settings again; try every device, every port and generally every possible configuration. Also, if your volume level is above 100% try lowering it a bit.

You could also check your alsa volume levels in alsamixer (CTRL+F2 or in terminal give alsamixer to run it), and you could for example try lowering PCM, although generally pulseaudio sets those levels automatically.

evolutionv8-5
October 18th, 2013, 02:14 PM
Try to configure your audio in the ubuntu sound settings again; try every device, every port and generally every possible configuration. Also, if your volume level is above 100% try lowering it a bit.

You could also check your alsa volume levels in alsamixer (CTRL+F2 or in terminal give alsamixer to run it), and you could for example try lowering PCM, although generally pulseaudio sets those levels automatically.

Neither. The problem is definitely pulseaudio 4.0 itself, cause I'm running Live 13.10 and encountering the same issues.

kostkon
October 18th, 2013, 05:17 PM
Neither. The problem is definitely pulseaudio 4.0 itself, cause I'm running Live 13.10 and encountering the same issues.
What is the hardware?:

aplay -l

messani
October 19th, 2013, 09:09 AM
(sorry for my english)

Hi. I have same problem. I have Creative Sound XFi and I have these issues with sound for long time. Problem is probably with pulseaudio.
Alsa is working great, but pulseaudio sound is bad. In past, pulseaudio somehow worked. But sometimes I had to kill it because it stopped working (like if application was stopped but buffer keeped playing). Now (with Ubuntu 13.10) pulseaudio is not usable at all - it sounds like if it is not able to play buffer correctly and sometimes (every second) play cursor jumps to another position in buffer.

My configuration is:
### ~/.asound.rc

pcm.mysurround {
type multi;
slaves.a.pcm "hw:0,0";
slaves.a.channels 2;
slaves.b.pcm "hw:0,1";
slaves.b.channels 2;
slaves.c.pcm "hw:0,2";
slaves.c.channels 2;

bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
bindings.4.slave c;
bindings.4.channel 0;
bindings.5.slave c;
bindings.5.channel 1;
}

ctl.mysurround {
type hw;
card 0;
}

pcm.ttable {
type route;
slave.pcm "mysurround";
slave.channels 6;

ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1;
ttable.1.3 1;
ttable.0.4 0.5;
ttable.1.4 0.5;
ttable.0.5 0.25;
ttable.1.5 0.25;
}

ctl.ttable {
type hw;
card 0;
}

pcm.!default {
type plug;
slave.pcm "ttable";
}

ctl.!default {
type hw;
card 0;
}

### /etc/pulse/default.pa changes:

I uncommented and changed these lines:
load-module module-alsa-sink device=default
load-module module-alsa-source device=hw:0,0

I commented these lines:
#### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
#### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif

### aplay -L

tibor@tibor-EP43T-USB3:/etc/pulse$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
mysurround
ttable
default
sysdefault:CARD=XFi
Creative X-Fi, Front/WaveIn
Default Audio Device
front:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
Front speakers
rear:CARD=XFi,DEV=0
Creative X-Fi, Surround
Rear speakers
center_lfe:CARD=XFi,DEV=0
Creative X-Fi, Center/LFE
Center and Subwoofer speakers
side:CARD=XFi,DEV=0
Creative X-Fi, Side
Side speakers
surround40:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
4.0 Surround output to Front and Rear speakers
surround41:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=XFi,DEV=0
Creative X-Fi, IEC958 Non-audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
Direct sample mixing device
dmix:CARD=XFi,DEV=1
Creative X-Fi, Surround
Direct sample mixing device
dmix:CARD=XFi,DEV=2
Creative X-Fi, Center/LFE
Direct sample mixing device
dmix:CARD=XFi,DEV=3
Creative X-Fi, Side
Direct sample mixing device
dmix:CARD=XFi,DEV=4
Creative X-Fi, IEC958 Non-audio
Direct sample mixing device
dsnoop:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
Direct sample snooping device
dsnoop:CARD=XFi,DEV=1
Creative X-Fi, Surround
Direct sample snooping device
dsnoop:CARD=XFi,DEV=2
Creative X-Fi, Center/LFE
Direct sample snooping device
dsnoop:CARD=XFi,DEV=3
Creative X-Fi, Side
Direct sample snooping device
dsnoop:CARD=XFi,DEV=4
Creative X-Fi, IEC958 Non-audio
Direct sample snooping device
hw:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
Direct hardware device without any conversions
hw:CARD=XFi,DEV=1
Creative X-Fi, Surround
Direct hardware device without any conversions
hw:CARD=XFi,DEV=2
Creative X-Fi, Center/LFE
Direct hardware device without any conversions
hw:CARD=XFi,DEV=3
Creative X-Fi, Side
Direct hardware device without any conversions
hw:CARD=XFi,DEV=4
Creative X-Fi, IEC958 Non-audio
Direct hardware device without any conversions
plughw:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
Hardware device with all software conversions
plughw:CARD=XFi,DEV=1
Creative X-Fi, Surround
Hardware device with all software conversions
plughw:CARD=XFi,DEV=2
Creative X-Fi, Center/LFE
Hardware device with all software conversions
plughw:CARD=XFi,DEV=3
Creative X-Fi, Side
Hardware device with all software conversions
plughw:CARD=XFi,DEV=4
Creative X-Fi, IEC958 Non-audio
Hardware device with all software conversions

messani
October 19th, 2013, 09:33 AM
I have probably figured it out.

I added parameter "tsched=0" into my /etc/pulse/default.pa

Lines look like this:

load-module module-alsa-sink device=default tsched=0
load-module module-alsa-source device=hw:0,0 tsched=0

Because I have customized configuration, you will probably need to add this parameter to this line:
load-module module-udev-detect tshced=0

Since this change pulseaudio works well :)

mikestrange145
October 31st, 2013, 01:49 PM
This looks good.
But I have a question.
Where in /etc/pulse/default.pa shall the lines actually be pasted ?

childintime
November 16th, 2013, 12:33 PM
I also have this problem, cracking sound come from speakers, and adding
load-module module-udev-detect tshced=0didn't help.

restarting pulseaudio didn't help either:
pulseaudio -k
pulseaudio --start

Also tried those fixes, but didn't work: https://wiki.ubuntu.com/Audio/PositionReporting Sound is cracking every few seconds even when no applications are running. Crackling noise disappears if I mute sound, but it does not disappear if I make sound on lowest setting possible.

heldal2
November 17th, 2013, 02:57 PM
Something is weird with the communication between pulseaudio and the alsa-drivers. I use ubuntu-studio for audio production with jack, and found that the jack-sink for pulseaudio works well. There's no sync problem when jack sits between pulseaudio and alsa. Whatever I do to make pulseaudio use the same samplerate (48k) and formats (s24le) as jack makes no difference. Standalone pulseaudio with direct connection to alsa is useless with any of my audio-adapters (Intel HDA, Roland 2ch USB, Behringer X32 mixer w/32ch USB, Soundcraft digital mixer w/32ch FW, Presonus 8ch USB).

polrus
December 5th, 2013, 05:37 PM
i also have the same problem on fresh 13.10 install and the latest skype :/

terranim
December 21st, 2013, 05:32 PM
I have also been having issues with choppy sound in Kubuntu 13.10, with none of the old fixes (tsched=0) working. Your suggestion, heldal2, works though, I have found that by using jack as the interop layer between pulseaudio and alsa the playback is clean. For anyone else wanting to do the same, I followed the instructions at https://help.ubuntu.com/community/UbuntuStudio/ProAudioIntro/1204

karsta62
January 30th, 2014, 06:54 PM
Same issue. Mainly with flash. Starts ok, but in a few seconds starts getting choppier and choppier.
As soon as I open pavucontrol, the sound choppiness goes away immediately. If I close pavucontrol, it's choppy again immediately.

Workaround2:
I have two sound cards. I disabled "simultaneous output" in pulseaudio preferences. Got even flash video better as well.

linuxgeoff
February 14th, 2014, 01:49 PM
Seems that this is now an acknowledged bug with Puklse 4.0 compatibility for many apps. workaround:

change puklse latency before calling app, .e.g.:

env PULSE_LATENCY_MSEC=30 appl_name

You can embed this in the app launcher, e.g. - for audacity:

sudo sed -i 's/^Exec=.*/Exec=env PULSE_LATENCY_MSEC=30 audacity %U/' /usr/share/applications/audacity.desktop

anacletus2
April 3rd, 2014, 06:19 PM
Something is weird with the communication between pulseaudio and the alsa-drivers. I use ubuntu-studio for audio production with jack, and found that the jack-sink for pulseaudio works well. There's no sync problem when jack sits between pulseaudio and alsa. Whatever I do to make pulseaudio use the same samplerate (48k) and formats (s24le) as jack makes no difference. Standalone pulseaudio with direct connection to alsa is useless with any of my audio-adapters (Intel HDA, Roland 2ch USB, Behringer X32 mixer w/32ch USB, Soundcraft digital mixer w/32ch FW, Presonus 8ch USB).

Thanks hedal2, You solved my problem with flash-player with pulseaudio on a amd64 system. Just to clarify for nobs as me, I followed the instructions at
https://help.ubuntu.com/community/UbuntuStudio/ProAudioIntro/1204
as terranim suggested: installed jack and configured it with QjackCtl to use alsa as his output. I also had to put a "2" instead of a "3" in "periods/buffer". After that, I could press the Start button and jackd started without erros
Then on firefox entered a flash page and started to play sound. With pavucontrol , "playback" tab, I changed the output of the app Alsa plug-in (plugin-container) to "Jack sink" and the sound started to be heared. So I think flash is playing sound to alsa-plugin , wich is recevied by pulseaudio who sends it to Jack thru jack sink, who finally outputs it to alsa directly. No more choppy sound.