• getting started with pipewire

    From Haines Brown@21:1/5 to All on Wed Jan 1 18:20:02 2025
    I have ALSA and PulseAudio installed, but intend to use PipeWire as principle server and so
    installed that as well, although I gather pipewire is automatically installed in bookworm. I
    follow the guidance of https://wiki.debian.org/PipeWire but get into trouble right at the start.

    It says to start of by doing:

    # touch /etc/pipewire/media-session.d/with-pulseaudio

    The problem is that I have no /etc/pipewire/ although it is installed:

    $ pipewire --version
    pipewire
    Compiled with libpipewire 0.3.65
    Linked with libpipewire 0.3.65

    but rather I have /usr/share/pipewire but it contains no media-session.d/.

    Do I need to re-install? Find newer directions?


    --

    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Haines Brown on Wed Jan 1 18:40:01 2025
    On Wed, 1 Jan 2025 12:01:52 -0500
    Haines Brown <haines@histomat.net> wrote:

    It says to start of by doing:

    # touch /etc/pipewire/media-session.d/with-pulseaudio

    The problem is that I have no /etc/pipewire/ although it is installed:

    $ pipewire --version
    pipewire
    Compiled with libpipewire 0.3.65
    Linked with libpipewire 0.3.65

    but rather I have /usr/share/pipewire but it contains no
    media-session.d/.

    Do I need to re-install? Find newer directions?

    0.3.65 is the version on Debian 12. Why are you following the
    instructions for Debian 11 if you are on Debian 12?

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Haines Brown@21:1/5 to Charles Curley on Wed Jan 1 19:40:03 2025
    On Wed, Jan 01, 2025 at 10:31:47AM -0700, Charles Curley wrote:

    0.3.65 is the version on Debian 12. Why are you following the
    instructions for Debian 11 if you are on Debian 12?

    Oops! The wiki did not explicitly say it was for Debian 11 and I
    as not sufficiently cautious. I find many directions for Debian 12.
    Hopefully things will go better after I reboot


    https://charlescurley.com
    https://charlescurley.com/blog/

    --

    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Haines Brown@21:1/5 to All on Thu Jan 2 16:20:02 2025
    Thanks to your heldp, with the help of the correct guide it seems I was able to install
    pipewire successflly. To apply it I had to reboot.

    I assumed that once rebooted I should restart the pipewife daemon with the command as
    follows. Howerver it gave me errors:

    $ pipewire
    [E][00304.248813] mod.protocol-native | [module-protocol-:
    731 lock_socket()] server 0x55cd2eef45e0: unable to
    lock lockfile '/run/user/1000/pipewire-0.lock':
    Resource temporarily unavailable (maybe another daemon is
    running)
    [E][00304.248890] pw.conf | [ conf.c: 594
    load_module()] 0x55cd2eedc160: could not load mandatory module
    "libpipewire-module-protocol-native": Resource temporarily
    unavailable
    [E][00304.248930] default | [ pipewire.c: 125 main()]
    failed to create context: Resource temporarily unavailable

    It looks like the daemon could not be started because the pipewire daemon was aleady
    running and created a lock. Does a roboot start the daemon automatically? If the daemon
    is alreaduy running, how does one pipewife?

    --

    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Haines Brown@21:1/5 to Haines Brown on Tue Jan 7 18:10:01 2025
    On Thu, Jan 02, 2025 at 10:15:18AM -0500, Haines Brown wrote:
    Thanks to your heldp, with the help of the correct guide it seems I was able to install
    pipewire successflly. To apply it I had to reboot.

    I did the reboot and this was the result

    $ pipewire
    [E][00304.248813] mod.protocol-native | [module-protocol-:
    731 lock_socket()] server 0x55cd2eef45e0: unable to
    lock lockfile '/run/user/1000/pipewire-0.lock':
    Resource temporarily unavailable (maybe another daemon is
    running)
    [E][00304.248890] pw.conf | [ conf.c: 594
    load_module()] 0x55cd2eedc160: could not load mandatory module
    "libpipewire-module-protocol-native": Resource temporarily
    unavailable
    [E][00304.248930] default | [ pipewire.c: 125 main()]
    failed to create context: Resource temporarily unavailable

    I have no idea how to use pipewire. Do you simply run the comand $ pipewire to get an interface like alsamixer? Cant't run $ alsamixer because "host is down".

    --

    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Max Nikulin on Wed Jan 8 04:00:01 2025
    On Wed, Jan 08, 2025 at 09:35:03 +0700, Max Nikulin wrote:
    On 08/01/2025 00:08, Haines Brown wrote:
    I have no idea how to use pipewire. Do you simply run the comand $ pipewire to
    get an interface like alsamixer?

    Why are you trying to start pipewire manually? Systemd should do it for you as a part of user session. It is not an application with GUI.

    Just as a baseline, audio works fine for me in Debian 12. I never had
    to configure or change anything.

    I login on a text console and run "startx" which invokes fvwm because
    that's what my ~/.xsession file says to do.

    Pipewire is started automatically. The pipewire.service is triggered
    by pipewire.socket, presumably in response to some application trying
    to open an audio output device. It's all hazy and not well documented
    (at least in the places I've looked).

    hobbit:~$ systemctl --user status pipewire.service
    ● pipewire.service - PipeWire Multimedia Service
    Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; preset: e>
    Drop-In: /home/greg/.config/systemd/user/service.d
    └─env.conf, umask.conf
    Active: active (running) since Thu 2024-12-05 06:48:46 EST; 1 month 3 days>
    TriggeredBy: ● pipewire.socket
    Main PID: 925 (pipewire)
    Tasks: 2 (limit: 18737)
    Memory: 10.8M
    CPU: 19h 27min 6.188s
    CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewi>
    └─925 /usr/bin/pipewire

    Dec 05 06:48:46 hobbit systemd[909]: Started pipewire.service - PipeWire Multim>
    Dec 05 06:48:46 hobbit pipewire[925]: mod.rt: Can't find org.freedesktop.portal>
    Dec 05 06:48:46 hobbit pipewire[925]: mod.rt: found session bus but no portal

    You probably won't have those Drop-In files. They're unrelated, part
    of some testing I was doing a while ago, and never cleaned up.

    I don't know what a "portal" means in this context. It seems unimportant, though, because it's working as expected.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Haines Brown@21:1/5 to Max Nikulin on Wed Jan 8 22:00:01 2025
    On Wed, Jan 08, 2025 at 09:35:03AM +0700, Max Nikulin wrote:
    On 08/01/2025 00:08, Haines Brown wrote:
    I have no idea how to use pipewire. Do you simply run the comand $ pipewire to
    get an interface like alsamixer?

    Why are you trying to start pipewire manually? Systemd should do it for you as a part of user session. It is not an application with GUI.

    You should have some mixer applet in your desktop environment. Another
    option is pavucontrol.

    Check

    systemctl --user --failed

    and other systemctl commands to inspect status of pipewire units.

    I don't have a desktop environment, and I know nothing about systemd
    as my dated message header might hint.

    $ systemctl --user --failed
    UNIT LOAD ACTIVE SUB DESCRIPTION
    0 loaded units listed.

    this means nothing to me.

    In my case pipewire just works. There was some issue immediately after I replaced pulseaudo, but it disappeared before I figured out what happened.

    I do not have pipewire installed, but wireplumber. I assiume that
    runninb it brings up an interface that has audio contols.

    $ systemctl --user status wireplumber
    ● wireplumber.service - Multimedia Service Session Manager
    Loaded: loaded (/usr/lib/systemd/user/wireplumber.service;
    enabled; preset: enabled)
    Active: active (running) since Thu 2025-01-02 09:39:26 EST; 6 days ago
    Main PID: 1535 (wireplumber)
    ...
    Jan 07 11:19:53 iskra wireplumber[1535]:
    <WpSiAudioAdapter:0x55e5d95c0e00> failed to activate item:
    Object activation aborted: proxy destroyed
    Jan 07 11:19:53 iskra wireplumber[1535]:
    <WpSiAudioAdapter:0x55e5d95c0c10> Object activation aborted:
    proxy destroyed

    I do not have sddm installed. Is it needed?

    --

    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Haines Brown@21:1/5 to All on Thu Jan 9 13:40:01 2025
    Now I get these lines from systemctl --user status pipewire.service

    Jan 02 09:39:26 iskra systemd[1518]: Started pipewire.service -
    PipeWire Multimedia Service.
    Jan 07 11:14:49 iskra pipewire[1534]: spa.alsa: 'front:0':
    playback open failed: Device or resource busy
    Jan 07 11:14:49 iskra pipewire[1534]: mod.adapter:
    0x563ede935a90: can't get format: Device or resource busy

    # fuser -fv /dev/snd/*
    USER PID ACCESS COMMAND
    /dev/snd/controlC0: haines 1535 F.... wireplumber
    /dev/snd/controlC1: haines 1535 F.... wireplumber
    /dev/snd/controlC2: haines 1535 F.... wireplumber
    /dev/snd/seq: haines 1534 F.... pipewire

    I have pipewire-pulse intstalled, not puleaudio.

    $ wireplumber
    Failed to connect to PipeWire

    $ wpctl status
    Could not connect to PipeWire

    # systemctl --user restart wireplumber.service
    Failed to connect to bus: No medium found


    Haines Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Haines Brown on Thu Jan 9 15:10:02 2025
    On Thu, Jan 09, 2025 at 07:39:29 -0500, Haines Brown wrote:
    I have pipewire-pulse intstalled, not puleaudio.

    Maybe change that?

    hobbit:~$ dpkg -l | grep pulse
    ii libpulse-mainloop-glib0:amd64 16.1+dfsg1-2+b1 amd64 PulseAudio client libraries (glib support)
    ii libpulse0:amd64 16.1+dfsg1-2+b1 amd64 PulseAudio client libraries
    ii libpulse0:i386 16.1+dfsg1-2+b1 i386 PulseAudio client libraries
    ii libpulsedsp:amd64 16.1+dfsg1-2+b1 amd64 PulseAudio OSS pre-load library
    ii pipewire-pulse 0.3.65-3+deb12u1 amd64 PipeWire PulseAudio daemon
    ii pulseaudio 16.1+dfsg1-2+b1 amd64 PulseAudio sound server
    ii pulseaudio-utils 16.1+dfsg1-2+b1 amd64 Command line tools for the PulseAudio sound server

    $ wireplumber
    Failed to connect to PipeWire

    I'm afraid I'm not familiar with these commands. But I get this:

    hobbit:~$ wireplumber
    C 08:56:02.434125 GLib (null):(null):(null): Failed to set scheduler settings: Operation not permitted
    ^CM 08:56:09.483224 wireplumber ../src/main.c:372:signal_handler: stopped by signal: Interrupt
    M 08:56:09.484381 wireplumber ../src/main.c:364:on_disconnected: disconnected from pipewire

    It "hung" after the first line of output, and then I pressed Ctrl-C
    several seconds later to kill it. Audio still worked afterward so I
    don't think I broke anything.

    $ wpctl status
    Could not connect to PipeWire

    hobbit:~$ wpctl status
    ^C

    It just "hung" with no output.

    After I pressed Ctrl-C, my audio stopped working. I'm never going
    to do this one again!

    # systemctl --user restart wireplumber.service
    Failed to connect to bus: No medium found

    That shouldn't have been done as root. I think.

    I'm not doing that one.

    Now I get to try to figure out how to fix my audio. :( :( :(

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Greg Wooledge on Thu Jan 9 15:20:01 2025
    On Thu, Jan 09, 2025 at 09:00:24 -0500, Greg Wooledge wrote:
    $ wpctl status
    Could not connect to PipeWire

    hobbit:~$ wpctl status
    ^C

    It just "hung" with no output.

    After I pressed Ctrl-C, my audio stopped working. I'm never going
    to do this one again!

    # systemctl --user restart wireplumber.service
    Failed to connect to bus: No medium found

    That shouldn't have been done as root. I think.

    I'm not doing that one.

    Now I get to try to figure out how to fix my audio. :( :( :(

    I tried everything I could immediately think of, including logging out
    and back in, but none of it worked until I ended up rebooting like a
    goddamned Windows user.

    Moral of the story: NEVER EVER run "wpctl". Fucking thing doesn't even
    have a man page.

    But at least I have audio again now.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tomas@tuxteam.de@21:1/5 to Greg Wooledge on Thu Jan 9 15:30:01 2025
    On Thu, Jan 09, 2025 at 09:15:16AM -0500, Greg Wooledge wrote:
    On Thu, Jan 09, 2025 at 09:00:24 -0500, Greg Wooledge wrote:
    $ wpctl status
    Could not connect to PipeWire

    hobbit:~$ wpctl status

    [...]

    I tried everything I could immediately think of, including logging out
    and back in, but none of it worked until I ended up rebooting like a goddamned Windows user.

    Moral of the story: NEVER EVER run "wpctl". Fucking thing doesn't even
    have a man page.

    But at least I have audio again now.

    This somehow confirms my experiences with pipewire (not for me, for
    another user with the full-fledged GUI thing).

    Pity. I was avoiding pulse and hoping to leapfrog it.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZ3/bgwAKCRAFyCz1etHa RqXxAJ9KGC5rb0A+i0Vst7pRpry/lGj4PQCfakN9XS1kkfjrm9bwElMZN56ZICc=
    =n4+e
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pocket@homemail.com@21:1/5 to All on Thu Jan 9 16:20:02 2025
    Sent: Thursday, January 09, 2025 at 9:15 AM
    From: "Greg Wooledge" <greg@wooledge.org>
    To: debian-user@lists.debian.org
    Subject: Re: getting started with pipewire

    On Thu, Jan 09, 2025 at 09:00:24 -0500, Greg Wooledge wrote:
    $ wpctl status
    Could not connect to PipeWire

    hobbit:~$ wpctl status
    ^C

    It just "hung" with no output.

    After I pressed Ctrl-C, my audio stopped working. I'm never going
    to do this one again!

    # systemctl --user restart wireplumber.service
    Failed to connect to bus: No medium found

    That shouldn't have been done as root. I think.

    I'm not doing that one.

    Now I get to try to figure out how to fix my audio. :( :( :(

    I tried everything I could immediately think of, including logging out
    and back in, but none of it worked until I ended up rebooting like a goddamned Windows user.

    Moral of the story: NEVER EVER run "wpctl". Fucking thing doesn't even
    have a man page.

    But at least I have audio again now.



    wpctl status

    PipeWire 'pipewire-0' [1.2.4, pocket@pocket, cookie:3954404134]
    └─ Clients:
    33. pipewire [1.2.4, pocket@pocket, pid:737]
    35. WirePlumber [1.2.4, pocket@pocket, pid:736]
    36. WirePlumber [export] [1.2.4, pocket@pocket, pid:736]
    59. wpctl [1.2.4, pocket@pocket, pid:22459]
    61. xdg-desktop-portal-wlr [1.2.4, pocket@pocket, pid:1035]
    66. xdg-desktop-portal [1.2.4, pocket@pocket, pid:995]
    67. unknown [1.2.4, pocket@pocket, pid:947]
    68. Firefox [1.2.4, pocket@pocket, pid:1759]

    Audio
    ├─ Devices:
    │ 90. Built-in Audio [alsa]
    │ 91. Built-in Audio [alsa]

    ├─ Sinks:
    │ * 71. Built-in Audio Digital Stereo (HDMI) [vol: 0.34]

    ├─ Sink endpoints:

    ├─ Sources:

    ├─ Source endpoints:

    └─ Streams:

    Video
    ├─ Devices:
    │ 42. rpivid [v4l2]
    │ 43. pispbe [v4l2]
    │ 44. pispbe [v4l2]
    │ 45. pispbe [v4l2]
    │ 46. pispbe [v4l2]
    │ 47. pispbe [v4l2]
    │ 48. pispbe [v4l2]
    │ 49. pispbe [v4l2]
    │ 50. pispbe [v4l2]
    │ 51. pispbe [v4l2]
    │ 52. pispbe [v4l2]
    │ 53. pispbe [v4l2]
    │ 54. pispbe [v4l2]
    │ 55. pispbe [v4l2]
    │ 56. pispbe [v4l2]
    │ 57. pispbe [v4l2]
    │ 58. pispbe [v4l2]

    ├─ Sinks:

    ├─ Sink endpoints:

    ├─ Sources:

    ├─ Source endpoints:

    └─ Streams:

    Settings
    └─ Default Configured Node Names:
    pocket@pocket:~ $

    Works for me

    Audio works before and after.

    I remove almost 100 packages on a default debian install directly after the install.
    I have a script for that.
    It makes my installs sane.

    debian bug?

    cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

    This is from my last surviving debian installation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geoff@21:1/5 to Greg Wooledge on Fri Jan 10 01:30:01 2025
    Greg Wooledge wrote:
    On Thu, Jan 09, 2025 at 07:39:29 -0500, Haines Brown wrote:
    I have pipewire-pulse intstalled, not puleaudio.

    Maybe change that?

    hobbit:~$ dpkg -l | grep pulse
    ii libpulse-mainloop-glib0:amd64 16.1+dfsg1-2+b1 amd64 PulseAudio client libraries (glib support)
    ii libpulse0:amd64 16.1+dfsg1-2+b1 amd64 PulseAudio client libraries
    ii libpulse0:i386 16.1+dfsg1-2+b1 i386 PulseAudio client libraries
    ii libpulsedsp:amd64 16.1+dfsg1-2+b1 amd64 PulseAudio OSS pre-load library
    ii pipewire-pulse 0.3.65-3+deb12u1 amd64 PipeWire PulseAudio daemon
    ii pulseaudio 16.1+dfsg1-2+b1 amd64 PulseAudio sound server
    ii pulseaudio-utils 16.1+dfsg1-2+b1 amd64 Command line tools for the PulseAudio sound server

    I don't have pulseaudio itself installed:

    $ dpkg -l | grep pulse
    ii gstreamer1.0-pulseaudio:amd64 1.24.11-2 amd64 GStreamer plugin for PulseAudio (transitional package)
    ii libcanberra-pulse:amd64 0.30-17+b1 amd64 PulseAudio backend for libcanberra
    ii libkf6pulseaudioqt5:amd64 1.6.1-1 amd64 Pulseaudio bindings library for Qt 6
    ii libpulse-dev:amd64 17.0+dfsg1-1 amd64 PulseAudio client development headers and libraries
    ii libpulse-mainloop-glib0:amd64 17.0+dfsg1-1 amd64 PulseAudio client libraries (glib support)
    ii libpulse0:amd64 17.0+dfsg1-1 amd64 PulseAudio client libraries
    ii libpulse0:i386 17.0+dfsg1-1 i386 PulseAudio client libraries
    ii libpulsedsp:amd64 17.0+dfsg1-1 amd64 PulseAudio OSS pre-load library
    ii pipewire-pulse 1.2.7-1+b1 amd64 PipeWire PulseAudio daemon
    ii projectm-pulseaudio 3.1.12-4+b2 amd64 projectM PulseAudio module
    ii pulseaudio-utils 17.0+dfsg1-1 amd64 Command line tools for the PulseAudio sound server



    $ wireplumber
    Failed to connect to PipeWire

    I'm afraid I'm not familiar with these commands. But I get this:

    hobbit:~$ wireplumber
    C 08:56:02.434125 GLib (null):(null):(null): Failed to set scheduler settings: Operation not permitted
    ^CM 08:56:09.483224 wireplumber ../src/main.c:372:signal_handler: stopped by signal: Interrupt
    M 08:56:09.484381 wireplumber ../src/main.c:364:on_disconnected: disconnected from pipewire

    It "hung" after the first line of output, and then I pressed Ctrl-C
    several seconds later to kill it. Audio still worked afterward so I
    don't think I broke anything.


    wireplumber is run as a service:

    $ systemctl --user status wireplumber.service
    ● wireplumber.service - Multimedia Service Session Manager
    Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
    Active: active (running) since Fri 2025-01-10 10:37:52 AEDT; 12min ago
    Invocation: 835b1ecf797541cb9af8cacfd3456557
    Main PID: 396821 (wireplumber)
    Tasks: 6 (limit: 37954)
    Memory: 6.3M (peak: 10.1M)
    CPU: 500ms
    CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
    └─396821 /usr/bin/wireplumber



    $ wpctl status
    Could not connect to PipeWire


    Works fine here, get a bunch of info about audio and video sinks and sources etc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)