Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613370 - www-client/firefox-52 should enable alsa by default
Summary: www-client/firefox-52 should enable alsa by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 613692 621690 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-21 00:39 UTC by fcool
Modified: 2017-06-13 18:51 UTC (History)
16 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info firefox > /emerge-info-firefox.txt (emerge-info-firefox.txt,6.41 KB, text/plain)
2017-03-21 12:18 UTC, Manfred Knick
Details
emerge --info apulse > /emerge-info-apulse.txt (emerge-info-apulse.txt,5.58 KB, text/plain)
2017-03-21 12:19 UTC, Manfred Knick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fcool 2017-03-21 00:39:39 UTC
In Firefox release 52, Mozilla disabled ALSA support by default and made Firefox default to Pulseaudio. If I understand Gentoo packaging correctly, this should probably be fixed in the mozconfig eclass.
eg.: mozconfig_annotate 'Mozilla disabled ALSA by default in Firefox 52' --enable-alsa

There is already a pulseaudio USE flag that works by: mozconfig_use_enable pulseaudio
Comment 1 Mart Raudsepp gentoo-dev 2017-03-21 00:49:32 UTC
Note that to my knowledge Firefox alsa cubeb backend is effectively unmaintained upstream and does not have features like full duplex (important for WebRTC), 5.1 sound and whatever else got or gets added to all the other backends, but not ALSA as it's not really cared for. It doesn't mean a pure alsa-lib backend couldn't do them, but just no-one has, and existing upstream manpower doesn't seem to plan to.
Comment 2 Manfred Knick 2017-03-21 09:29:50 UTC
Just for the record:
Even latest [~] media-sound/apulse-0.1.9:0
did _not_ succeed as a workaround for me.

https://bugzilla.mozilla.org/show_bug.cgi?id=1247056

https://bugzilla.mozilla.org/show_bug.cgi?id=1345661

In https://www.mozilla.org/en-US/firefox/52.0/releasenotes/ ,
this major breakage was not even mentionend!

NOTABENE:
Even current Firefox ESR is pointing to "firefox-52.0.1esr.tar.bz2".

Compile with "--disable-pulseaudio --enable-alsa"
will not be supported by Mozilla from -52 onwards:

" ...
The discussion happened on the public forum here https://groups.google.com/forum/#!topic/mozilla.dev.platform/jRAqSTri66I
...
Making trade offs is a necessary part of making a good product.
...
(In reply to Miguel Hernandez from comment #100)
> We're obviously requesting a very simple thing: release a 52.0.1 build with
> ALSA support restored, and never again take it away. Please.

That isn't going to happen. Sorry.       <----- !
...
"
[https://bugzilla.mozilla.org/show_bug.cgi?id=1345661#c122]
Comment 3 Andrew Savchenko gentoo-dev 2017-03-21 10:26:35 UTC
(In reply to Manfred Knick from comment #2)
> Just for the record:
> Even latest [~] media-sound/apulse-0.1.9:0
> did _not_ succeed as a workaround for me.

This is interesting. apulse-0.1.9 was released specifically for the sake of firefox. What exactly did not succeed for you? For firefox compilation you need PA headers, they can be extracted from apulse src tarball.

At runtime you must run:
  apulse firefox
just installing firefox is not enough.
This way it works for me.
Comment 4 Andrew Savchenko gentoo-dev 2017-03-21 10:27:50 UTC
(In reply to Andrew Savchenko from comment #3)
> just installing firefox is not enough.
s/firefox/apulse/
Comment 5 Manfred Knick 2017-03-21 10:53:50 UTC
Followed https://github.com/i-rinat/apulse.
Will have another try and report.
Comment 6 Manfred Knick 2017-03-21 12:05:43 UTC
# cd /etc/portage/package.accept_keywords

# grep firefox system_apps 

 =media-sound/apulse-0.1.9:0         ~amd64  # for firefox >= 52
  www-client/firefox:0                       # >=52 : pulseaudio <-- apulse

# grep firefox ../package.use

  media-plugins/alsa-plugins     pulseaudio    # req. by firefox >= 52

# emerge -pv www-client/firefox

[ebuild   R   ~] www-client/firefox-52.0.1::gentoo  USE="gmp-autoupdate jemalloc -bindist -custom-cflags -custom-optimization -dbus -debug -gtk2 -hardened -hwaccel -jack (-neon) -nsplugin -pgo -pulseaudio (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi" L10N="de -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB

# emerge -pv apulse

[ebuild   R   ~] media-sound/apulse-0.1.9::gentoo  ABI_X86="(64) -32 (-x32)" 0 KiB


_RESULT_ of "apulse firefox" is very strange:

A) able to sound a news live stream like
   http://www.tagesschau.de/multimedia/livestreams/livestream3/index.html

B) _not_ able to sound entries in Mediathek like
   http://www.tagesschau.de/multimedia/sendung/ts-18877.html

C) _not_ able to sound entries in YouTube like
   https://www.youtube.com/watch?v=TMpwRzX4JpI
Comment 7 Manfred Knick 2017-03-21 12:07:59 UTC
# equery list media-*/alsa*

[IP-] [  ] media-libs/alsa-lib-1.1.3:0
[IP-] [  ] media-sound/alsa-utils-1.1.3:0.9
Comment 8 Manfred Knick 2017-03-21 12:18:59 UTC
Created attachment 467790 [details]
emerge --info firefox > /emerge-info-firefox.txt
Comment 9 Manfred Knick 2017-03-21 12:19:28 UTC
Created attachment 467792 [details]
emerge --info apulse  > /emerge-info-apulse.txt
Comment 10 Manfred Knick 2017-03-21 12:26:31 UTC
For comparison:

# emerge -pv =www-client/firefox-45.8.0:0

[ebuild     UD ] www-client/firefox-45.8.0::gentoo [52.0.1::gentoo] USE="gmp-autoupdate gstreamer%* jemalloc3%* jit%* -bindist -custom-cflags -custom-optimization -dbus -debug -ffmpeg% -hardened -hwaccel (-neon) (-pgo) -pulseaudio (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi (-gtk2%) (-jack%) (-jemalloc%*) (-nsplugin%) (-rust%)" L10N="de -ach -af -an -ar -as -ast -az -be% -bg -bn-BD -bn-IN -br -bs -ca -cs -cy -da -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -fi -fr -fy -ga -gd -gl -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW (-cak%) (-dsb%) (-ff%) (-gn%) (-ka%) (-kab%) (-lij%)" 181.345 KiB
Comment 11 Andrew Savchenko gentoo-dev 2017-03-21 12:49:54 UTC
(In reply to Manfred Knick from comment #6)
> _RESULT_ of "apulse firefox" is very strange:
> 
> A) able to sound a news live stream like
>    http://www.tagesschau.de/multimedia/livestreams/livestream3/index.html
> 
> B) _not_ able to sound entries in Mediathek like
>    http://www.tagesschau.de/multimedia/sendung/ts-18877.html
> 
> C) _not_ able to sound entries in YouTube like
>    https://www.youtube.com/watch?v=TMpwRzX4JpI

Apulse is not perfect, better contact upstream with these problems.
Comment 12 Ian Stakenvicius (RETIRED) gentoo-dev 2017-03-21 12:52:37 UTC
The pulseaudio / apulse method is going to need to be the way to go in future versions, as with the alsa code branch being no longer maintained it will break eventually.

It does look, however, like we will be able to maintain it through the 52.x series, and so I've enabled the alsa code branch at compile time if USE=pulseaudio is disabled.  Please test.

commit 85a94da47e6ee84ff343d728a854d17b7d0bc0f3
Author: Ian Stakenvicius <axs@gentoo.org>
Date:   Tue Mar 21 08:48:48 2017 -0400

    www-client/firefox-52: revbump to enable alsa support when USE=-pulseaudio
    
    This change occured in the eclass rather than in the ebuild, but the end-result
    is changes-on-disk in firefox and so the ebuild was revbumped.
    
    Package-Manager: portage-2.3.3
Comment 13 Sergey 'L29Ah' Alirzaev 2017-03-21 13:09:46 UTC
I suggest using media-video/mpv for playing music/video sites. It has covered all the sound uses of a browser for me.
Comment 14 Manfred Knick 2017-03-21 16:01:43 UTC
CONFIRMATION:

# emerge -pv firefox

[ebuild   R   ~] www-client/firefox-52.0.1-r1::gentoo  USE="gmp-autoupdate jemalloc -bindist -custom-cflags -custom-optimization -dbus -debug -gtk2 -hardened -hwaccel -jack (-neon) -nsplugin -pgo -pulseaudio (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi" L10N="de -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB

- works (without apulse in front of it)

- in all cases mentioned above (and more)

# grep -i alsa   ./system_apps 

 =media-libs/alsa-lib-1.1.3:0                           ~amd64
 =media-sound/alsa-utils-1.1.3:0.9                      ~amd64

Thanks a lot!
Comment 15 Xavier Miller (RETIRED) gentoo-dev 2017-03-21 19:57:49 UTC
This revision bump works for the websites I visit (among youtube HTML5 videos).

Thank you for this version ;)
Comment 16 Ian Stakenvicius (RETIRED) gentoo-dev 2017-03-22 02:59:53 UTC
thank you for the feedback!
Comment 17 Brian Evans (RETIRED) gentoo-dev 2017-03-23 22:29:11 UTC
*** Bug 613692 has been marked as a duplicate of this bug. ***
Comment 18 tkzv 2017-03-23 22:50:07 UTC
(In reply to Manfred Knick from comment #14)
> CONFIRMATION:
> 
> # emerge -pv firefox
> 
> [ebuild   R   ~] www-client/firefox-52.0.1-r1::gentoo  USE="gmp-autoupdate
> jemalloc -bindist -custom-cflags -custom-optimization -dbus -debug -gtk2
> -hardened -hwaccel -jack (-neon) -nsplugin -pgo -pulseaudio (-rust)
> (-selinux) -startup-notification (-system-cairo) -system-harfbuzz
> -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite
> {-test} -wifi" L10N="de -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br
> -bs -ca -cak -cs -cy -da -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES
> -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu
> -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr
> -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq
> -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB
> 
> - works (without apulse in front of it)
> 
> - in all cases mentioned above (and more)
> 
> # grep -i alsa   ./system_apps 
> 
>  =media-libs/alsa-lib-1.1.3:0                           ~amd64
>  =media-sound/alsa-utils-1.1.3:0.9                      ~amd64
> 
> Thanks a lot!

Did not work for me.

USE="custom-optimization dbus hardened jemalloc nsplugin pgo system-icu system-jpeg system-libvpx system-sqlite -bindist -custom-cflags -debug -gmp-autoupdate -gtk2 -hwaccel -jack (-neon) -pulseaudio (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-libevent {-test} -wifi" L10N="en-GB ja ru zh-CN zh-TW -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh"

I had to make an ebuild with alsa USE flag to make sound work. See bug #613692.

=media-libs/alsa-lib-1.1.2, =media-sound/alsa-utils-1.1.2:0.9. AMD64.
Comment 19 augustin 2017-05-21 03:42:07 UTC
The Status says: RESOLVED FIXED
I am not sure I understand the intricacies of the discussion above. Does it mean that sound is supposed to work in Firefox without Pulseaudio? Does the fix extend to www-client/firefox-bin?

I have:

www-client/firefox-bin
Installed versions:  52.1.0-r2^ms(12:03:24 20/05/17)(ffmpeg startup-notification -pulseaudio -selinux 

but not sound.
Comment 20 augustin 2017-05-22 02:47:42 UTC
Apparently, no, the fix does not extend to www-client/firefox-bin.
We have to make a full compile of www-client/firefox. Having done so, sound works in firefox but not in firefox-bin.

I'll continue documenting what I know on this topic in the following wiki pages:
http://linux.overshoot.tv/wiki/firefox_alsa_and_pulseaudio 
http://linux.overshoot.tv/www-client/firefox
Comment 21 Ian Stakenvicius (RETIRED) gentoo-dev 2017-05-23 12:53:31 UTC
(In reply to augustin from comment #20)
> Apparently, no, the fix does not extend to www-client/firefox-bin.
> We have to make a full compile of www-client/firefox. Having done so, sound
> works in firefox but not in firefox-bin.
> 
> I'll continue documenting what I know on this topic in the following wiki
> pages:
> http://linux.overshoot.tv/wiki/firefox_alsa_and_pulseaudio 
> http://linux.overshoot.tv/www-client/firefox


Correct, nothing can be done about firefox-bin, because there is no alsa support enabled in upstream's build system.  For firefox-bin you need either pulseaudio or apulse for sound.

Note that pulseaudio needs to be configured for use as the audio backend, it can't simply be installed.
Comment 22 Brian Evans (RETIRED) gentoo-dev 2017-06-13 18:51:03 UTC
*** Bug 621690 has been marked as a duplicate of this bug. ***