No sound playback with Pale Moon on Gentoo

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-02, 20:18

Aah...another very precise hint - thanks again! :)

I have:

Code: Select all

Audio Backend	pulse
This is while pulseaudio was running when PM started. I will experiment a bit and try to start PM without having pulseaudio running. See you soon with more news... :)

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-02, 21:00

O.K. after a few browser restarts, I can assert the following:
  • Having

    Code: Select all

    autospawn = yes
    in

    /etc/pulse/client.conf

    will start pulseaudio as soon as I visit a youtube page with a video. Sound works and 'Audio backend' is 'pulse' in about:support. This was expected - I configured it this way above and it's the only way I can have sound in youtube in the browser.
  • Having the autospawn line commented results in the same behavior.
  • Having

    Code: Select all

    autospawn = no
    will start no pulseaudio, no matter which page I visit. This is expected too. Now I have

    Code: Select all

    Audio Backend	alsa
    in about:support! This is actually a very good sign that all is as it should be - except that now I have no sound in youtube... :(
ALSA works because I can listen to a music video played in smplayer, for example - smplayer uses ALSA directly. So it's not that ALSA does not work. Sound in the browser also works without changes in ALSA configuration as soon as I enable the use of pulseaudio through autospawn.

The only thing I can imagine is that the browser is trying to connect to a device of a card that is not configured. Please have a look at my asound.conf in this post at Gentoo Forums. What do I miss?

Is the browser trying to connect to the HDMI HDA of the NVidia card, instead of the (default) card 0 (the PCH card)?

vannilla
Astronaut
Astronaut
Posts: 570
Joined: 2018-05-05, 13:29

Re: Palemoon on Gentoo

Unread post by vannilla » 2019-03-02, 22:04

Have you tried using pulseaudio as-is, instead of making it a pipe to ALSA?
Maybe it's that.
But I can't really help here, as my audio is broken and I can listen to anything only thanks to bluetooth headphones.
However, when using bluealsa (bluetooth over pure ALSA, without pulseaudio), I can listen to sounds coming from the browser.

If that doesn't work, maybe simply add "-pulseaudio" to the USE flags? It's worth a try.

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-02, 22:21

vannilla wrote:Have you tried using pulseaudio as-is, instead of making it a pipe to ALSA?
What would that bring to ALSA-only operation - which is what does not work currently?

I mean, with pulseaudio running, it works fine - it is the pure-ALSA operation that does not give a sound, even though it displays "Audio backend: alsa".
vannilla wrote:If that doesn't work, maybe simply add "-pulseaudio" to the USE flags? It's worth a try.
Sure, it's worth a try - it's just the kind of tries that I detest: everybody here swears that ALSA should work (and makes a monkey out of me when I insist it doesn't), irrespective of whether support for Pulseaudio is enabled or disabled. Well, if things are really so certain, then there is no need to experiment. Then ALSA should work and I have a misconfiguration in my ALSA.

But anyway, I will think about your suggestion and - in a quiet moment - I may even try it. :)

vannilla
Astronaut
Astronaut
Posts: 570
Joined: 2018-05-05, 13:29

Re: Palemoon on Gentoo

Unread post by vannilla » 2019-03-02, 23:42

Your asound.conf is fairly complex, so, yes, you might as well have misconfigured it.
You are saying that other software works with it though, so there's only so much you can try.
And we're not making a monkey out of you: if enabling pulseaudio breaks ALSA-only, disable pulseaudio, it's as simple as that.
Additionally, you added a bunch of custom flags to the ebuild. Who says they didn't break something?
There are a lot of variables at play.
Also also, the use of GTK+3 might be at play, too. deu disabled that flag in the overlay, didn't he/she?
I'm not a GTK+3 expert, but it might as well be that this version of the toolkit interferes with your pure-ALSA setup.
Please check if things work with the default overlay, with no custom retpoline flags and the GTK+2 toolkit.

Walter Dnes
Astronaut
Astronaut
Posts: 604
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Palemoon on Gentoo

Unread post by Walter Dnes » 2019-03-03, 02:42

Are you familiar with alsamixer, the command-line alsa "control panel"? This gives fine-grained control over device input/output under alsa, and might help tweak your system. I believe that media-sound/alsa-utils needs to be built with the "ncurses" flag to enable the alsamixer tool.
There's a right way
There's a wrong way
And then there's my way

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-03, 03:22

vannilla,

you are throwing too many variables into the game - while at the same time you are giving no justification for them, only vague assumptions:
Your asound.conf is fairly complex, so, yes, you might as well have misconfigured it.
May - but did I? Besides, my asound.conf is one of the simplest possible: configure spdif to use device 0 of the PCH card, configure the default card to use dmix, configure dmix to use device 0 of the PCH card. Considering that device 0 of the PCH card is a) the system default and b) responsible for both front stereo and 2.1, as well as other output, all seems O.K. - notice the 'CARD=PCH,DEV=0' in the output of 'aplay -L':

