• pipewire/pulseaudio cpu usage

    From Mike Scott@usenet.16@scottsonline.org.uk.invalid to alt.os.linux.mint on Thu Sep 4 08:46:37 2025
    From Newsgroup: alt.os.linux.mint

    An oddity, although resolved for now.

    On a new low-power machine, intended ultimately as headless. When I
    logged in over ssh and ran top, I saw pipewire taking a steady perhaps
    15% cpu: I replaced with pulse, and pulse instead took 20% or so.

    In either case, and still running top on the ssh session, simply logging
    on on the console made this drop virtually to 0%.

    I've resolved the issue by removing pipewire and disabling pulse with systemctl, which is OK as I don't need audio for this box at all.

    But I'd love to know what's been going on. Can anyone shed light please?
    --
    Mike Scott
    Harlow, England

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Paul@nospam@needed.invalid to alt.os.linux.mint on Thu Sep 4 10:22:01 2025
    From Newsgroup: alt.os.linux.mint

    On Thu, 9/4/2025 3:46 AM, Mike Scott wrote:
    An oddity, although resolved for now.

    On a new low-power machine, intended ultimately as headless. When I logged in over ssh and ran top, I saw pipewire taking a steady perhaps 15% cpu: I replaced with pulse, and pulse instead took 20% or so.

    In either case, and still running top on the ssh session, simply logging on on the console made this drop virtually to 0%.

    I've resolved the issue by removing pipewire and disabling pulse with systemctl, which is OK as I don't need audio for this box at all.

    But I'd love to know what's been going on. Can anyone shed light please?



    There is an example here of the kinds of things that can happen.

    https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1968

    In that one, Firefox has a setting:

    media.webspeech.synth.enabled BOOLEAN false # In about:config

    Any sources that "leak", or make a socket but don't use it,
    can leave the thing doing some polling. Another example of a
    leakage is apparently MIDI plumbing.

    Another way for audio to burn cycles, is if the permissions on
    a /dev/audio are not permissive and a service is poking the
    hardware for nothing. In some ecosystems, logging to console
    confers "ownership of hardware", and the perms on some hardware
    devices become owned by the console owner.

    You could try "strace" on a thing like that, and see if there
    are any entries pointing to plumbing.

    You can see in the above example bug report, there is a utility
    called "pw-top" which shows activity feeding pipewire.

    alsa_output.pci-0000_07_00.6.HiFi__hw_Generic_1__sink
    46 + speech-dispatcher-espeak-ng
    46 + speech-dispatcher-dummy
    46 + Firefox

    If you're making a true headless computer, you could install
    a "server" version of an OS, instead of the desktop version,
    and a whole bunch of cruft is not included. You are unlikely to
    want this, but it is one way to ditch a bunch of stuff in one go.
    For practice, I've started with a server distro, and added back
    a desktop, just to see if I could do it. Metapackages provided
    are cheating, and hide the details of adding back a desktop :-)

    Paul
    --- Synchronet 3.21a-Linux NewsLink 1.2