From 07afa15e4a8a1a8d4a50ef5841684bc1d3a9a89e Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Wed, 19 Feb 2025 12:38:43 +0100 Subject: [PATCH 01/10] Try enabling the loopback device --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cde1d2f5be0b5..8bf478007cce6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -356,12 +356,17 @@ commands: - run: name: configure firefox command: | + # Some before and after tests to try enabling a sound device: + lsmod | grep snd + modprobe snd-aloop + lsmod | grep snd mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \<>) @@ -371,8 +376,6 @@ commands: # support in headless mode) resolves EMTEST_LACKS_GRAPHICS_HARDWARE: "1" EMTEST_LACKS_WEBGPU: "1" - # TODO: replicate with FF the same as CHROME_FLAGS_AUDIO - EMTEST_LACKS_SOUND_HARDWARE: "1" # OffscreenCanvas support is not yet done in Firefox. EMTEST_LACKS_OFFSCREEN_CANVAS: "1" EMTEST_DETECT_TEMPFILE_LEAKS: "0" From 2b2bde1462d53bc9e43339ea24a955ac23dcf326 Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Wed, 19 Feb 2025 12:43:56 +0100 Subject: [PATCH 02/10] Try blindly --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8bf478007cce6..7c6c5fc256a90 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -357,9 +357,9 @@ commands: name: configure firefox command: | # Some before and after tests to try enabling a sound device: - lsmod | grep snd + #lsmod | grep snd modprobe snd-aloop - lsmod | grep snd + #lsmod | grep snd mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Wed, 19 Feb 2025 12:47:16 +0100 Subject: [PATCH 03/10] Full path added --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c6c5fc256a90..7e2b3afe7c79b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -357,9 +357,9 @@ commands: name: configure firefox command: | # Some before and after tests to try enabling a sound device: - #lsmod | grep snd - modprobe snd-aloop - #lsmod | grep snd + /sbin/lsmod | grep snd + /sbin/modprobe snd-aloop + /sbin/lsmod | grep snd mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Sat, 22 Feb 2025 16:15:00 +0100 Subject: [PATCH 04/10] Try manually adding PulseAudio (and its dummy device) --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7e2b3afe7c79b..739b468957e44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -356,10 +356,9 @@ commands: - run: name: configure firefox command: | - # Some before and after tests to try enabling a sound device: - /sbin/lsmod | grep snd - /sbin/modprobe snd-aloop - /sbin/lsmod | grep snd + # This should add and start PulseAudio's dummy mixer + apt-get install -q -y pulseaudio + pulseaudio --start mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Sun, 23 Feb 2025 00:37:18 +0100 Subject: [PATCH 05/10] Try updating before install --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 739b468957e44..7dd4099dfb932 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -357,6 +357,7 @@ commands: name: configure firefox command: | # This should add and start PulseAudio's dummy mixer + apt-get update -y; true apt-get install -q -y pulseaudio pulseaudio --start mkdir ~/tmp-firefox-profile/ From 59cf087a7355d9f72e1fc2fba3add66081a64b5d Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Sun, 23 Feb 2025 00:52:42 +0100 Subject: [PATCH 06/10] Fix start error --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7dd4099dfb932..497ceeb1b94b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -359,7 +359,7 @@ commands: # This should add and start PulseAudio's dummy mixer apt-get update -y; true apt-get install -q -y pulseaudio - pulseaudio --start + pulseaudio --start --system mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Sun, 23 Feb 2025 00:55:42 +0100 Subject: [PATCH 07/10] Another try at starting --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 497ceeb1b94b0..ab62116cc439f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -359,7 +359,7 @@ commands: # This should add and start PulseAudio's dummy mixer apt-get update -y; true apt-get install -q -y pulseaudio - pulseaudio --start --system + pulseaudio --system mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Sun, 23 Feb 2025 01:07:36 +0100 Subject: [PATCH 08/10] Another idea --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab62116cc439f..7617d4e49e63e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -359,7 +359,7 @@ commands: # This should add and start PulseAudio's dummy mixer apt-get update -y; true apt-get install -q -y pulseaudio - pulseaudio --system + pulseaudio -D mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Sun, 23 Feb 2025 17:23:47 +0100 Subject: [PATCH 09/10] Move the audio config to its own section and add docs --- .circleci/config.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7617d4e49e63e..36dab24010824 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -354,12 +354,18 @@ commands: wget -O ~/ff.tar.bz2 "https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US" tar -C ~ -xf ~/ff.tar.bz2 - run: - name: configure firefox + name: Add audio dependencies command: | - # This should add and start PulseAudio's dummy mixer + # This should add and start PulseAudio's dummy mixer. It will warn + # that "This program is not intended to be run as root" but it can + # be ignored. apt-get update -y; true apt-get install -q -y pulseaudio - pulseaudio -D + pulseaudio --start + - run: + name: configure firefox + command: | + # Note: the autoplay pref allows playback without user interaction mkdir ~/tmp-firefox-profile/ cat > ~/tmp-firefox-profile/user.js \< Date: Mon, 24 Feb 2025 19:33:33 +0100 Subject: [PATCH 10/10] Suggestion from review --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 36dab24010824..4c139e23b3abd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -359,7 +359,7 @@ commands: # This should add and start PulseAudio's dummy mixer. It will warn # that "This program is not intended to be run as root" but it can # be ignored. - apt-get update -y; true + apt-get update -y apt-get install -q -y pulseaudio pulseaudio --start - run: