View previous topic :: View next topic |
Author |
Message |
Pinnjail n00b

Joined: 21 Feb 2019 Posts: 11
|
Posted: Fri Apr 04, 2025 9:05 pm Post subject: Problem with audio in Firefox when using Pipewire |
|
|
Hi everyone!
I am using Pipewire in my Gentoo install. Up until some weeks ago everything was working fine; however, since a couple of weeks, no audio is played via Firefox: if I try to play a youtube video (or any other audio source on the internet) no audio is available. I have tested pipewire via the command line with and I am able to hear without problems.
Some useful outputs:
Code: | pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 105
Tile Size: 65472
User Name: luca
Host Name: MAIN_PC_gentoo
Server Name: PulseAudio (on PipeWire 1.2.7)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.usb-0b0e_Jabra_Link_380_08C8C23275B8-00.analog-stereo
Default Source: alsa_input.usb-0b0e_Jabra_Link_380_08C8C23275B8-00.mono-fallback |
Code: |
wpctl status
PipeWire 'pipewire-0' [1.2.7, luca@MAIN_PC_gentoo, cookie:1650736455]
└─ Clients:
33. pipewire [1.2.7, luca@MAIN_PC_gentoo, pid:8776]
35. WirePlumber [1.2.7, luca@MAIN_PC_gentoo, pid:8718]
47. WirePlumber [export] [1.2.7, luca@MAIN_PC_gentoo, pid:8718]
72. wpctl [1.2.7, luca@MAIN_PC_gentoo, pid:19100]
Audio
├─ Devices:
│ 48. Jabra Link 380 [alsa]
│ 50. Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [alsa]
│ 51. Starship/Matisse HD Audio Controller [alsa]
│
├─ Sinks:
│ * 55. Jabra Link 380 Analog Stereo [vol: 0.40]
│ 59. Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] Digital Stereo (HDMI 5) [vol: 0.40]
│
├─ Sources:
│ * 56. Jabra Link 380 Mono [vol: 1.00]
│
├─ Filters:
│
└─ Streams:
Video
├─ Devices:
│
├─ Sinks:
│
├─ Sources:
│
├─ Filters:
│
└─ Streams:
Settings
└─ Default Configured Devices:
0. Audio/Sink alsa_output.usb-0b0e_Jabra_Evolve_65_50C275086F40-00.analog-stereo |
When I run Firefox via the command line I see the following errors when trying to run a video in youtube:
Code: | firefox-bin
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
[apulse] [error] do_connect_pcm: can't set sample format 14 ("FLOAT_LE") for playback device "default". Error code -22 (Invalid argument)
[apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
[Child 24449, MediaDecoderStateMachine #1] WARNING: 7fe6a36a54c0 OpenCubeb() failed to init cubeb: file /builds/worker/checkouts/gecko/dom/media/AudioStream.cpp:284
[Child 24449, MediaDecoderStateMachine #1] WARNING: Decoder=7fe6ab0e6000 [OnMediaSinkAudioError]: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:4633 |
I think that the problem is in the interface between Pipewire and Firefox, but I have no idea how to fix it.
Thanks for the help |
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 500
|
Posted: Sat Apr 05, 2025 11:59 am Post subject: |
|
|
Are you running any of this in a VM or a container like Docker?
To eliminate an environment variable or configuration issue, try again with a newly created a new user. |
|
Back to top |
|
 |
Pinnjail n00b

Joined: 21 Feb 2019 Posts: 11
|
Posted: Sat Apr 05, 2025 12:34 pm Post subject: |
|
|
Hi rab0171610,
thank you for the answer!
I am running Gentoo on my SSD, no virtual machine/container. As a window manager I am using i3-blocks.
If I want to create a new user I imagine that I would need to set up again the desktop environment (If I just copy over the .config files I guess that I cannot spot the configuration issue).
For what concerns the Pipewire configuration, I basically copied over the default configuration as suggested in the wiki. I've just added the 44100 bit rate to the allowed rate, because it is the one on which my version of Firefox is running on. But this was done after having the problem, so I guess that it is not the source of the error.
I also did not touch the Firefox configuration.
Isn't there a way to debug this problem from my current user? |
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 500
|
Posted: Sat Apr 05, 2025 6:28 pm Post subject: |
|
|
I am a KDE user since like the early 2000's. I have limited knowledge of minimal desktops or setups and how they work. I assume you are correct about having to set up the desktop all over again. What I would try to eliminate is that something in your Firefox profile is corrupted, accidentally modified by your or another program saved settings in a configuration file in your home directory since the last time it worked. The best way to do this is to isolate the problem by recreating the scenario with a new user with a fresh configuration.
You can also try moving your Firefox profile or backing it up carefully. Opening Firefox with a new profile and checking the results. You can do this by temporarily moving or backing up the .mozilla directory in your home directory. Open Firefox and check the results. A new, clean configuration directory will be created by FF when you open it.
To get more technical, the actual profile directories are located at ~/.mozilla/firefox/ .
Your profile directories (there can be more than one) often end with default-release.
For example, ~/.mozilla/firefox/ef6vghls.default-release/ .
You can back up and/or temporarily move just this directory as well.
You can also look into launching Firefox with some of the known command line flags to manipulate the profile used when opening:
Code: | -P <profile> Start with <profile>.
--profile <path> Start with profile at <path>.
--migration Start with migration wizard.
--ProfileManager Start with ProfileManager.
--no-remote Do not accept or send remote commands; implies
--new-instance.
--new-instance Open new instance, not a new window in running instance.
--safe-mode Disables extensions and themes for this session.
--allow-downgrade Allows downgrading a profile. |
Also, you might consider temporarily moving the entire ~/.config and/or ~/.local directories out of your home directory and then logging back in to see the effects. This is where most of your configuration files for your user are stored. They will be recreated when you log in. You can then remove the newly created directories and replace them with your original directories that you have backed up in a different location. You can even create a folder in your home directory, for example 'Backup' to temporarily move them to while you are testing the results. You can always move them back. I am not going to post specific commands to do all that as I do not want to be responsible if you fat-finger it or mess something up. But that is the general concept I would use to initially troubleshoot the configuration if creating a new user was not an option.
On a side note, I could be wrong about this but the default configuration files that you copied over may not even be necessary for pipewire to work correctly. I had an issue after adopting pipewire years back and I think after setting it up a second time I did not copy the default pipewire configs over, deleted all previous pulseaudio and alsa config files such as ~/.config/pulse and asoundrc, and everything worked correctly. I seem to remember that being the case but I am getting up there in years and could be wrong about that.
Regardless, temporarily moving the .config and possibly even the .local directories would include those files as well.
Ultimately, your FF seems to be trying to run with apulse (or at least the output is referring to that), which I do not even have installed these days I don't think. I am not getting that error with FF and everything is working correctly. I seem to remember users forum posts about running FF with apulse in order to use pure alsa instead of pulseaudio or pipewire but that no longer works as far as I know. I have never needed to do that and am not well versed on what or how that works exactly, so someone else may help you with investigating that further.
I assume you are running the stable FF bin installed from the Gentoo repos? |
|
Back to top |
|
 |
Chiitoo Administrator


Joined: 28 Feb 2010 Posts: 2777 Location: Here and Away Again
|
Posted: Sun Apr 06, 2025 1:15 pm Post subject: |
|
|
Reading the ebuilds, it looks like 'media-sound/apulse' is used instead of pipewire/pulseaudio, if it is installed.
To make use of pipewire, uninstall apulse and re-install firefox-bin. _________________ Kindest of regardses. |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6261 Location: Dallas area
|
Posted: Sun Apr 06, 2025 1:42 pm Post subject: |
|
|
I have apulse (since long ago, just for ff, never has pulse audio installed) so I use
APULSE_PLAYBACK_DEVICE=pipewire
works for me.
Edit to add: I have alsa set for pipewire emerge, so it creates a pipewire-alsa name.
So either pipewire with pulse or pipewire with alsa and apulse _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
 |
Pinnjail n00b

Joined: 21 Feb 2019 Posts: 11
|
Posted: Fri Apr 11, 2025 8:23 pm Post subject: |
|
|
Hi everyone,
thank you very much for the answers! It is nice to know that the community is always ready to help!
So, the problem was indeed apulse. What I did was simply unmerge apulse, I rebooted the machine, and et voila everything was working again!
I was able to use the headphones, the microphone and the camera on discord via firefox-bin, and all the other media are working as expected. I would say that for now the problem can be considered as solved.
Thank you very much once again for the support!
Have a nice weekend everyone. |
|
Back to top |
|
 |
|
|
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
|
|