-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Fix alsa, pulseaudio (and jack, pipewire, steam) on x86_64 #157631
Conversation
This patch was originally added in 2014 to support running apps with 32bit sound on 64bit architecture. The patch itself add a "libs" field to syntax recognized in /etc/asound.conf: ab8ef63 The pulseaudio module then used the "libs" to declare locations for both native and 32bit plugins: 0c8ad65 In a recent alsa-lib upgrade (1.2.5.1 -> 1.2.6.1), the patch was removed without understanding its purpose, leaving alsa-lib unable to parse the etc/asound.conf that the pulseaudio module generated: aeea1bb As a result, ALSA utils are failing on x86_64 architecture if pulseaudio is enabled. E.g. $ alsactl monitor default alsa-lib control.c:1464:(snd_ctl_open_conf) Unknown field libs Cannot open ctl default $ alsamixer ALSA lib control.c:1464:(snd_ctl_open_conf) Unknown field libs cannot open mixer: Invalid argument $ speaker-test -t wav -c 2 speaker-test 1.2.6 Playback device is default Stream parameters are 48000Hz, S16_LE, 2 channels WAV file(s) ALSA lib pcm.c:2576:(snd_pcm_open_conf) Unknown field libs Playback open error: -22,Invalid argument Put the patch back in place to fix what was broken.
You should add documentation for why it's needed.
|
@ofborg test pulseaudio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is quite unfortunate! I do wonder how other distros manage to do it without this patch.
@L-as I agree, and maybe there's a way to achieve this without a patch, but I was unable to determine what that is. Someone more knowledgeable than myself in this area might have more luck. However, as described in #157352 (comment), I think the first priority should be fixing what's broken. Then, if someone can find an alternative solution, that would be a great followup. |
@lovesegfault Anything I can do to help get this PR approved/merged? |
I think this is definitely better than the current state of master, so I'm gonna merge this. |
remove alsa 32bit support (the relevant PR NixOS/nixpkgs#157631) got merged, but I don't currently need 32bit alsa. removed pipewire media-session in favour of wireplumber
This reverts commit 7cd5154. Sound not working in qutebrowser. Will wait for changes in NixOS/nixpkgs#157631 to be in nixos-unstable.
(cherry picked from commit 37809af)
Motivation for this change
A recent alsa-lib upgrade (#154276) removed a patch without understanding its purpose, leaving alsa-lib unable to parse the /etc/asound.conf generated by pulseaudio, jack, or pipewire.
As a result, ALSA utils (e.g.
alsactl
,alsamixer
,speaker-test
) are failing on x86_64 architecture for some configurations (e.g. if pulseaudio is enabled).The patch was originally added in 2014 to support running apps with 32bit sound on 64bit architecture. The patch itself adds a "libs" field to the syntax recognized in /etc/asound.conf: ab8ef63. The "libs" field is used by pulseaudio (link), jack (link), and pipewire (link) to declare locations for both native and 32bit plugins.
Re-adding the patch fixes what's currently broken.
Note: It's debatable whether the 32bit use-case warrants patching alsa-lib. I don't have an opinion on the matter, but if it's to be removed, the removal should start by deprecating the relevant options and informing users of an alternative solution, if one exists. I'll leave that to someone more knowledgeable on the subject. (I can see how to remove the option, but I don't know what alternative to suggest in a deprecation warning.) My first priority is to fix what's currently broken.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes