It really is terrible that problems that were resolved back in 2008 are still haunting us in 2020 - 12 years on :(. I'm on Ubuntu 20.04.1 LTS.
To get rid of choppy / stuttering / skipping audio when listening to music, simply
follow post #6 here. The top of that answer reckons the method described therein is obsolete but it worked perfectly on my Dell Precision M6700 with this audio:
$ lspci | egrep -i audio
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
Maybe it worked on my laptop being it's an older model.
UPDATE:
I just realized that I did not do the right thing in case the link above dies at some point in the future.
The solution is to edit /etc/pulse/daemon.conf
and ensure the following is added/uncommented in the file:
high-priority = yes
nice-level = -15
default-sample-rate = 48000
default-fragments = 8
default-fragment-size-msec = 10
I had uncommented just the lines starting with default-...
prior to this edit, but I found that occasionally I'd get the odd stutter/skip. I haven't had any issue since adding high-priority
and nice-level
as noted in later posts in the thread linked above.
Hopefully this is the last you'll see of me regarding this issue.
UPDATE - 2021/01/03:
Despite all these changes, I was still occasionally getting stuttering audio after laptop has been running for an extended period. I'm now trying the low latency kernel as supplied by Ubuntu. The only issue I've had so far is that I cannot access my ZFS formatted USB drive - I installed the low latency kernel manually and not via the HWE method as discussed in the linked article. I might change to the HWE method to see if I can access ZFS and then I'll be fully content.
There's a really good discussion about the benefits of using a low latency kernel where audio is concerned.
Also, see this article that details how to go about installing a low latency kernel on Ubuntu.
NOTE: Since the articles I've linked to in this article are all from Stack Exchange, I figured there's no need to duplicate the content.
UPDATE - 2021/05/18:
Okay - the stuttering has returned with a vengence - despite all the changes. Feels like the machine has perfected its AI on how to become a major PITA! I'm currently trying the changes below as suggested by this article [Solved] Mint 13 Mate 32 bit, Sound Skips from back in 2012 - just 6 days shy of 9 years today. Hopefully this turns out to be the ultimate fix and hence my last edit:
In /etc/pulse/default.pa
, find and change:
from:
load-module module-udev-detect
to:
load-module module-udev-detect tsched=0
In /etc/pulse/daemon.conf
, find, uncomment, then change:
from:
;realtime-scheduling = yes
...
;default-fragments = 4
;default-fragment-size-msec = 25
to:
realtime-scheduling = yes
...
default-fragments = 8
default-fragment-size-msec = 5
Best Answer
One solution is to use an external command:
Preferences -> Sound
Method
select "Command" from the drop-down.Sound Command
, eg. "mplayer %s"