Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pulseaudio and Firefox
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Mon May 22, 2017 10:00 pm    Post subject: Pulseaudio and Firefox Reply with quote

After a world update I now find myself facing the error "To play audio, you may need to install the required PulseAudio software." in Firefox.

I simply use ALSA, why does Firefox suddenly want to use PulseAudio? Why did PulseAudio suddenly get pulled in at all when I have -pulseaudio in my global USE flags? I've since removed it again, but I'm still curious how it got pulled in.

How do I get rid of this and just run a proper system without PulseAudio?
Back to top
View user's profile Send private message
Zucca
l33t
l33t


Joined: 14 Jun 2007
Posts: 918
Location: KUUSANKOSKI, Finland

PostPosted: Mon May 22, 2017 10:06 pm    Post subject: Reply with quote

You may have hard time... I will too, since I will eventually use JACK. And I'm not gonna mix PulseAudio into that.

However. There's already some talk about apulse in this topic.
_________________
..: Zucca :..
This space is not for rent.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 4439

PostPosted: Tue May 23, 2017 12:29 pm    Post subject: Re: Pulseaudio and Firefox Reply with quote

deltamalloc wrote:
How do I get rid of this and just run a proper system without PulseAudio?

Pick your poison:
  • Uninstall Firefox
  • Use Firefox ESR
  • Use JACK or apulse
  • Convince upstream to uncripple their software and remove this artificial restriction

(Mozilla have many years experience of shooting down option 4 when it comes up. You'd need an organised petition or something.)
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 5908
Location: Saint Amant, Acadiana

PostPosted: Tue May 23, 2017 12:33 pm    Post subject: Reply with quote

53 is PA free here, sound works. It may not stay this way, though. Mozilla developers announced they will not work on ALSA code and if it breaks in the future they won't fix it. Why your FF requires PA is mystery for me.
_________________
Please learn how to denote units correctly!

Political Correctness is all about replacing imaginary injustice with real injustice.
Back to top
View user's profile Send private message
Zucca
l33t
l33t


Joined: 14 Jun 2007
Posts: 918
Location: KUUSANKOSKI, Finland

PostPosted: Tue May 23, 2017 5:04 pm    Post subject: Reply with quote

I wonder why Mozilla devs prefer PA over ALSA? I mean... just by supporting ALSA, PA users (like I) can still use Firefox without problems.

Eventually I need to change to JACK, I think. I have MIDI-keyboard waiting to be used. But I read that JACK can only use one sound card at the time... That's a dealbreaker. :(
_________________
..: Zucca :..
This space is not for rent.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11292

PostPosted: Wed May 24, 2017 1:53 am    Post subject: Reply with quote

If I recall correctly, they have some unspecified enhancements planned that they want to write only once and they believe that the enhancements will require backend-specific code, so they must choose whether to write to ALSA or write to PulseAudio. They believe, whether or not correctly, that PulseAudio users are a vast majority and that freezing out ALSA users while supporting PulseAudio users will enjoy a larger userbase than the reverse. I find this logic questionable, but have mostly ignored the issue since I believe web browsers should be seen and not heard. Videos should be played by software written for that purpose, not shoe-horned into a browser.
Back to top
View user's profile Send private message
figueroa
Apprentice
Apprentice


Joined: 14 Aug 2005
Posts: 277
Location: GA-USA

PostPosted: Thu May 25, 2017 4:24 pm    Post subject: Reply with quote

I globally set -pulseaudio use in make.conf. Removed firefox-bin and emerged firefox-52.1.0-r1 (stable arch x86) in 46 minutes. Sound works.

I'm satisified for now, but concerned about dependency creep in the future.
_________________
Andy Figueroa
andy@andyfigueroa.net Working with Unix since 1983.
Back to top
View user's profile Send private message
figueroa
Apprentice
Apprentice


Joined: 14 Aug 2005
Posts: 277
Location: GA-USA

PostPosted: Thu May 25, 2017 4:27 pm    Post subject: Reply with quote

Jaglover wrote:
53 is PA free here, sound works. It may not stay this way, though. Mozilla developers announced they will not work on ALSA code and if it breaks in the future they won't fix it. Why your FF requires PA is mystery for me.


firefox-bin now requires pulseaudio in order to have sound. Problem is, when I install pulseaudio, sound doesn't work in the shell or in any application.
_________________
Andy Figueroa
andy@andyfigueroa.net Working with Unix since 1983.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2000
Location: Kentucky

PostPosted: Mon May 29, 2017 10:12 pm    Post subject: Reply with quote

I too lost sound in firefox-bin after a routine update. I followed the suggestion above and removed firefox-bin and installed firefox from source. Samne version as above, but still no sound in firfox. I can play *.mp3 files with mgp123 just fine, so it is specifically a firefox issue.

Does anybody have any ideas what is wrong? And no, I really don't want pulseaudio. :evil:
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2000
Location: Kentucky

PostPosted: Mon May 29, 2017 10:39 pm    Post subject: Reply with quote

CORRECTION:

My alsa sound works with mpg123 from user root, but not from a normal user. I just checked, and it works with firefox as root also. :o

When I was fiddling with pulseaudio, I followed the instructions in the gentoo wiki to take all users out of the audio group in /etc/group, but I put them back, and it doesn't help.

What is going on here?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11292

PostPosted: Mon May 29, 2017 11:55 pm    Post subject: Reply with quote

When you put them back, did you also log out and back in so that the new group information is made active? What is the output of id from a shell where mpg123 fails?
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2000
Location: Kentucky

PostPosted: Mon May 29, 2017 11:58 pm    Post subject: Reply with quote

Code:
rj@onesimus ~ $ id
uid=1000(rj) gid=1000(ssmtp) groups=1000(ssmtp),10(wheel),18(audio),78(kvm),1004(plugdev),1007(vmware)
rj@onesimus ~ $


mpg123 takes just as long to run and exit as root as it does for my normal username, so it obviously thinks it is running; it just doesn't output any sound.

Here is the output for a normap user:
Code:

rj@onesimus ~ $ time mpg123 KJV/19Psa150.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.24.0; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented

Directory: KJV/

Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: 19Psa150.mp3 ...
shared memfd open() failed: Function not implemented

MPEG 2.0 L III cbr32 22050 mono

Title:   Psalms 150                                                 Artist: King James Version                                       
Comment: Steven Johnston                                            Album:  www.firefighters.org                                     
Year:    2002                                                       Genre:  Speech                                                   
shared memfd open() failed: Function not implemented

[0:26] Decoding of 19Psa150.mp3 finished.

real    0m26.842s
user    0m0.099s
sys     0m0.086s
rj@onesimus ~ $


and here it is for root:
Code:

onesimus KJV # time mpg123 19Psa150.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.24.0; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented


Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: 19Psa150.mp3 ...
shared memfd open() failed: Function not implemented

MPEG 2.0 L III cbr32 22050 mono

Title:   Psalms 150                                                              Artist: King James Version                                                     
Comment: Steven Johnston                                                         Album:  www.firefighters.org                                                   
Year:    2002                                                                    Genre:  Speech                                                                 
shared memfd open() failed: Function not implemented

[0:26] Decoding of 19Psa150.mp3 finished.

real    0m27.061s
user    0m0.154s
sys     0m0.110s
onesimus KJV #


That "shared memfd open() failed: Function not implemented" message is a bit worrisome, but it works for root. :roll:
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39036
Location: 56N 3W

PostPosted: Tue May 30, 2017 9:03 am    Post subject: Reply with quote

Code:
CXXFLAGS="${CXXFLAGS} -mno-avx"  USE=custom-optimization emerge -av1 =firefox-53.0-r1::gentoo
with gcc-7.1.0 and
media-sound/pulseaudio hard masked works with audio here.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
robdd
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2005
Posts: 141
Location: Sydney Australia

PostPosted: Tue May 30, 2017 11:22 am    Post subject: Reply with quote

Nice to see I'm not the only one unpleasantly surprised to find that upgrading firefox-bin meant introducing that pulseaudio rubb^H^H^H^Hstuff. In fact, I'm getting a bit tired of the big distributions forcing solutions on me for problems I don't have. I came back to Gentoo after flirting with Linux Mint because they were (as a derivative of Ubuntu) adopting systemd. BTW, there's a cracker of a "Downfall parody" about systemd at https://www.youtube.com/watch?v=_cdEFF-ttLw.

And don't get me started on Grub-2. Recently I was re-purposing an old rack-mounted Dell as a file server. Because it's old and the hardware is a bit weird I cocked up the grub install - then I can't even try to boot from the command line because the video drivers weren't loading. Video drivers to boot a kernel FFS!!!! I don't want a pretty splash screen and a mindless bar moving from side to side - I just want to bloody well boot a kernel! And whoever thought that having conditional parsing in grub.conf was a good idea needs to be shot. I'm not a parser FFS, that's what the COMPUTER is for! Now every Linux machine I control boots with good old Lilo. But I digress...

So I will try installing firefox from source, and if that doesn't work I'll use Chrome until I can find another browser that doesn't tattle to Google about everything I'm doing. I'm already worried that the initial install of the new firefox-bin/pulseaudio damaged my Alsa set-up, but I'd rather fix that than have some complicated piece of kit that does heaps of things that I'll never need infesting (infecting??) my machine.
</rant>
Regards to all.. Rob.
_________________
Rob Diamond
Gentoo Hack, hack, hacker
Sydney, Australia
Back to top
View user's profile Send private message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 72

PostPosted: Thu Jun 01, 2017 12:34 am    Post subject: Reply with quote

Killing XUL and now this... Any decent forks out there? I never liked Mozilla anyway.
Back to top
View user's profile Send private message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 72

PostPosted: Thu Jun 01, 2017 12:46 am    Post subject: Reply with quote

The other thread is 3 pages and this is about to become 2. I read the other one until it devolved into a discussion about GTK and I still don't know what I should do. apulse only works with www-client/firefox-bin but I can also emerge www-client/firefox instead and keep my ALSA only system? And what was the talk about 53 working with ALSA but 52 not? Future development? Anyway, a fixed thread with the main points could avoid more discussion and clear things up for lurkers and people coming from Google.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11292

PostPosted: Thu Jun 01, 2017 2:01 am    Post subject: Reply with quote

Firefox 52 ESR can be installed on a system with no PulseAudio and can play sound on such a system. I cannot comment on whether that will continue to work on Firefox 53 and later.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2000
Location: Kentucky

PostPosted: Thu Jun 01, 2017 2:19 am    Post subject: Reply with quote

And I did emerge firefox romk source and it only plays audio if I run it as root, which is not a very good idea. :evil:

Any ideas what is wrong? I posted above, but others posted other stuff afterwards, and my probem got burried. :x
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2314

PostPosted: Thu Jun 01, 2017 4:33 am    Post subject: Reply with quote

robdd wrote:
So I will try installing firefox from source, and if that doesn't work I'll use Chrome until I can find another browser that doesn't tattle to Google about everything I'm doing. I'm already worried that the initial install of the new firefox-bin/pulseaudio damaged my Alsa set-up, but I'd rather fix that than have some complicated piece of kit that does heaps of things that I'll never need infesting (infecting??) my machine.
</rant>
Regards to all.. Rob.
I recommend you use chromium instead of chrome. At least that is open source. An entry in your host file to block google-analytics.com and googlesyndication.com might not be a bad idea either.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11292

PostPosted: Thu Jun 01, 2017 4:50 am    Post subject: Reply with quote

Moriah: since mpg123 fails for you as a normal user, I suspect your problem is that ALSA is nonfunctional for your normal user, regardless of the program using it (Firefox, mpg123, vlc, etc.). This may be a separate problem from the users who are dealing with the PulseAudio vs ALSA problems. You may have better luck pursuing a separate thread focused purely on the problem that your normal user generates no audio output when using ALSA (despite that, as you noted above, it consumes the right amount of time).

Based on your results so far, I think we can rule out permissions, since most audio players exit immediately on failure to open due to permissions (and usually produce more pointed error messages). We can rule out a muted output channel, since muting is per-channel, not per-user, so a muted channel would have silenced root, and you report that root is not silenced.

As a blind guess, do you have any per-user ALSA settings (e.g. .asoundrc) that might be routing the sound incorrectly?
Back to top
View user's profile Send private message
Princess Nell
l33t
l33t


Joined: 15 Apr 2005
Posts: 716

PostPosted: Thu Jun 01, 2017 9:55 pm    Post subject: Reply with quote

Even better: de-googled chromium from pg_overlay.
Back to top
View user's profile Send private message
Punchcutter
Guru
Guru


Joined: 11 Feb 2007
Posts: 301

PostPosted: Fri Jun 02, 2017 5:37 am    Post subject: Reply with quote

Will probably use Chromium for anything that needs audio "from now on".

I do note something interesting though.... I've got FF ESR 52.1.0 here, and as expected, it doesn't play sound for stuff on Youtube, however I can watch videos on www.pbs.org/newshour , and there's sound! At least, not the videos that are hosted by YT. Newshour offers its own local player (not sure what it is, exactly, except that it seems to stream Flash), and some of the news stories come through this player. These stories have sound, even on 52. I wonder why that is. I've read that FF ESR doesn't have the same requirement of PA as other versions and sound should still work, but then... why is mine not playing YT videos.... ?
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 4439

PostPosted: Fri Jun 02, 2017 6:28 pm    Post subject: Reply with quote

Youtube videos don't use flash any more.
_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 72

PostPosted: Wed Jun 07, 2017 12:11 am    Post subject: Reply with quote

apulse doesn't work at all for me
Back to top
View user's profile Send private message
MaDDeePee
Guru
Guru


Joined: 18 Aug 2004
Posts: 326
Location: Germany

PostPosted: Sun Jun 11, 2017 3:04 pm    Post subject: Reply with quote

why can't i emerge apulse together with firefox-bin?
Code:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] media-sound/apulse-0.1.6-r1::gentoo  ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R    ] www-client/firefox-bin-52.1.2::gentoo  USE="ffmpeg pulseaudio* startup-notification (-selinux)" L10N="de -ach -af -an -ar -as -ast -az -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" 0 KiB
[blocks B      ] <media-sound/apulse-0.1.9 ("<media-sound/apulse-0.1.9" is blocking www-client/firefox-bin-52.1.2)

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 KiB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (www-client/firefox-bin-52.1.2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    www-client/firefox-bin required by @selected
    firefox-bin

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum