Bug 1046589

Summary: Enable/disable/adjust pulseaudio-equalizer and audio mutes
Product: [Fedora] Fedora Reporter: Robert Tucker <roberttucker>
Component: pulseaudio-equalizerAssignee: Jaromír Cápík <jcapik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: adietish, danofsatx, hicham.haouari, ovasik, panormitis, peter.t.kozich, tho.mei
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pulseaudio-equalizer-2.7-16.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-10 10:03:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Tucker 2013-12-26 08:54:10 UTC
Description of problem: Audio mutes as soon as pulseaudio-equalizer enabled/disabled/adjusted


Version-Release number of selected component (if applicable): 2.7-12.fc20


How reproducible: Always


Steps to Reproduce:
1. Enable/disable/adjust pulseaudio-equalizer, sound mutes
2. Slide volume back up, all OK
3. Enable/disable/adjust pulseaudio-equalizer, sound mutes again

Actual results: Sound mutes with use of pulseaudio-equalizer


Expected results: It should not be necessary for sound to mute when pulseaudio-equalizer used (and did not occur on previous Fedora releases)


Additional info:

Comment 1 pkoz 2014-05-02 20:09:20 UTC
pacmd output format must have changed recently, but the /usr/bin/pulseaudio-equalizer script has not been updated to meet that change.

There is no 'volume: 0:' pattern in the output any longer. I tried this and it works in my configuration: 

PA_CURRENT_VOLUME=$(pacmd list-sinks |
    grep -m 1 'volume: front-left:' |
    gawk '{sub(/%/,"",$5); print $5}')

Perhaps the maintainer can come up with something more general and robust.

Comment 2 Robert Tucker 2014-05-02 20:41:53 UTC
Yes, that works for me too.

I read that this equalizer is not maintained any longer. qpaeq.py (the alternative?) was apparently omitted from pulseaudio-utils in fc20 but is reappearing in fc21.

Comment 3 Fedora Admin XMLRPC Client 2014-07-08 11:23:33 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2014-08-14 11:41:43 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Christopher Beland 2014-11-05 15:59:58 UTC
*** Bug 1098756 has been marked as a duplicate of this bug. ***

Comment 6 Robert Tucker 2014-11-11 09:46:22 UTC
Fedora 21 pulseaudio-equalizer-2.7-13.fc21

Change /usr/bin/pulseaudio-equalizer from:

PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: 0:' | awk '{print $NF}' | sed 's/%//g')

to:

PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left: ' | awk '{print $NF}' | sed 's/%//g')

Comment 7 Robert Tucker 2014-11-11 10:10:58 UTC
Sorry, my post above seems to work for everything but 'enable' when still mutes.

Comment 8 Robert Tucker 2014-11-11 11:13:39 UTC
Don't know what else I've changed but now working (at this moment!) with my penultimate comment for everything including "EQ Enabled" and "Keep Settings". [I tried copying {HOME}./pulse/equalizerrc to {HOME}.equalizerrc (for LADSPA) but deleted it again.]

Comment 9 Panormitis Petrou 2014-11-11 13:23:54 UTC
I can confirm the workaround on comment 7 works, the volume only gets muted once, when the equalizer is enabled.
In any case, at least the equalizer is usable now.

Comment 10 Robert Tucker 2014-11-15 23:32:29 UTC
$ pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left: ' | awk '{print $NF}' | sed 's/%//g'

just returns "dB" when I try it at the command line. I suggest continue to use solution given by pkoz in comment 1 or the all awk alternative:

PA_CURRENT_VOLUME=$(pacmd list | awk '/volume: front-left/' | awk NR==1 |  awk '{sub("%","",$5); print $5}'

Comment 11 Robert Tucker 2014-11-15 23:33:47 UTC
Sorry missed the end bracket:

PA_CURRENT_VOLUME=$(pacmd list | awk '/volume: front-left/' | awk NR==1 |  awk '{sub("%","",$5); print $5}')

Comment 12 Robert Tucker 2014-11-16 12:51:20 UTC
With grep and sed maybe:

PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m 1 'volume: front-left: ' | sed 's![^%]* \([0-9]*\)% .*!\1!')

Comment 13 Robert Tucker 2014-11-19 19:59:50 UTC
Shorter awk method:

PA_CURRENT_VOLUME=$(pacmd list | awk '/volume: front-left:/ {sub("%","",$5);print $5;exit}')

Comment 14 Panormitis Petrou 2014-11-20 01:08:44 UTC
(In reply to Robert Tucker from comment #13)

You are not using $PA_CURRENT_SINK. Isn't your method incorrect if the user has multiple soundcards?

Comment 15 pkoz 2015-04-06 17:13:58 UTC
Having upgraded to Fedora 21, the 'volume: 0:' pattern came back to me.
The 'volume: front-left:' pattern saved the situation again.

Comment 16 Fedora End Of Life 2015-05-29 10:10:20 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 thomas meiner 2015-07-02 23:17:14 UTC
Still not fixed! The problem still exists in F21 and F22. Pleas, could someone fix this issue?

Comment 18 pkoz 2015-07-26 15:48:18 UTC
I tried https://bugzilla.redhat.com/show_bug.cgi?id=1046589#c1 in F22, it still works there.

Comment 19 Jaromír Cápík 2015-07-29 14:40:16 UTC
Hello guys.

Thanks everyone for participating. I believe we should stick to the default sink (to keep it as designed) and therefore the expression requires the 'grep -A20 "<$PA_CURRENT_SINK>"' part. However, the new change shows that the major flaw of the equalizer and that's the inability to work with unbalanced stereo. Anyway, I'm gonna apply the workaround from #c6 as that looks the most correct to me at the moment.

Comment 20 Jaromír Cápík 2015-07-29 14:51:14 UTC
The #c6 expression helps to keep the volume level when adjusting the equalizer, but doesn't prevent it from muting the sound when enabling the EQ. I'm unsure whether this ever worked before. Can anyone confirm that?

Comment 21 Jaromír Cápík 2015-07-29 14:57:57 UTC
The solutions ignoring the default sink simply work better because they take the volume level from a wrong sink (the soundcard instead of the ladspa) and that would really cause troubles with multiple soundcards. I need to discuss all that with the pulseaudio-utils maintainer.

Comment 22 Jaromír Cápík 2015-07-29 15:15:10 UTC
Ok ... after doing few tests I see that the pacmd output has 2 variants. One with 3 values per channel (16bit level / percentage / dB) and one with 2 values only (16bit level / percentage) ... we need to adjust the expression to take just the percentage ... gonna do that.

Comment 23 Jaromír Cápík 2015-07-29 15:19:50 UTC
The right expression seems to be the following:

PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left: ' | cut -f1 -d'%' | awk '{print $NF}')

Comment 24 Fedora Update System 2015-07-29 15:35:39 UTC
pulseaudio-equalizer-2.7-16.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/pulseaudio-equalizer-2.7-16.fc23

Comment 25 Fedora Update System 2015-07-29 15:35:48 UTC
pulseaudio-equalizer-2.7-16.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/pulseaudio-equalizer-2.7-16.fc22

Comment 26 Fedora Update System 2015-07-29 15:35:53 UTC
pulseaudio-equalizer-2.7-16.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/pulseaudio-equalizer-2.7-16.fc21

Comment 27 Fedora Update System 2015-07-30 02:07:17 UTC
Package pulseaudio-equalizer-2.7-16.fc23:
* should fix your issue,
* was pushed to the Fedora 23 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pulseaudio-equalizer-2.7-16.fc23'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12323/pulseaudio-equalizer-2.7-16.fc23
then log in and leave karma (feedback).

Comment 28 Fedora Update System 2015-08-10 10:03:45 UTC
pulseaudio-equalizer-2.7-16.fc23 has been pushed to the Fedora 23 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 29 Fedora Update System 2015-08-12 07:01:31 UTC
pulseaudio-equalizer-2.7-16.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2015-08-12 07:04:00 UTC
pulseaudio-equalizer-2.7-16.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.