[SOLVED] Fixing pulseaudio stutters and pauses

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 3rd, '14, 21:13

I have Mageia 4 x86_64 with all updates installed, so kernel 3.14.18.
On a Dell Inspiron 7720 17R SE laptop.

Both with speakers as with Logitech H800 wireless headphones via Bluetooth, I have stutters and pauses in the sound every ~15 minutes.
I found:
http://rightfootin.blogspot.be/2009/05/ ... auses.html
Basically it puts PulseAudio in realtime priority.

But how can I apply that on Mageia 4 ?
There is no group pulse-rt in Mageia 4.

No matter what I try, I always get priority 9 and nice -11 for PulseAudio (command "top" output)

Code: Select all
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                         
 5338 bert       9 -11  804m 6756 3876 S    2  0.1   0:51.84 pulseaudio   
 
Last edited by bertaerts on Dec 17th, '14, 23:23, edited 1 time in total.
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Oct 4th, '14, 14:36

Pulseaudio will get realtime priority by default, that's also why you see a nice value of -11. You may want to read up on rtkit.
Please show the output as root of
Code: Select all
journalctl -ab | grep rtkit


For how to change the priority of pulseaudio, check the default settings in /etc/pulse/daemon.conf and change for testing:

Code: Select all
; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5
; rlimit-nice = 31
; rlimit-rtprio = 9


This is explained in detail on one of the german Ubuntu wiki pages, check
https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=de&ie=UTF-8&u=http%3A%2F%2Fwiki.ubuntuusers.de%2FPulseAudio%23Prioritaet-erhoehen&edit-text=

https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=de&ie=UTF-8&u=http%3A%2F%2Fwiki.ubuntuusers.de%2FPulseAudio%23Qualitaet-CPU-Auslastung&edit-text=


There are some other things you can check:
https://wiki.ubuntu.com/Audio/PositionReporting
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby claire » Oct 4th, '14, 23:25

Is this Kde by any chance? I seem to remember some found switching to phonon-vlc improved things.
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: Fixing pulseaudio stutters and pauses

Postby daniewicz » Oct 5th, '14, 04:51

I am a longtime Mageia/KDE user and have often found that disabling pulseaudio removes audio stutters and pauses. This can be done from the Mageia Control Center.
The dude abides.
User avatar
daniewicz
 
Posts: 217
Joined: Feb 10th, '13, 03:37

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 5th, '14, 21:05

Hi doktor5000,

Thanks for the tips.

Code: Select all
[root@Dell7720Mageia4 bert]# journalctl -ab | grep rtkit
Oct 05 20:44:40 Dell7720Mageia4 dbus[965]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service'
Oct 05 20:44:40 Dell7720Mageia4 systemd[1]: [/usr/lib/systemd/system/rtkit-daemon.service:32] Unknown lvalue 'ControlGroup' in section 'Service'
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully called chroot.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully dropped privileges.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully limited resources.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Running.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Watchdog thread running.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Canary thread running.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2790 of process 2790 (/usr/bin/pulseaudio) owned by '500' high priority at nice level -15.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 1 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 1 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2795 of process 2790 (/usr/bin/pulseaudio) owned by '500' RT at priority 1.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 2 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 2 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2797 of process 2790 (/usr/bin/pulseaudio) owned by '500' RT at priority 1.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 3 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 3 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2798 of process 2790 (/usr/bin/pulseaudio) owned by '500' RT at priority 1.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 4 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 4 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2799 of process 2790 (/usr/bin/pulseaudio) owned by '500' RT at priority 1.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 5 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 5 threads of 1 processes of 1 users.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2800 of process 2790 (/usr/bin/pulseaudio) owned by '500' RT at priority 1.
Oct 05 20:44:40 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 6 threads of 1 processes of 1 users.
Oct 05 20:44:43 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 2983 of process 2983 (/usr/bin/pulseaudio) owned by '500' high priority at nice level -15.
Oct 05 20:44:43 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 7 threads of 2 processes of 1 users.
Oct 05 20:44:43 Dell7720Mageia4 rtkit-daemon[2791]: Successfully made thread 3001 of process 3001 (/usr/bin/pulseaudio) owned by '500' high priority at nice level -15.
Oct 05 20:44:43 Dell7720Mageia4 rtkit-daemon[2791]: Supervising 7 threads of 2 processes of 1 users.


This is with following settings in /etc/pulse/daemon.conf:

Code: Select all
high-priority = yes
nice-level = -20
realtime-scheduling = yes
realtime-priority = 1
rlimit-nice = -20
rlimit-rtprio = 1


This leads to following result in "top":

Code: Select all
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
2790 bert       5 -15  728m  11m 9044 S    1  0.1   0:07.19 pulseaudio


So I don't understand why nice is -15 if I request -20 ?

Unfortunately with these settings the H800 headphones and speakers still stutter :-(

Hi Claire,

This indeed is KDE. Backend is the default Phonon GStreamer.
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Oct 5th, '14, 21:46

Seems to me the nice values are not the problem. pulseaudio will already get much more cpu ressources then any other thread. How many processes do you have at all with nice values lower then 0 ?

Would you at least mention what application you're using to play sound? Would also be a little bit helpful to see output of
Code: Select all
uptime
to glance over the load averages.
Also, how many sound applications are running overall, whether playing sound or not?

Also, to try to find out if pulseaudio itself is the problem, simply start a shell where you disable pulseaudio, then run your favourite application to play sound and check for a while.
Code: Select all
pasuspender bash


Dumb question: your headphones are wireless, are your speakers too? Did you check with some normal cable headphone, or with some normal speakers?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 5th, '14, 21:55

Just a quick answer to some of your questions.

My speakers are built-in my notebook, by no means wireless.
My sound app is Clementine, only one app, no others.
I also tried Amarok, which suffers from the same "stutters".

My Intel i7 processor is not at all loaded:

Code: Select all
[bert@Dell7720Mageia4 ~]$ uptime
 21:48:16 up 40 min,  3 users,  load average: 0.34, 0.34, 0.40


There are many apps with nice -20:

Code: Select all
[bert@Dell7720Mageia4 ~]$ ps -efl | grep "20"
1 S root         5     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/0:0H]
1 S root        13     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/1:0H]
1 S root        17     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/2:0H]
1 S root        21     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/3:0H]
1 S root        25     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/4:0H]
1 S root        29     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/5:0H]
1 S root        33     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/6:0H]
1 S root        37     2  0  60 -20 -     0 worker 21:07 ?        00:00:00 [kworker/7:0H]
1 S root        38     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [khelper]
1 S root        40     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [netns]
1 S root        41     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [writeback]
1 S root        44     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [kintegrityd]
1 S root        45     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [bioset]
1 S root        46     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [crypto]
1 S root        47     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [kblockd]
1 S root        48     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [ata_sff]
1 S root        49     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [md]
1 S root        50     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [devfreq_wq]
1 S root        66     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [kthrotld]
1 S root        69     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [scsi_tmf_0]
1 S root        71     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [scsi_tmf_1]
1 S root        73     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [scsi_tmf_2]
1 S root        75     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [scsi_tmf_3]
1 S root        77     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [scsi_tmf_4]
1 S root        79     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [scsi_tmf_5]
1 S root        86     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [kpsmoused]
1 S root        88     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [bioset]
1 S root        89     2  0  60 -20 -     0 rescue 21:07 ?        00:00:00 [deferwq]
1 S root       302     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/3:1H]
1 S root       303     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/5:1H]
1 S root       304     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/0:1H]
1 S root       307     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/1:1H]
1 S root       313     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/4:1H]
1 S root       330     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/7:1H]
1 S root       338     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/6:1H]
1 S root       373     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/2:1H]
1 S root       419     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [ext4-rsv-conver]
1 S root       472     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [ipv6_addrconf]
1 S root       505     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [rpciod]
1 S root       535     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [kvm-irqfd-clean]
1 S root       581     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [cfg80211]
1 S root       586     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [hd-audio1]
1 S root       588     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [hd-audio0]
1 S root       658     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [iwlwifi]
1 S root       732     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [ext4-rsv-conver]
1 S root       865     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/u17:0]
1 S root       866     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [hci0]
1 S root       867     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [hci0]
1 S root       869     2  0  60 -20 -     0 worker 21:08 ?        00:00:00 [kworker/u17:2]
1 S root       871     2  0  60 -20 -     0 rescue 21:08 ?        00:00:00 [scsi_tmf_6]
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby benmc » Oct 6th, '14, 02:28

does moving the mouse pointer affect the audio playback?

I had a similar issue with a new mobo and Mga 1
benmc
 
Posts: 1204
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Oct 6th, '14, 06:55

bertaerts wrote:There are many apps with nice -20:
[bert@Dell7720Mageia4 ~]$ ps -efl | grep "20"

As you can see by the enclosing [ ] around the command field, those are all processes with no commandline/no argument.
Meaning all of those are kernel processes and irrelevant. What other processes with nice values below 0 do you have?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 7th, '14, 20:13

There are no other processes with negative nice level (except the earlier listed kernel threads).
So the priority of pulseaudio is most probably not an issue.

Moving the mouse pointer has no effect on sound.

I am currently testing phonon-vlc iso phonon-gstreamer as pulseaudio backend.

And also in /etc/pulse/daemon.conf
Code: Select all
default-sample-rate = 48000
default-fragments = 16

No final results yet although it seems already better.
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 10th, '14, 17:29

I give up.
Whatever I try, I always get the stutters/pauses.

Not using pulseaudio is not an option, then my Bluetooth Headphones don't work anymore.
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby jiml8 » Oct 10th, '14, 17:34

Storage problem? If the sound data does not reach the sound server in a timely fashion, you'll get stuttering.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 25th, '14, 08:57

Some more experiments done, but no solution found yet...

First of all some more info on where the mp3 music is stored.
My notebook has an SSD with OS's linux (ext4) and Windows 7 (NTFS).
And an HDD with /home partition for Mageia (ext4) and data partition for both Windows 7 and Mageia (NTFS).
It is on this last HDD NTFS data partition that my music is stored (accessible by both OS's).
But I already moved some music to the Mageia "/" SSD parttion and the pause/stutter still occurs.

I also excluded PulseAudio by using jack by first installing
gstreamer0.10-jack-0.10.31-6.mga4
and selecting Tools/Preferences/General/Playback/GStreamer audio engine/Output plugin: Audio sink (jack)
I used the second wireless option of my Logitech H800 headphones, not bluetooth but USB transceiver.
Jack is able to route the music to this USB device.
The pause/stutter still occurs every 15 moinutes, same as before.
So this means PulseAudio is not the root cause...

I also used VLC to play mp3, same issue.

I also used GNOME iso KDE as window manager, same issue.

Last thing I tried was to increase priority for Clementine:
KDE menu editor entry for Clementine

Code: Select all
ionice -c1 -n0 nice -n -20 su -c clementine bert %U

with tab Advanced "Run as different user" root
(root needed for nice to negative level)
Issue still happens.

Now I am out of ideas :-(
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby jiml8 » Oct 25th, '14, 18:52

Some time ago, I was having trouble with stuttering audio in virtual machines on 32 bit Mandriva 10. While it wasn't a hugely high priority, I did work on it and made considerable progress, though I never solved it completely until after installing 64 bit Mageia, then a few months later changing motherboard. Now my VMs work perfectly.

Anyway, I ran across some notes on how I got things working as well as they would work when I was working on that problem.

I don't know if this will help you, but this is what I did:
Code: Select all
Reset sound system to eliminate choppy VMware sound:

2) sudo emacs /etc/pulse/daemon.conf
3) do the following changes to the file (uncomment if necessary some line, just remove the ? ; ? to uncomment)

high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
default-fragments = 8
default-fragment-size-msec = 5
resample-method = speex-float-3

4) save and close the file
5) Test
Always in the Terminal :
pulseaudio -k
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 26th, '14, 16:41

Adapting /etc/pulse/daemon.conf did not make any difference.
I also don't use sound from virtual machines.

But now I used a clock to time exactly when this pause in music happens: it is exactly every twenty minutes.
What linux process takes highest priority every 20 minutes?
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Oct 26th, '14, 16:50

bertaerts wrote:What linux process takes highest priority every 20 minutes?

Wrong question. Question should be: What happens every 15-20 minutes regularly, and why does the sound stutter then?
Is your machine IO-bound at that time, or CPU-bound or memory-bound?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Oct 26th, '14, 17:30

I have on my screen 4 KDE plasma applets: CPU (Intel Core i7 with 8 threads), Network (wireless lan), Disk Activity (SSD and HDD) and RAM.
Every 20 minutes:
+ CPU 8 threads: not loaded at all
+ Network: didn't check
+ IO: small peak on SSD
+ RAM: no increase
The only 2 applications open are Firefox and Clementine.
Is that an answer to your question doktor5000?
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Oct 26th, '14, 19:00

It was a rhethorical question meant to help you.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Dec 5th, '14, 22:37

Just some evidence on what is happening every 20 minutes from journalctl:

Code: Select all
Dec 02 21:12:03 Dell7720Mageia4 pulseaudio[2969]: [bluetooth] module-bluez5-device.c: Skipping 387514 us (= 68356 bytes) in audio stream
Dec 02 21:32:04 Dell7720Mageia4 pulseaudio[2969]: [bluetooth] module-bluez5-device.c: Skipping 387286 us (= 68316 bytes) in audio stream

Dec 03 21:08:58 Dell7720Mageia4 pulseaudio[2791]: [bluetooth] module-bluez5-device.c: Skipping 386450 us (= 68168 bytes) in audio stream
Dec 03 21:28:58 Dell7720Mageia4 pulseaudio[2791]: [bluetooth] module-bluez5-device.c: Skipping 391516 us (= 69060 bytes) in audio stream


380 milliseconds is a very annoying interruption of the audio via Logitech H800 Bluetooth headphones.

So I am still hunting for a very high priority process that interrupts pulseaudio that long and every 20 minutes...
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Dec 5th, '14, 23:55

Did you try to open a bugreport upstream to check why the audio stream skips?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Dec 10th, '14, 21:47

doktor5000:
I don't know where to report an issue yet...
pulseaudio is interrupted by something...
pulsaudio is not the root cause itself

I did the following, at 19 minutes 50 seconds I ran:

Code: Select all
top -bd .1 -n 150 > top_log_3.txt
grep -A 2 COMMAND top_log_3.txt > top_log_3_grep.txt


This resulted in just at the moment of sound interrupt (2 experiments with same result):

Code: Select all
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  601 root     -51   0     0    0    0 S    9  0.0   0:03.39 irq/46-iwlwifi
 2850 bert      20   0 3333m 138m  43m S    9  1.8   0:51.75 plasma-desktop

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  607 root     -51   0     0    0    0 S    9  0.0   0:03.97 irq/46-iwlwifi
  837 root       0 -20     0    0    0 S    9  0.0   0:04.69 kworker/u17:2


So I think the conclusion is that the wifi driver iwlwifi is handling an interrupt every 20 minutes that takes 380 milliseconds?
For reference the priority of pulseaudio:

Code: Select all
3017 bert       9 -11  813m 7860 4900 S    0  0.1   0:24.34 pulseaudio
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby doktor5000 » Dec 10th, '14, 22:26

bertaerts wrote:I don't know where to report an issue yet...
pulseaudio is interrupted by something...
pulsaudio is not the root cause itself

https://bugs.freedesktop.org/enter_bug. ... PulseAudio
I'd ask there how to find out WHY pulseaudio skips for some time.
But feel free to search for yourself.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Dec 11th, '14, 21:08

bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby bertaerts » Dec 15th, '14, 18:10

Tried to unload iwlwifi and succeeded in it.
Bluetooth is handled by another module, as it kept on working.
Code: Select all
[root@Dell7720Mageia4 bert]# rmmod iwlwifi
rmmod: ERROR: Module iwlwifi is in use by: iwldvm
[root@Dell7720Mageia4 bert]# rmmod iwldvm
[root@Dell7720Mageia4 bert]# rmmod iwlwifi


But still interrupt in sound via Bluetooth headphones as shown here:
Code: Select all
[root@Dell7720Mageia4 bert]# journalctl --lines=20
-- Logs begin at Fri 2014-02-21 19:17:02 CET, end at Mon 2014-12-15 12:39:03 CET. --
Dec 15 12:36:54 Dell7720Mageia4 chronyd[966]: Can't synchronise: no reachable sources
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Chip: i8k-virtual-0
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Adapter: Virtual device
Dec 15 12:39:03 Dell7720Mageia4 pulseaudio[5259]: [bluetooth] module-bluez5-device.c: Skipping 400501 us (= 70648 bytes) in audio stream
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Right Fan: 0 RPM
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: CPU: 68.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: temp2: 37.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: temp3: 51.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: temp4: 55.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Chip: acpitz-virtual-0
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Adapter: Virtual device
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: temp1: 70.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: temp2: 70.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Chip: coretemp-isa-0000
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Adapter: ISA adapter
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Physical id 0: 69.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Core 0: 62.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Core 1: 60.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Core 2: 61.0 C
Dec 15 12:39:03 Dell7720Mageia4 sensord[1135]: Core 3: 68.0 C


But exactly at the moment of interrupt in sound, sensord was active.
So what is the priority of sensord?

Code: Select all
[root@Dell7720Mageia4 bert]# ps -ef | grep sensord
UID        PID  PPID  C STIME TTY          TIME CMD
root      1135     1  0 12:19 ?        00:00:01 /usr/sbin/sensord -i 1m -l 20m -f daemon


What do we see: logging every 20 minutes... twenty minutes... the sound interrupt interval !!!

So I disabled sensord in Mageia Control Center / System / Manage System Services

And the 20 minutes interval passed without sound interruption !!!

Is there a way to make sensord faster? Should it first learn the devices in my notebook?
Last edited by isadora on Dec 15th, '14, 20:11, edited 1 time in total.
Reason: Command-output placed between [CODE]-tags, to keep the forum readable. ;)
bertaerts
 
Posts: 181
Joined: Apr 6th, '11, 12:19

Re: Fixing pulseaudio stutters and pauses

Postby isadora » Dec 15th, '14, 20:13

It's absolutely NOT prohibited, keeping the forum readable, by using code-tags for example, thank you so much!
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2763
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Next

Return to Advanced support

Who is online

Users browsing this forum: Google [Bot] and 1 guest