Clarification: I normally physically log on to and play media on host A using mpv, displaying the video on an external monitor HDMI-A-2 and playing the audio from host A’s headphone jack connected to external speakers. Today, I tried not physically logging on to host A, but remotely logging in from host B (my phone) using ssh from the same network and running the mpv command from host B. mpv then displays the video on the expected display HDMI-A-2, but it doesn’t play any audio.

Symptomatically, if I haven’t logged on physically to host A, mpv only displays video, plays no audio and throws errors. Why do I need to be logged in on host A for mpv to be able to access audio? You’d think a video feed would be more guarded than an audio one. But maybe this isn’t about security at all? Please enlighten me! 😊

  • Flatearth_Habeebi@lemmy.zip
    link
    fedilink
    arrow-up
    7
    ·
    17 hours ago

    Looks like your SSH session might not have the same access to the sound card or audio services as your local session. Have you tried enabling lingering and keeping PipeWire/WirePlumber running on Host A even when you’re not physically logged in?

    sudo loginctl enable-linger "$USER"
    
    systemctl --user enable --now pipewire.socket wireplumber.service
    

    If that doesn’t work, I’d check whether your SSH session has access to /dev/snd/ and whether PipeWire is actually running.