15

I have a little Sony VAIO P series computer on which is installed Ubuntu 15.10 running LXDE. I've found that all audio played on the device is choppy, everything from MP4 videos played on VLC, to Skype, to Festival, is choppy. Here is a sound recording to illustrate:

https://clyp.it/vp1j2q2j

From aplay -l, I can see that the hardware playback device is HDA Intel MID ALC275. What could be going wrong and how could I try to fix it?

Zanna
  • 70,465
d3pd
  • 3,661

6 Answers6

24

Edit the file /etc/pulse/default.pa.

Find the following line:

load-module module-udev-detect

Change the line to the following:

load-module module-udev-detect tsched=0

Restart PulseAudio:

pulseaudio -k

Should do the trick.

Joerg S
  • 103
  • 3
  • Thanks for this solution :) Wonder what this option actually does - and why it is not set by default? – Joerg S Sep 14 '17 at 15:37
  • Thanks! It helped me, with a more horrible audio distortion issue. See also https://askubuntu.com/questions/371595/for-pulseaudio-what-does-tsched-do-and-what-are-the-defaults – miguev Nov 02 '17 at 16:26
  • 2
    can you provide an explanation of the commands and why they are needed? – Pedro Rodrigues Jan 22 '20 at 13:43
  • This solution also worked for me on Ubuntu 20.04, with an NVidia 1070/GP104 providing HDMI audio (no audio devices on the other end of the HDMI cables, but it's apparently enabled) and an Intel 100 Series/C230 Series audio device. Thank you so much for the solution, I have been looking for this for a really long time. :-) – NateTheGreat Sep 04 '20 at 18:12
  • 1
    @PedroRodrigues The answer you are looking for is described here: https://askubuntu.com/questions/371595/for-pulseaudio-what-does-tsched-do-and-what-are-the-defaults – karjedavpalaa Sep 07 '20 at 07:59
  • The intent of my question was to keep the answer self sufficient. But since your link is to this website I guess its ok. The OP could remove the question I guess. – Pedro Rodrigues Sep 07 '20 at 16:35
  • pulseaudio -k results in E: [pulseaudio] main.c: Failed to kill daemon: No such process – Mehdi Charife Sep 20 '23 at 20:11
5

The solution for me was to edit /etc/pulse/daemon.conf

sudo -H gedit /etc/pulse/daemon.conf

Find the line

; resample-method = 

uncomment (remove the ;) and change to

resample-method = src-sinc-best-quality

If the line is not there at all, then add it.

Reboot for changes to take effect.

Zanna
  • 70,465
XeoNoX
  • 71
3

For me none of the above worked. My issue appears to have been with adb (Android Debugging Bridge). I resolved my issue simply by stopping the adb server with the following command: adb kill-server.

Wanted to share in case anyone else was having the same issue while using adb

This likely does not apply to a lot of people.

th317erd
  • 131
  • Tried all the scheduling, sample rate settings, removing modules, distro hopping, ... But it was ADB running as a SystemD service all along! Thank you so much! – PSSGCSim Aug 24 '20 at 07:07
  • https://issuetracker.google.com/issues/150888445 corresponding google issue – Dmitriy Voronin Nov 17 '20 at 19:22
2

I just ran into a similar issue with Skype 8 (skypeforlinux).

Here are the instructions that solved my pulseaudio configuration problem.

  1. Resolve Choppy sound in (Pulseaudio) -> Skype

In /etc/pulse/daemon.conf two lines has to be also substituted:

; default-sample-rate = 44100

Should become;

; default-sample-rate = 48000

HT: PCFreak.Net

Your mileage may vary. Best of luck!

Ben M
  • 21
  • My output was really choppy on CM106 like device (using SPDIF out) and it stopped being that way only after using 96000 default sample rate. I am also using the above suggestions but they did not make a difference themselves. – hakunin Mar 08 '19 at 10:22
  • This seems to have solved it for my RME Babyface and pulseaudio 14.2 – Juliano Jul 17 '21 at 15:38
2

None of the above fixes worked for me (pulseaudio 11.1); what solved it for me was going into /etc/pulse/daemon.conf and turning off realtime-scheduling by adding in the line realtime-scheduling = no beneath the line reading ;realtime-scheduling = yes like so:

;realtime-scheduling = yes
realtime-scheduling = no

This completely fixed the issue for me.

0

I also had same issue. I first watch this => https://www.youtube.com/watch?v=v3Eyu4a1XD4 it didn't solve problem. but i kept all changes which are done according to video. then I enter following command,

$ sudo nano /etc/pulse/daemon.conf

it will open daemon.conf, then locate " ;realtime-scheduling = yes " using arrow down/up and remove " ; " and change it to " realtime-scheduling = no ". then save it (press Ctrl+o then enter)(quit => Ctrl+x). finally, run following command or restart computer.

$ systemctl --user restart pulseaudio.service

it was done job for me. Good luck. :)

  • What is the point of watching the video? – Pilot6 Feb 19 '23 at 10:06
  • This error occur for beginners who install linux/ubuntu most of the time. So they don't know about command line text editors like vi,nano. In video, youtuber explain how to go into file and how to manupulate cord. Thts why i add that link to that answer. just for help beginners. – Rashmika Abeyrathna Feb 20 '23 at 11:10