Code: Select all

aplay -L

null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
sysdefault:CARD=PCH
    HDA Intel PCH, ALC668 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC668 Digital
    IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
usbstream:CARD=NVidia
    HDA NVidia
    USB Stream Output
if enabling pulseaudio breaks ALSA-only, disable pulseaudio
Who says that the pulseaudio USE flag might break ALSA-only setups? I suspect that this might be so. Nobody else has come with an explanation as to why this might be true. Everybody swears that his ALSA-only box works fine (with youtube videos in Palemoon) - but all of them have NOT tried to set the pulseaudio flag. So you might have an argument here from the practical side - from a rational point of view alone, there is no compelling reason to disable the pulseaudio flag (I suspect there exists one, but I am not sure: everybody who has managed to get an ALSA-only setup with newer versions of Firefox in the past, has done it by compiling with both --enable-alsa AND --disable-pulseaudio - this IS a compelling reason to ask me to disable the pulseaudio flag, but nobody has come with such an argument yet).
Additionally, you added a bunch of custom flags to the ebuild. Who says they didn't break something?
Who says they might do? And who says they might do so in sound? Sounds a very wild guess to me.
the use of GTK+3 might be at play, too. deu disabled that flag in the overlay, didn't he/she?
Yes, as I also said previously, the gtk3 USE flag is hard-masked in the overlay - but I guess the mask was forgotten there. Otherwise, why is gtk3 offered as a flag to choose (as you can see in 'equery uses www-client/palemoon')?

Summarizing:

No, I am not convinced. The only possible reason behind this problem might lie in the fact that in the past and only in Firefox the two options had to be given together to get ALSA still compiled into the browser:

Code: Select all

--enable-alsa --disable-pulseaudio
See: https://www.linuxquestions.org/question ... ost5809691

BUT: this was in the past (current versions of Firefox do not accept --enable-alsa anymore, see https://www.linuxquestions.org/question ... ost5810106) - and, as we all know, Palemoon is NOT Firefox. :-)

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-03, 03:34

Some new info:

Although youtube videos have no sound, podcasts like the one in

https://stealthisshow.com/s04e12/

do WORK! pulseaudio USE flag is set (i.e. I have not recompiled anything), only pulseaudio server is set to 'autospawn=no' and is NOT running. Audio Backend is alsa in about:support.

So sound with ALSA only IS working, after all - but only in podcasts like the above and not in youtube. In case you think it is some codec problem: the test page at

https://www.youtube.com/html5

shows all checked - and nothing in red... So I think we are narrowing this down somehow:

It is either the pulseaudio USE flag that causes youtube videos to require pulseaudio running, or some kind of codec problem not detected by the youtube test page above...

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-03, 03:46

Walter Dnes wrote:Are you familiar with alsamixer, the command-line alsa "control panel"?
How could I not? :D

I don't see anything wrong there, do you? See attachment below.
alsamixer.png

Walter Dnes
Astronaut
Astronaut
Posts: 604
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Palemoon on Gentoo

Unread post by Walter Dnes » 2019-03-03, 11:06

segmentation-fault wrote:
Walter Dnes wrote:Are you familiar with alsamixer, the command-line alsa "control panel"?
How could I not? :D

I don't see anything wrong there, do you? See attachment below.
Nothing stands out. I'm getting into "clutching-at-straws" territory. A couple of other potential solutions from the Tools ==> Preferences ==> Advanced menu

In the "Compatability" dropdown menu, select "Firefox Compatibility" mode. This has helped with other sound-related problems. Shut down Pale Moon and Re-start.

If that doesn't work, in the "Browsing" section, uncheck "Use hardware acceleration when available". Shut down Pale Moon and Re-start.
There's a right way
There's a wrong way
And then there's my way

yami_
Astronaut
Astronaut
Posts: 502
Joined: 2018-04-26, 11:05

Re: Palemoon on Gentoo

Unread post by yami_ » 2019-03-03, 11:18

segmentation-fault wrote:Everybody swears that his ALSA-only box works fine (with youtube videos in Palemoon) - but all of them have NOT tried to set the pulseaudio flag.
I am running an PulseAudio-enabled build on an ALSA-only box and it works fine here (no problems with both MSE and normal HTML5 audio).
segmentation-fault wrote:Palemoon is NOT Firefox
Yes, Pale Moon is not Firefox: b7274fd666e1bb33effc1425701f566bcaa6f7be.
segmentation-fault wrote:So sound with ALSA only IS working, after all - but only in podcasts like the above and not in youtube.
Can you check if YouTube audio works when MSE is disabled (Tools > Preferences > Content > Video > Enable Media Source Extensions (MSE))?
cat came back from Berkeley waving flags -- rob pike

vannilla
Astronaut
Astronaut
Posts: 570
Joined: 2018-05-05, 13:29

Re: Palemoon on Gentoo

Unread post by vannilla » 2019-03-03, 14:06

segmentation-fault wrote: May - but did I? Besides, my asound.conf is one of the simplest possible: configure spdif to use device 0 of the PCH card, configure the default card to use dmix, configure dmix to use device 0 of the PCH card. Considering that device 0 of the PCH card is a) the system default and b) responsible for both front stereo and 2.1, as well as other output, all seems O.K.
That's hardly simple.
This is simple:

Code: Select all

defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.pcm.!ctl Generic
I used those three lines before everything exploded (don't ask), and it worked fine.
segmentation-fault wrote: Who says that the pulseaudio USE flag might break ALSA-only setups? I suspect that this might be so. Nobody else has come with an explanation as to why this might be true. Everybody swears that his ALSA-only box works fine (with youtube videos in Palemoon) - but all of them have NOT tried to set the pulseaudio flag. So you might have an argument here from the practical side - from a rational point of view alone, there is no compelling reason to disable the pulseaudio flag (I suspect there exists one, but I am not sure: everybody who has managed to get an ALSA-only setup with newer versions of Firefox in the past, has done it by compiling with both --enable-alsa AND --disable-pulseaudio - this IS a compelling reason to ask me to disable the pulseaudio flag, but nobody has come with such an argument yet).
There is a rational reason and compelling argument to try and disable that flag: to see if things work as expected.
segmentation-fault wrote: Who says they might do? And who says they might do so in sound? Sounds a very wild guess to me.
Exactly my point: nobody does know, so the only way to be certain is to make a test run without those flags.
segmentation-fault wrote: Yes, as I also said previously, the gtk3 USE flag is hard-masked in the overlay - but I guess the mask was forgotten there. Otherwise, why is gtk3 offered as a flag to choose (as you can see in 'equery uses www-client/palemoon')?
Because GTK+3 support is experimental, and people might want to build it for checking how things work out during development.
However, for general use it's experimental and might show random problems.

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-05, 00:03

Walter Dnes wrote: A couple of other potential solutions from the Tools ==> Preferences ==> Advanced menu

In the "Compatability" dropdown menu, select "Firefox Compatibility" mode. This has helped with other sound-related problems. Shut down Pale Moon and Re-start.

If that doesn't work, in the "Browsing" section, uncheck "Use hardware acceleration when available". Shut down Pale Moon and Re-start.
"Firefox Compatibility" has always been on here. Never changed it.

I had seen the "hardware acceleration" suggestion elsewhere and had tried it already - without success. I retried it nonetheless, without effect again.
yami_ wrote: I am running an PulseAudio-enabled build on an ALSA-only box and it works fine here (no problems with both MSE and normal HTML5 audio).
This and the link to b7274fd666e1bb33effc1425701f566bcaa6f7be actually make it pretty clear that it must be something on my end, not related to Pulseaudio, or the pulseaudio USE flag.
yami_ wrote: Can you check if YouTube audio works when MSE is disabled (Tools > Preferences > Content > Video > Enable Media Source Extensions (MSE))?
BINGO! :D :thumbup: WOW!
That did it! I did not even have to restart Palemoon - as soon as I disabled MSE, I had sound in youtube videos!

@vannilla
I appreciate very much your efforts, but the winner is yami_...

Let's summarize:

Problem

In an ALSA-only setup, sound works in other applications, but not in the browser. Specifically, while other browsers may need Pulseaudio to be running, Palemoon should work without it, even if one compiled it with the pulseaudio USE flag in Gentoo. Indeed, with pulseaudio support enabled, but with no pulseaudio running, podcasts work - but youtube videos have no sound. With pulseaudio running, there is no problem with sound at all.

Solution

Disable MSE extensions in Tools > Preferences > Content > Video > Enable Media Source Extensions (MSE)

Notes
  • With Pulseaudio running (and PM compiled with pulseaudio support), podcasts and videos do have sound (tested with MSE extension enabled).
  • You can see which backend is currently used in about:support - look for 'Audio backend', it is either pulse, or alsa.
  • For this specific setup, hardware acceleration, browser compatibility mode, compilation or USE flags were not relevant.

Epilog

I am totally happy - the only thing I miss in the above summary is: Reason. I would love to know the reason behind something that kept me searching one week for a solution (I have at least 100 ALSA/sound/pulseaudio/browser-related tabs open!)...

Anyway, many thanks to all for your help and perseverance! :)

:arrow: Suggestion: Maybe the solution should go to the FAQ. I've read a lot about "no sound in browser", but never seen MSE extensions being held responsible for this...

vannilla
Astronaut
Astronaut
Posts: 570
Joined: 2018-05-05, 13:29

Re: Palemoon on Gentoo

Unread post by vannilla » 2019-03-05, 00:39

Good to know things have been resolved.
Apparently youtube specifically has issues with MSE enabled, so I wouldn't call it "no sound in browser" if it happens only with youtube.

yami_
Astronaut
Astronaut
Posts: 502
Joined: 2018-04-26, 11:05

Re: Palemoon on Gentoo

Unread post by yami_ » 2019-03-05, 00:51

I wonder if only disabling MSE for WebM or MPEG-4 Part 14 would fix the issue. Without MSE some websites might refuse to work, or provide limited services (for example YouTube will only offer 360p and 720p if MSE is disabled).
cat came back from Berkeley waving flags -- rob pike

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-05, 01:47

yami_ wrote:I wonder if only disabling MSE for WebM or MPEG-4 Part 14 would fix the issue. Without MSE some websites might refuse to work, or provide limited services (for example YouTube will only offer 360p and 720p if MSE is disabled).
From what I gather from my experiments, it is the top check box (Enable Media Source Extensions (MSE)), the one that controls MSE altogether, that has to be disabled. Enabling it alone (it is possible!), or with any one of its subordinate check boxes, results in no sound in the video.

bgstack15
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2018-01-22, 23:04

Re: Palemoon on Gentoo

Unread post by bgstack15 » 2019-03-05, 02:50

I do not use Gentoo and am entirely unfamiliar with it, but I hope my comments share some auxiliary information.

I built Pale Moon on devuan i386 and x86_64 and I just learned that both of those build environments do have pulseaudio packages (libpulse and libpulse-dev) packages installed. I didn't realize that. However, I know I used the --disable-pulseaudio mozconfig setting. Unfortunately my clients all have wine on them, which apparently depends on libpulse, so I cannot confirm it works without libpulse. The next time I rebuild a box, I'll try my own build of palemoon before installing any wine and see if it can operate without pulse just fine. I expect it to.

yami_
Astronaut
Astronaut
Posts: 502
Joined: 2018-04-26, 11:05

Re: Palemoon on Gentoo

Unread post by yami_ » 2019-03-05, 11:14

segmentation-fault wrote:From what I gather from my experiments, it is the top check box (Enable Media Source Extensions (MSE)), the one that controls MSE altogether, that has to be disabled. Enabling it alone (it is possible!), or with any one of its subordinate check boxes, results in no sound in the video.
Interesting. Unfortunately I hove no idea why the audio does not work for you with MSE enabled. In theory this may not be browser-related - there is a chance that the audio decoding fails for some reason (when MSE is enabled YouTube will stream audio and video separately, so an audio-only failure is possible). This is only my speculation and someone with more knowledge of UXP media components will be required to further diagnose this issue.
cat came back from Berkeley waving flags -- rob pike

User avatar
segmentation-fault
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2019-01-31, 16:32

Re: Palemoon on Gentoo

Unread post by segmentation-fault » 2019-03-05, 17:11

yami_ wrote:(when MSE is enabled YouTube will stream audio and video separately, so an audio-only failure is possible)
Maybe it tries to stream it to the wrong device and/or wrong card. See a previous post of mine for a list of all cards and their devices, as well as a link to my asound.conf that configures the device 0 of the PCH card.

If, for example, it sends audio to HDMI (which is part of my NVidia card, the second card for ALSA) and I am trying to listen with my headphones, which are connected to a jack pinned to PCH:0 (which is the Intel HDA device of Realtek 668, the first card for ALSA, which is also the default), then that would explain it. But I have no idea how I could possibly debug this...

I remember seeing somewhere a bug saying that in some cases audio would be sent to HDMI, instead of the default card - but don't even remember if it was browser-related or something else... :oops:

Any debug options to start palemoon and see audio debugging messages in a log file? Something like

Code: Select all

palemoon -vv 1>>palemoon-output.log 2>>palemoon-errors.txt
:?:

yami_
Astronaut
Astronaut
Posts: 502
Joined: 2018-04-26, 11:05

Re: Palemoon on Gentoo

Unread post by yami_ » 2019-03-05, 19:09

Just to clarify: by "YouTube will stream audio and video separately" I mean that the JS player used by YouTube will download both audio and video separately.
segmentation-fault wrote:Any debug options to start palemoon and see audio debugging messages
Probably this:

Code: Select all

term% palemoon -console
cat came back from Berkeley waving flags -- rob pike

Post Reply