-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PipeWire status tracking issue #102547
Comments
From my experience
There are other things that are pretty annoying, audio control is completely bonkers for me, Note that you may not experience some of my issues, because it's configuration dependent on more than just the pipewire configuration. As of November 14, 2020, all of the issues I've listed have been resolved (on my system). HFP/HSP doesn't work the last time checked that out, as only the backend support is implemented, in case that is a deal breaker for anyone (as far as I can remember). |
Did some digging and the Discord issue is fairly simple: the wrapper prepends the dependencies' paths to LD_LIBRARY_PATH, and those dependencies include libpulseaudio. So I tried making a copy of the wrapper script that prepends the pipewire pulseaudio shim's path instead of the native pulseaudio one and voilà, it works perfectly! Simply removing the libpulseaudio part from LD_LIBRARY_PATH works as well, as long as the result does not put the native libpulseaudio before the pipewire shim. I'm guessing the Right solution to this is to wait for the pulse-bridge aka "fake" pulseaudio server in pipewire so Discord (and presumably steam) can just use the native library and everything looks like business as usual to them. |
Pulse-bridge does seem to work surprisingly well: I tried stopping the pipewire service and launching it manually with pulse-bridge enabled (I have pulseaudio disabled in my nixos config so there won't be conflicts):
|
Upstream has deprecated the libpulseaudio.so shim and provides a systemd service to load pulse-bridge now. This makes packaging a lot easier since we don't have to patch files and there should no longer be socket conflicts with pulseaudio either. |
ALSA compatibility option doesn't provide nixpkgs/nixos/modules/services/desktops/pipewire.nix Lines 85 to 98 in c18b90b
This leads to the impossibility to control pipewire via alsamixer :( |
0.3.16 has been merged, this adds pulse-bridge which fixes most pulseaudio applications including steam and its games. (channels haven't updated yet at the time of writing though) |
|
With 0.3.17, bluetooth works out of the box for me (both HFP and A2DP). #105362 |
Isn't the bluez5 module disabled by default? |
#105362 enables it by the |
Bluetooth worked for me even without the |
According to the source code, it should be enabled with the pulse file: https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/0.3.17/src/examples/media-session/media-session.c#L2109-2111 And looks like it should be |
Thanks, fixed the Eventually, the nixos module should also generate a |
I have an issue while trying to use
|
btw, imho, it is worth to replace
with
|
Is there a reason to keep the |
Yeah, it should work with conf.d as well. You could test with alsamixer: if everything is ok, it will give you pipewire volume control instead of hardware volume control by default. |
It finds out, qjackctl can be fixed with |
I don't know if the following issues are nixos specific:
|
With pipewire, my keyboard media keys (vol up & vol down) don't seem to work under gnome (x11). Anyone has an idea? |
It's a bug with restoring default device on restart |
pipewire has a race condition with logind, thus adding the user to the |
0.3.18 is out, fixes some more issues: https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/NEWS Hopefully my sound card won't stutter anymore with the latest bugfixes. |
There is still the matter of configuring wireplumber via nix, but other than that this issue does indeed seem to have outlived its usefulness. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nixos-custom-directory-with-uid-gid-mode-and-bind-mount/19412/19 |
hey, I am developing a program and encountering this message
I am non NixOS user but use nix-shell. maybe someone can help me? Thank you in advace. |
@jansol: All the boxes in the original post are checked now (done). Should we close this issue? |
None here. |
Does this exist yet? |
There is a brief mention in the manual but nothing detailed. |
Have we had any movement on this? I am currently reliant on the media-session options and would need an equivalent system for wireplumber. A few months ago I had started looking into it and I believe that the configuration is mostly compatible, but I could be wrong. If someone has any insight into wireplumber config vs media-session it would be useful to add to this ticket. I think we should try and get wireplumber up to parity with media-session options-wise since it's already been set as the default. We probably should have done that before making it the default option. |
It is not at all compatible. Wireplumber is currently configured with Lua scripts, which you can do yourself with |
There has also not been as much pressure to configure wireplumber from a nixos module since it has supported per-user config in |
Ah, I see. Thanks for the corrections, folks! I'll see about converting my own configs to work with wireplumber then :) |
What do your configs actually do? Wireplumber generally has more sensible defaults than media-session. |
This seems to be a fairly common occurrence for needing config: https://wiki.archlinux.org/title/PipeWire#Microphone_is_not_detected_by_PipeWire My laptop mic is missing so this might fix it but I haven't had time to test it & I very rarely need it |
Those are configuration profile bugs and should really be resolved upstream. |
I also disable acp to avoid HDMI output to disappear when my monitor goes idle. Without this, default output device changes to built-in audio not connected to anything or if I disable built-in audio in UEFI setitngs, audio becomes choppy as the ALSA driver seem to not to handle pipewire's suspend well. |
@ilya-fedin I seem to have issues with HDMI output as well, though not exactly yours. What does "acp" stand for and how can I disable it pleasE ? |
@teto ACP seems to be ALSA Card Profile, as per: I have the same issues with HDMI output disappearing if I enabled it and disconnect my monitor. |
It stands for ALSA-Card-Profile, those profiles allow pipewire/pulseaudio to act smarter on devices. If disabled, pipewire presents devices as ALSA mostly. Copy /run/current-system/sw/share/wireplumber/main.lua.d/50-alsa-config.lua to ~/.config/wireplumber/main.lua.d/50-alsa-config.lua, set api.alsa.use-acp to 0. I've also set session.suspend-timeout-seconds to 0. |
realtime audio seems to be broken on a recent version of nixpkgs, anyone have issues with stuttering etc? no threads started by apps are realtime (for example firefox), usually there's one for the audio thread, interestingly rtkit says there's about 17 threads, but I only see 3. |
I haven't had time to look into it but I did notice that I occasionally (like once in 3 hours or so) get a couple of seconds of really bad stuttering for a couple of months now. |
I did also have an issue with my Zen 3 CPU stuttering after updating to 6.1 but that went away with a BIOS update. https://www.amd.com/en/support/kb/faq/pa-410 |
Looks like that might well be it: https://www.phoronix.com/news/Linux-6.3-Fix-For-AMD-fTPM |
I'm going to close this thread to prevent catch-all issue, please open new issues if you have any problems :) |
@jansol I figured out my issue was a buggy USB-hub messing with my microphone and thus all of pipewire. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/a52-ac3-surround-decoder-through-pipewire-alsa-not-working/30999/1 |
TL;DR: Things are generally in pretty good shape but wireplumber can't be configured via the nixos module yet. On the other hand most people won't need to change anything from the defaults.
If you are reporting something, please mention the pipewire version you are using, as it is updated very frequently. Bonus points for checking if upstream already has a fix mentioned in the commit log or release notes.
Currently on master:
~/.config/wireplumber
)Configuration
Most basic additions to configuration.nix, this should be enough for most people:
Some useful knobs if you want to finetune or debug your setup. Note that pipewire config keys may contain a period '.' so they need to be quoted in Nix. (combine these with the basic config above):
Virtual Sinks/Sources
If you want to do some fancy routing with null sinks, you can define them directly in the pipewire config like this. Especially convenient if you have a multi-channel (8+, or something "weird" like 2x2, 3x2) soundcard that keeps confusing applications with too many channels or a bad channel layout. (Note: you can set those cards to the "Pro Audio" profile with pavucontrol so pipewire doesn't try to guess a wrong channel layout for them.) Note that arrays are replaced rather than merged with defaults, so you need to list any default items that you want to keep here (the dummy and freewheeling driver for JACK applications, if you have JACK support enabled):
You can't currently link nodes to each other in the config, but you can adapt this script to do it for you. Replace the soundcard names and ports with whatever matches your setup:
Standalone mode (no session manager)
If you want to run a minimal pipewire instance with no session manager for automatic switching etc, you can do that as of 0.3.46 (technically pipewire supported it a bit longer than that but that's when the nixos module was adapted to account for it). This is mainly intended for systems that used to run purely JACK:
If this doesn't work it is likely because it defaults to using an alsa device called
hw:0
which might not be the sound card you want to be using. You can easily fix this by overriding the device name in the"context.objects"
array of the main pipewire configuration. The names and descriptions of available devices can be seen withaplay -l
from thealsa-utils
package. Note that you'll have to write out the full contents of the array because the default items will be replaced completely with this:Miscellaneous
For the time being you can switch between two session managers, although there is usually no reason to. Note #159546 which intends to change the default from media-session to wireplumber since media-session is considered deprecated by upstream.
For other available options, consult the upstream config templates. All config files listed there should be accessible via the nixos module as
services.pipewire.config.$basename
andservices.pipewire.media-session.config.$basename
for the daemon and the default session manager respectively.Please help test new PRs!
Please do try out update pull requests before they are merged (if you can), it is fairly easy:
sudo nixos-rebuild test -I nixpkgs=path/to/nixpkgs/clone
Known Problems
The issues people have previously described here should all be fixed now.
Please add a comment if something is broken (and ideally open an issue upstream if it is not a packaging problem).
The text was updated successfully, but these errors were encountered: