So I know my setup is really niche, but here goes nothing

  • I am using Arch Pi on Pi 4
  • Installed cage as a lightweight Wayland compositor
  • Installed mpv + wireplumber + pipewire

I am not quite sure how to use cage to launch a simple “Wayland session (if it even makes sense)”, so that I can send MPV to that display. So I tried cage -s alacritty :1, and it does launch alacritty with it detecting that it is on wayland.

But when I do DISPLAY=:1 mpv ...., the video runs, but there’s no audio. Also there’s no errors shown on mpv either.

The other thing of note is that I tried cage -s Xwayland :1 and the audio+video works perfectly.

So in all:

  1. How do I launch cage to spawn a simple Wayland session? Is this even possible?
  2. How do I solve the audio issue on Wayland?

EDIT: Thanks all for the help. After some investigation, I found out the pipewire somehow is not ran on startup of alacritty, but it did for Xwayland. I noticed that the first play of the video would be audio-less on alacritty, and subsequent ones are fine. It seems like the first run causes pipewire to be started and thus I wrongfully assumed that the daemon was running.

Still strange nonetheless…

  • Miku Luna \ she/it@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    It’s possible you didn’t install pipewire-pulse, or didn’t start/enable a service.

    Btw fun fact: you can use mpv --gpu-context=drm in a tty to watch a video directly from the framebuffer.

    • 0WN3D@lemmy.cafeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      That shouldn’t be the problem since I’m using pipewire and it is working in the Xwayland session. When I launch into alacritty, I also checked that pipewire + wireplumber were both active

  • anonymous_bot@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Have you tried with a different compositor first to rule out whether cage is the issue? For example try sway.

    • 0WN3D@lemmy.cafeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      I tried with cage + Xwayland and that works perfectly, so I highly doubt that is the issue. Maybe it is something to do with cage + alacritty that is causing it, but I’m not too well versed in the Wayland stuff to know if spawning a terminal application may somehow not support audio.

  • wuphysics87@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I imagine these are two separate issues. I’ll attack the audio as I don’t know much about cage, albeit, are you running it from a tty on login or do you have a display manager (e.g. gdm, sddm)

    Can you dump your installed packages with pacman -Qe and post it here? I’ll compare it to mine.

    My audio setups have been pretty… interesting in the past. Normally, I prefer to do everything in the terminal, but pavucontrol can be pretty handy.

    Other than that, you might try reading the man page for pactl.

    • 0WN3D@lemmy.cafeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      are you running it from a tty on login

      Yea, directly on tty.

      I imagine these are two separate issues.

      I’d think they are related since mpv is working fine on Xwayland but not when I launch alacritty instead

      Can you dump your installed packages with pacman -Qe and post it here? I’ll compare it to mine.

      alacritty 0.12.2-1
      ani-cli 4.6-1
      archlinuxarm-keyring 20140119-2
      base 3-1
      base-devel 1-1
      bat 0.23.0-3
      cage 0.1.5-1
      dhcpcd 10.0.2-1
      dialog 1:1.3_20230209-1
      linux-rpi 6.1.54-1
      lobster 4.0.0-1
      man-db 2.11.2-1
      neovim 0.9.1-1
      net-tools 2.10-2
      netctl 1.28-2
      noto-fonts 1:23.9.1-1
      opendoas 6.8.2-1
      openssh 9.4p1-4
      pacman-contrib 1.9.1-1
      raspberrypi-bootloader 20230921-1
      raspberrypi-firmware 20230921-1
      ripgrep 13.0.0-3
      socat 1.7.4.4-1
      tmux 3.3_a-7
      vi 1:070224-6
      which 2.21-6
      wireless-regdb 2023.09.01-1
      wireless_tools 30.pre9-3
      wpa_supplicant 2:2.10-8
      xorg-xwayland 23.2.1-1
      
      • wuphysics87@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Seems like a pretty minimal config. I can respect that. Have you tried running with a display manager? E.g. sddm. They will often start with additional options you wouldn’t have starting from tty.

        If sddm does work, you can cat /etc/sddm.conf I believe to see the options it uses and use those when you start from tty

        For the audio, try installing pipewire-pulse

        Finally, arch for arm isn’t officially supported. Your issues could stem from that. You might consider playing around in a VM with both versions to see if you can reproduce your problem.