Skip to content

TUI sounds print ALSA lib errors into terminal on audio-less devices (Termux/Android) #51841

Closed

Description

@aydemir

Description

On Android 16 + Termux (no audio device), enabling sounds makes every completed turn print ALSA lib ... lines into the terminal, corrupting the TUI as ghost text. Disabling all sounds stops it. Audio backend errors should go to the debug log, not stderr/TTY.

Evidence (same session, server-side outputs always clean):

  • Sounds ON: tool call 1 -> ghost seen; tool call 2 -> ghost seen
  • Sounds OFF: tool call 3 -> clean; tool call 4 -> clean

Suspected path: packages/tui/src/audio.ts (Audio.create/start) -> ALSA init failure escapes to stderr. Config packages/tui/src/config/index.tsx (attention.sound defaults true).

Plugins

Local nabiz harness plugin (unrelated to audio; trigger is turn-end sound)

OpenCode version

2.0.18 (opencode --version -> opencode v2.0.18)

Steps to reproduce

  1. On Termux/Android with no ALSA device, open opencode TUI.
  2. Settings -> General -> Sounds: enable agent/permissions/errors sounds.
  3. Run any tool (e.g. bash echo) and let the turn end.
  4. ALSA lib ... lines appear in the terminal.
  5. Disable all sounds -> repeat -> no lines.

Screenshot and/or share link

None (text corruption in TUI; can provide on request)

Operating System

Android 16, Termux, aarch64 (Linux 6.17.0-PRoot-Distro)

Terminal

Termux

Activity

  1. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #41763: ALSA errors from audio startup corrupt the TUI on Linux without a sound device; this report describes the same terminal corruption triggered by sounds.
    • #41890: ALSA “cannot find card 0” errors appearing in the TUI on Linux without an audio device.
  2. aydemir commented on Sep 28, 2026

    @aydemir
    Author

    Duplicate of #41763 (same ALSA-over-TUI symptom and root cause). Added the Termux/Android sounds-on-off controlled evidence there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions