Pulseaudio ships an equalizer, qpaeq. This is written in Python using PyQt4. Unfortunately, as it ships, it cannot be run because the package doesn't depend on Python or PyQt4 and thus, even with those installed, it cannot find them on the path.
Since no other equalizer (that I could find) is available, it would be nice if this could be used, if even in a separate package.
Which package provides qpaeq? I tried to reproduce you problem, but could not find that equalizer. (Note: I am not using pulseaudio, just going through the issues here)
@pSub It is in the pulseaudio package. On my system (NixOS unstable channel), it's found in the /nix/store/ghh7xcwjp4qzfdcaky1qf8qxy1zzgiqg-pulseaudio-6.0/bin directory.
I got it working with the help of @pikajude
pactl load-module module-equalizer-sink
pactl load-module module-dbus-protocol
nix-shell -p python27Full python27Packages.pyqt4 python27Packages.dbus --command qpaeq
Would be nice if this could be added to the pulseaudio package
Is this still an issue?
@pSub Yes.
@manveru 's workaround didn't work for me but the following did:
added:
hardware.pulseaudio.extraConfig = ''
load-module module-equalizer-sink
load-module module-dbus-protocol
'';
to configuration.nix, and did a
nixos-rebuild --switch
then I found I still needed to restart pulseaudio with
systemctl --user restart pulseaudio
then I was able to run a slightly modified version of the nix-shell command to get qpaeq to run:
nix-shell -p python27Full python27Packages.pyqt4 python27Packages.dbus-python --command qpaeq
Running into the same issue right now.
Same here. qpaeq needs to be run by
python2.withPackages (ppkgs: with ppkgs; [ pyqt5 sip ]);
to start up. Once it does, I notice that there are no pre-defined presets too, which feels odd.
If this doesn't work for you anymore, you can copy the qpaeq script to your home folder and change dbus.mainloop.pyqt5 to dbus.mainloop.glib, and dbus.mainloop.pyqt5.DBusQtMainLoop(set_as_default=True) to dbus.mainloop.glib.DBusGMainLoop(set_as_default=True). As long as you have the dbus module loaded, this seems to work fine.
So far I've got it working with this:
#!/bin/bash
cp $(which qpaeq) qp
sed 's|dbus.mainloop.pyqt5|dbus.mainloop.glib|g' -i qp
sed 's|DBusQtMainLoop|DBusGMainLoop|g' -i qp
nix-shell -p python38Full python38Packages.pyqt5 python38Packages.dbus-python python38Packages.sip --command ./qp
This crashes with the error
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Likely needs to be built as qt package
Since this would by default add qt5 as a dependency, I guess it would make sense to move qpaeq to it's own derivation and remove the binary from the default pulseaudio derivation?
Update: After copying the export commands from the twinkle binary and running them in shell it does launch without error (The export commands are from the qt5 wrapper)
Ok, this is my shitty unfinished derivation that should work if someone wants to finish it
# qt5.callPackage
{ makeDerivation, python3 }:
makeDerivation {
name = "qpaeq";
buildInputs = [
python3.withPackages (ppkgs: with ppkgs; [ pyqt5 sip dbus-python ]);
# also include qt5 stuff?
];
src = # pulseaudio
buildPhase = "true";
installPhase = ''
install -D bin/qpaeq $out/bin/qpaeq
'';
}
I've created a pr to fix the binary: https://github.com/NixOS/nixpkgs/pull/76321
It adds qpaeq as a separate package, since it depends on qt5 and I don't know if making qt5 a dependency of pulseaudio might be just a bit too much (also would require calling pulseaudio's package file using qt5.callPackage which might have unintended consequences)
Can we close the issue?
Yes