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 physically logged on to 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! 😊

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 4 hours ago* (last edited 4 hours ago)

Aha, ok, so it's using pipewire when logged in locally, and it can't find it when using it remotely.

Can you try logging in via ssh again and checking if there's a /run/user/$UID/pipewire-0 (or other pipewire-<NUMBER> sockets)?

If there isn't, that means your pipewire service isn't running, you can try starting it with systemctl --user start pipewire wireplumber. You may need a loginctl enable-linger $USER and a re-login for that to work. You can also do systemctl --user enable pipewire wireplumber so that it auto-starts them whenever you log in, if that's not already the case.

If/once that socket is there, you may need to export XDG_RUNTIME_DIR=/run/user/$uid so that mpv can find the socket. You should probably do that in your .profile so it's set automatically.

  • source
  • parent