WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: No Sound in Firefox  (Read 11654 times)

Offline thane

  • Hero Member
  • *****
  • Posts: 697
No Sound in Firefox
« on: March 20, 2018, 05:10:33 AM »
I've set up Corepure64 on an old laptop I recently acquired (Lenovo X201 ThinkPad). It generally works ok, but in Firefox (59.0.1) there is no sound.

According to Mozilla Support, this is a known issue in Firefox 58 and 59 on certain linux distros, which will be fixed in Firefox 60:

https://support.mozilla.org/en-US/kb/no-sound-firefox-59-linux

Since alsa speaker-test works and dbus is running (PulseAudio) I assume the Firefox issue is the culprit. However because this is the first time I'm trying Corepure64 (and on a box I hadn't used before) I'd like to double-check. Anybody else have similar issues?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: No Sound in Firefox
« Reply #1 on: March 20, 2018, 01:18:41 PM »
Hello Thane,   The simplest and most reliable resolution to the sound issue is install pavucontrol.tcz and setup pulseaudio as per the info file. 


http://tinycorelinux.net/9.x/x86/tcz/pulseaudio.tcz.info

When setup correctly use pavucontrol to resolve the audio feed and volume
« Last Edit: March 20, 2018, 01:24:26 PM by coreplayer2 »

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: No Sound in Firefox
« Reply #2 on: March 22, 2018, 07:37:13 AM »
As far as I know, Firefox needs pulseaudio. Alsa alone, even when "speaker-test" works", can not enable sound in Firefox/Youtube.
Chromium Browser does not need the Pulseaudio sound server.

Sound is a bit tricky in Core. It works after installing alsa-config.tcz and alsa.tcz. But after reboot sound is gone. It has something to do with the asound.state file in /usr/local/etc/alsa

Is there somebody out there who can give me a hint?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: No Sound in Firefox
« Reply #3 on: March 22, 2018, 09:37:51 AM »
Hi beerstein
... It works after installing alsa-config.tcz and alsa.tcz. But after reboot sound is gone. It has something to do with the asound.state file in /usr/local/etc/alsa ...
That's not a persistent file. Maybe you need to add  usr/local/etc/alsa/asound.state  to your  /opt/filetool.lst  file and run
a backup?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: No Sound in Firefox
« Reply #4 on: March 22, 2018, 12:58:59 PM »
Mozilla developers went with Pulse-Audio as the only working interface between Firefox and the audio driver. There is no remaining access to the Alsa driver within firefox, however the code has not been removed in case of future development.    There are ways overcome the situation without installing pulseaudio but they are unreliable.
So as it stands today, if you use firefox and want sound the most reliable and best resolution IMO is install and setup pulse-audio.     Pulse-audio is a dependency of pavucontrol so installing pavucontrol will give you the best volume and audio stream control possible, though you'll have to setup pulse-audio as per the info file for flawless operation.


Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: No Sound in Firefox
« Reply #5 on: March 22, 2018, 05:13:01 PM »
Thanks for the replies. I'll try installing pavucontrol. Also, I should have been more clear that I already have alsa, alsa-config, and PulseAudio installed and setup as suggested in their info files, which worked on a 32-bit box I use.

Thane

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: No Sound in Firefox
« Reply #6 on: March 22, 2018, 05:55:58 PM »
Hello Thane,   are you sure that alsa-config.tcz is required?  probably not needed..   alsa-config.tcz needs to be loaded first to be useful iirc

Even with pulse-audio installed and running,  the source usually needs to be configured.  This is easy to accomplish with pavucontrol :)
« Last Edit: March 22, 2018, 05:58:15 PM by coreplayer2 »

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: No Sound in Firefox
« Reply #7 on: March 23, 2018, 02:49:09 PM »
Hi Rich:
Thank you for your hint. I tried the following:


1. added to bootlocal:
for i in $(seq1 30; do alsactl restore && break || sleep 0.1; done
(I took that from the squeezelite HOW TO)
2. added to .filetool.lst
usr/local/etc/alsa/asound.state
var/lib/alsa

I created this /var/lib/alsa  folder

After rebboot there is no immediate sound. After:
$ sudo alsactl restore

the alsamixer levels will be reset and I have sound.

Is there a way to avaid restoring everztime?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: No Sound in Firefox
« Reply #8 on: March 23, 2018, 04:44:13 PM »
Hi beerstein
Quote
1. added to bootlocal:
for i in $(seq1 30; do alsactl restore && break || sleep 0.1; done
(I took that from the squeezelite HOW TO)
Shouldn't there be a closing parenthesis someplace in there? Maybe try moving the restore a little later in the boot process.
Remove that command from  bootlocal.sh. Create a file in your  .X.d  directory  containing:
Code: [Select]
for i in $(seq 1 10); do alsactl restore && break || sleep 1; done

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: No Sound in Firefox
« Reply #9 on: March 24, 2018, 04:50:42 AM »
To store alsa settings, I do 'sudo alsactl store' in a terminal (after setting everything in alsamixer).

To preserver the settings between boots, I added 'usr/local/etc/alsa/asound.state' to .filetool.lst, and '/usr/local/sbin/alsactl restore' to bootlocal.sh. No quotes of course!

Thane

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: No Sound in Firefox
« Reply #10 on: March 26, 2018, 09:22:21 AM »
thanks thane and rich.
I used thanes recommendation and now it works.

From Richs post I was not able to understand  how to name the file he recommended to put into the .Xd directory?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: No Sound in Firefox
« Reply #11 on: March 26, 2018, 10:03:39 AM »
Hi beerstein
From Richs post I was not able to understand  how to name the file he recommended to put into the .Xd directory?
It doesn't matter what you call it. Once the GUI is up, the  .xsession  file in your home directory will open each file it finds
in  .X,d  and execute the command inside.