Skip to content

feat(sound): add output test button with playback fallbacks#1907

Open
manascb1344 wants to merge 1 commit intopop-os:masterfrom
manascb1344:feat/sound-output-test-1901
Open

feat(sound): add output test button with playback fallbacks#1907
manascb1344 wants to merge 1 commit intopop-os:masterfrom
manascb1344:feat/sound-output-test-1901

Conversation

@manascb1344
Copy link
Copy Markdown
Contributor

  • I have disclosed use of any AI generated code in my commit messages.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

Summary

Adds a Test button to the Sound Output settings page to verify audio output devices are working. This feature was available in GNOME Settings but missing in COSMIC Settings (issue #1901).

Before

  • Users had no built-in way to test if their selected output device was working
  • Had to rely on external applications or media playback to verify audio output
  • No feedback mechanism to confirm the correct device was selected

After

  • Added a Test button next to the Output device dropdown
  • Button is enabled only when an active output sink is available
  • Clicking the button plays a test sound through the currently selected output device
  • Multiple fallback playback methods ensure compatibility across different system configurations

Technical Details

UI Changes:

  • Added TestOutput message variant to the Sound page message enum
  • Test button appears inline with the Output device selector
  • Button is disabled when no active sink is available

Backend Implementation:

  • Model::test_output() spawns async playback task
  • Fallback chain for maximum compatibility:
    1. canberra-gtk-play -i audio-test-signal (GNOME-compatible sound theme)
    2. paplay with multiple test sound paths (.oga, .ogg, .wav formats)
    3. pw-play with same test sound paths (PipeWire-native)
  • 5-second timeout per command attempt
  • Comprehensive tracing for debugging playback failures

i18n:

  • Added sound-output.test = Test localization key (English)
  • Other locales will be handled via Weblate

Visual Comparison

Before
image

After
image

Fixes #1901

@manascb1344
Copy link
Copy Markdown
Contributor Author

The commit 415e1d8 was merged to master without proper formatting, so the CI failure exists

@jacobgkau jacobgkau requested a review from a team March 23, 2026 19:10
@jacobgkau
Copy link
Copy Markdown
Member

@pop-os/ux The contributor provided an "after" screenshot. Would we want this button, and if so, is that where we'd want it?

@manascb1344 It looks like the branch has a conflict, likely because we needed to prioritize #1868. Could you rebase/resolve that?

@maria-komarova
Copy link
Copy Markdown
Contributor

What happens with the button when someone clicks it? Does it get disabled while the sound is playing?
What happens if no sound is heard? How would people be able to say that the sound should have played but didn't? If we are using Test button here directly we need some kind of indication of what is going on. Maybe the button label should change to a speaker icon while the state of the button changes to disabled.
Apart from that how does it look when the window is narrow width? Responsiveness is a concern considering the dropdown label could be very long as shown on the screenshot.

The option to test the output seems potentially useful although I don't see this functionality on all the systems I looked at.

@manascb1344 manascb1344 force-pushed the feat/sound-output-test-1901 branch from 093559f to ebc8c43 Compare March 24, 2026 19:12
@manascb1344 manascb1344 force-pushed the feat/sound-output-test-1901 branch from ebc8c43 to fbe5115 Compare March 24, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No TEST button on Cosmic Settings -> Sound-> Output->Output device

3 participants