[solved] pulseaudio plus flash playback problem

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[solved] pulseaudio plus flash playback problem

Postby artee » Apr 16th, '16, 18:24

I've been running into this flash playback problem, not sure when it started...
Note: I have 64 bit flash from pipelight, also tried with regular wrapped flash from the mageia tainted repos. I have a flashblocker, so I have to click on flash content to have it play.

When I open a youtube page (or other page with flash video) whilst pavucontrol (pulseaudio mixer/controller) is open (minimized is fine too), the video plays normally and the audio is there.

When I load a page with flash content without having pavucontrol open, the video will play for a fraction of a second (pipelight) or several seconds (mageia version), without any audio. Then it will halt, but the video progress indicator will run...

Aside that, checking the processes, pulseaudio will run at close to 100% cpu load.

Has anyone else seen this effect...?
And how can it be fixed?

For now, my workaround is the following: I kill the pluginloader64.exe of pipelight and pulseaudio, then start pavucontrol. Pulseaudio gets respawned automatically.
The plugin being dead triggers the webpage to show that the page should be reloaded, and killing pulseaudio makes sure the 100% cpu-loading process is gone and replaced by a once more well behaved instance.
All of that as a button to the script makes it usable for my wife who has no time for command line stuff.


I have also created a new clean account, since there may have been bitrot and bad config stuff in the regular one, behaviour was the same.
Last edited by artee on Apr 21st, '16, 21:18, edited 1 time in total.
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00

Re: pulseaudio plus flash playback problem

Postby doktor5000 » Apr 16th, '16, 18:29

artee wrote:Has anyone else seen this effect...?

Nope, can't remember that this was reported previously, neither for pipelight nor for regular flash plugin from our repos.

You could try newer flash plugin from chrome, though. What browser do you use?
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: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: pulseaudio plus flash playback problem

Postby ozky » Apr 18th, '16, 11:19

No and flash use by default alsa not pulseaudio.
Image
Mageia user
User avatar
ozky
 
Posts: 581
Joined: Jul 2nd, '11, 08:48
Location: Nakkila Finland

Re: pulseaudio plus flash playback problem

Postby artee » Apr 18th, '16, 22:48

Thanks for your replies, and for thinking along.

doktor5000 wrote:
artee wrote:Has anyone else seen this effect...?

Nope, can't remember that this was reported previously, neither for pipelight nor for regular flash plugin from our repos.

You could try newer flash plugin from chrome, though. What browser do you use?


I'm on firefox at the moment. I may have a look at chrome, but I try to fix stuff instead of changing programs (this is my wife's system, don't want to change unless it's necessary, and besides, changing instead of fixing leads to distro-hopping, not an option in my time-budget).


ozky wrote:No and flash use by default alsa not pulseaudio.

I don't think flash uses alsa by default, I didn't tweak anything on my setup. And it's clear from pavucontrol that the audio of the plugin goes through pulseaudio. But there's a though, so how can I tell it to do that? That should work, though it would likely avoid any option of mixing audio streams (which I don't need anyway).


Anyway, I worked on the analysis of this problem, and guess what, for 2 days, the problem went away. No idea why.

Since it got back just now, and the same workaround is still functional, I turned up the analysis on a bunch of parallel xterms (konsole with tabs really):
two as regular user running firefox (to have error and debug output) and top, then some root ones running:
dmesg -w (messages that don't quite seem related)
tail -f /var/log/Xorg.0.log (complete silence here)
journalctl -f

That latter has interesting info when things go wrong, zillions of these:
Code: Select all
Apr 18 22:06:27 zurich pulseaudio[12993]: W: [alsa-sink-] alsa-sink.c: Resume failed, couldn't restore original fragment settings. (Old: 55296/18432, New 5774628/16932)


I found this:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/428603
and this:
https://bugzilla.redhat.com/show_bug.cgi?id=522555

which both are somewhat similar...

I'm wondering if there's some setting conflict.
I'm using 5.1 IEC958 / AC3 on SPDIF optical, also have 5.1 analog out (same audio output) as well as HDMI stereo through the DP cable to the monitor (which only has a headset connector)... have to investigate more...
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00

Re: pulseaudio plus flash playback problem

Postby ozky » Apr 19th, '16, 16:03

Yes you seems to be right and i am wrong pipelight is using pulseaudio but it's very unstable
http://pipelight.net/cms/tags/pulseaudio.html
Image
Mageia user
User avatar
ozky
 
Posts: 581
Joined: Jul 2nd, '11, 08:48
Location: Nakkila Finland

Re: pulseaudio plus flash playback problem

Postby artee » Apr 19th, '16, 23:39

Very interesting! Thanks!

I am running out of time for tonight, but I have found that my efforts to have 5.1 aac digital SPDIF output through the files in /etc/pulse most likely cause the issue... without changes there, I have only analog out (stereo duplex it says, and "analog stereo output" but it will show 6 channels with 6 channel aac video files), and it works without problems.

I really want to get back to the digital (SPDIF optical) link, since the analog has a nasty buzz.


BTW, Pipelight plus pulseaudio isn't the problem, it happens also with the regular linux flash program from adobe. It's really a pulseaudio issue.
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00

Re: pulseaudio plus flash playback problem

Postby artee » Apr 20th, '16, 23:27

Seems I've managed to solve the problem: in pavucontrol (and the files in /etc/pulse/) I should not try to configure the 5.1 digital option. I should just go for the digital stereo one.
As I mentioned above, for duplex analog stereo, the system will still output 5.1.
So I found, it outputs 5.1 (aac I guess) digital audio when setting it to digital stereo.

Only thing that was necessary from all defaults: add this line:
Code: Select all
set-card-profile 1 output:iec958-stereo+input:analog-stereo

to the file:
Code: Select all
/etc/pulse/default.pa


I got the card name and profile name with "pactl list" I think.

Edit: I guess I should file a bug report somewhere, since it makes no sense that the 5.1 digital audio option in pavucontrol makes pulseaudio crash (found that to happen consistently, didn't mention before), and that all troubles mentioned above happen when forcing the 5.1 digital option in the /etc/pulse/* files....
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00

Re: pulseaudio plus flash playback problem

Postby doktor5000 » Apr 21st, '16, 19:35

Please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks

artee wrote:Edit: I guess I should file a bug report somewhere, since it makes no sense that the 5.1 digital audio option in pavucontrol makes pulseaudio crash (found that to happen consistently, didn't mention before), and that all troubles mentioned above happen when forcing the 5.1 digital option in the /etc/pulse/* files....


Then please report that as a bug, after searching if it hasn't been reported yet already: https://wiki.mageia.org/en/How_to_report_a_bug_properly
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: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [solved] pulseaudio plus flash playback problem

Postby artee » May 18th, '16, 21:10

Unfortunately, I found that selecting stereo SPDIF didn't quite give 5.1 surround; it did seem like it, but it was some kind of dolby surround lookalike (soundalike?), perhaps it was the 3d spatial stereo function of the Logitec 5.1 audio system.

So I had to fiddle around quite a bit to find what works for me / my setup:
In the file
Code: Select all
/etc/pulse/daemon.conf

I had to put:
Code: Select all
default-sample-rate = 48000

to get the 5.1 digital option in pavucontrol, and (for steaming with pipelight / silverlight via wine):
Code: Select all
default-fragment-size-msec = 5


Then in pavucontrol, I have to select "Digital Surround 5.1 (IEC958/AC3) Output" to get true 5.1 digital audio.

This doesn't work perfectly, I do have to restart pulseaudio from time to time (whenever youtube stops playing), after which the analog outputs are once again default, so I have to set the audio to Digital Surround in the config tab and set the playing program to output to the digital 5.1 sink on the playback tab.
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00

Re: [solved] pulseaudio plus flash playback problem

Postby artee » May 18th, '16, 22:02

Hurrah, I think I've found how to fix things permanently.

In the file
Code: Select all
/etc/pulse/default.pa

I tried to set the default sink and the profile I want to use as follows:
Code: Select all
### Make some devices default
#set-default-sink output
set-default-sink alsa_output.pci-0000_00_14.2.iec958-ac3-surround-51
#set-default-source input
set-card-profile 1 output:iec958-ac3-surround-51+input:analog-stereo

which gave me an error when restarting without daemonising (helps to get info, just realised that after omitting the -D by accident):
Code: Select all
pulseaudio

The error was this one:
Code: Select all
E: [pulseaudio] main.c: Sink alsa_output.pci-0000_00_14.2.iec958-ac3-surround-51 does not exist.

Finally I realised that the default sink has to be set after the profile is selected:
Code: Select all
### Make some devices default
#set-default-sink output
#set-default-source input
set-card-profile 1 output:iec958-ac3-surround-51+input:analog-stereo
set-default-sink alsa_output.pci-0000_00_14.2.iec958-ac3-surround-51
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00

Re: [solved] pulseaudio plus flash playback problem

Postby artee » May 23rd, '16, 22:32

Yet one more thing needs to be set properly (well, in my case, don't know if this is common or if I'd been playing with settings too much when trying to find the right ones)...

The 5.1 digital surround needs to be chosen in the Audio and Video Settings / Phonon multimedia framework.
Once that was set (I had to do the setting for each of the audio playback items), finally the audio by default goes to the 5.1 digital surround output/sink.
artee
 
Posts: 38
Joined: Jun 15th, '13, 14:00


Return to Basic support

Who is online

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