Package Details: pulseaudio-ctl 1.70-1

Git Clone URL: (read-only, click to copy)
Package Base: pulseaudio-ctl
Description: Control pulseaudio volume from the shell or mapped to keyboard shortcuts.
Upstream URL:
Licenses: MIT
Conflicts: pulseaudio_ctl
Replaces: pulseaudio_ctl
Submitter: graysky
Maintainer: graysky
Last Packager: graysky
Votes: 196
Popularity: 0.103837
First Submitted: 2013-10-11 23:09 (UTC)
Last Updated: 2022-05-05 18:46 (UTC)

Latest Comments

kode54 commented on 2021-12-31 03:02 (UTC)

@Pound_Hash: This tool doesn't work with PipeWire, only PulseAudio.

Pound_Hash commented on 2021-12-31 02:27 (UTC)

It fails to run with the error:

I require pacmd but it's not installed. Aborting.

th0rne commented on 2020-10-06 09:22 (UTC)

Quick and dirty fix for people using pulse 13:

sed -i 's/# stop if the above failed.*/PCV=2/' /bin/pulseaudio-ctl

nipsky commented on 2020-10-06 08:11 (UTC)

Hmm, maybe quick and dirty via

LANG=en_EN pactl --version | grep Linked | sed -e 's/^Linked with libpulse //' -e 's/([0-9.]+).([0-9.]+)$/\1/'
in this case? ;)

kode54 commented on 2020-10-06 08:09 (UTC)

Meh, I should have figured there would be problems like that. At least the "libpulse" part can be part of the filter. Not sure what else would work. This thing is being installed on systems that are likely to have bleeding edge, but is still carrying the baggage of backwards compatibility going back nearly a decade.

nipsky commented on 2020-10-06 08:06 (UTC)

This runs into trouble when you’re using a non-english system, for example, in German pactl --version returns this, making the grep fail:

pactl 13.99.2-7-g610179
Kompiliert mit libpulse 13.99.0
Gelinkt mit libpulse 13.99.0

graysky commented on 2020-08-20 10:41 (UTC)

@kode54 - Ah, I am not using [testing]. I will see.

kode54 commented on 2020-08-18 00:26 (UTC)

@graysky - Without the advised changes, the script dies with this error here:

$ pulseaudio-ctl mute
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
Cannot determine which version of pactl is installed. Aborting.

Because the PAVERSION it determines from my install of pulseaudio looks like this:

$ pactl --version | grep pactl | sed -e 's/^pactl //' -e 's/\([0-9.]\+\).\([0-9.]\+\)$/\1/'

Ah, of course, it would be helpful to note that I have the testing repos enabled, therefore I'm a frequent early victim of update decisions.

graysky commented on 2020-08-17 09:56 (UTC)

@kode54 - Why though?

kode54 commented on 2020-08-16 22:41 (UTC)

@graysky - And I wasn't aware of any Arch Linux users using pulseaudio older than 13. Perhaps this can be a patch against the AUR version, then.

graysky commented on 2020-08-16 10:04 (UTC)

@kode54 - But grepping for 'Linked' should fail to return values for users of older versions, no? The only function PAVERSION serves is to set an internal expectation for further commands...

kode54 commented on 2020-08-16 00:02 (UTC)

It should be changed now to:

PAVERSION=$(pactl --version | grep Linked | sed -e 's/^Linked with libpulse //' -e 's/\([0-9.]\+\).\([0-9.]\+\)$/\1/')

joshskidmore commented on 2019-09-12 19:40 (UTC)

@graysky - Works perfectly! Thanks for the quick fix.

graysky commented on 2019-09-12 19:29 (UTC)

@josh @Swipte - thanks for reporting and for the proposed fix. Fixed in 1.67. Please try can report back. In the future, open an issue on the github page rather then in the AUR.

ElVino commented on 2019-09-12 18:43 (UTC)

@joshskidmore the repo is located here:

joshskidmore commented on 2019-09-12 17:03 (UTC) (edited on 2019-09-12 17:04 (UTC) by joshskidmore)

pulseaudio-ctl is a bash script. The author is using a pretty rough regexp and bc to check pactl versions. The latest version of pulseaudio is 12.99.3 and bc cannot properly interpret the .3. You can fix this (temporarily) by replacing line 39 in /usr/bin/pulseaudio-ctl with:

PAVERSION=$(pactl --version | grep pactl | sed -e 's/^pactl //' -e 's/\([0-9.]\+\).\([0-9.]\+\)$/\1/')

I would submit a pull request to the author's repo, but it appears abandoned?

Swipe commented on 2019-09-12 13:00 (UTC)

I'm getting this error today after an upgrade to pulseaudio: upgraded pulseaudio (12.2-2 -> 12.99.3-1)

$ /usr/bin/pulseaudio-ctl up (standard_in) 1: syntax error (standard_in) 1: syntax error (standard_in) 1: syntax error Cannot determine which version of pactl is installed. Aborting.

Downgrading pulseaudio and libpulse fixes this.

atopia commented on 2017-09-20 08:01 (UTC) (edited on 2017-09-20 08:02 (UTC) by atopia)

1.66-1 fixes the problem for me. Thanks!

graysky commented on 2017-09-19 19:29 (UTC)

Please try 1.66-1

atopia commented on 2017-09-19 14:38 (UTC)

Problem persists with 1.65.1: $ pacman -Q pulseaudio pulseaudio 11.0+6+g01f489c3-1 $ pacman -Q pulseaudio-ctl pulseaudio-ctl 1.65-1 $ pulseaudio-ctl up Invalid volume specification $ pulseaudio-ctl full-status 90 yes yes

muchweb commented on 2017-09-19 10:59 (UTC)

@graysky, `1.65-1` fixed problem

commented on 2017-09-19 04:07 (UTC)

The issue seems to be with a new version of pulseaudio package, pactl has the following version string: $ pactl --version pactl 11.0-6-g01f48 [...] Which makes it fall into the wrong case during the version comparison (should be PCV=2, but actually ends up PCV=1): PAVERSION=$(pactl --version | grep pactl | sed 's/^pactl //') if [[ ${PAVERSION%%.*} -lt 5 ]]; then # really old versions PCV=0 elif [[ 1 -eq "$(echo "${PAVERSION} > 10.9" | bc)" ]]; then # since v11, they reverted the -- requirement PCV=2 elif [[ 1 -eq "$(echo "${PAVERSION} > 5.1" | bc)" ]]; then # version is upstream 5.99.2 or higher PCV=2 elif [[ 1 -eq "$(echo "${PAVERSION} < 5.1" | bc)" ]]; then # version is upstream 5.0 PCV=1 fi So then it uses the old "set -- perc" syntax.

Cake commented on 2017-09-19 01:58 (UTC)

I have the same issue (Invalid volume specification). $ pulseaudio-ctl full-status 14 no no $ pulseaudio-ctl up Invalid volume specification $ pulseaudio-ctl up 3 Invalid volume specification $ pulseaudio-ctl --version pulseaudio-ctl v1.65 ... Pulse version : 11.0-6-g01f48

skunktrader commented on 2017-09-19 00:42 (UTC)

Same issue (Invalid volume specification) with 1.65-1 here

graysky commented on 2017-09-18 20:05 (UTC)

@muchweb and Haron - please try 1.65-1.

muchweb commented on 2017-09-18 14:22 (UTC)

Stopped working after update $ pulseaudio-ctl down Invalid volume specification $ pulseaudio-ctl up Invalid volume specification Mute works though

Haron_Prime commented on 2017-09-18 13:33 (UTC)

Don't work after update pulseaudio and libpulse pulseaudio-ctl down Invalid volume value. pulseaudio-ctl up Invalid volume value. pulseaudio 11.0+6+g01f489c3-1 libpulse 11.0+6+g01f489c3-1 pulseaudio-ctl 1.64-1

graysky commented on 2015-08-05 18:52 (UTC)

Maybe add provides=pulseaudio=x.x to that PKGBUILD?

moscar commented on 2015-07-31 13:36 (UTC)

Would it be possible to remove the >=4.0 part of the dependencies? I doubt it is that relevant anymore and it will allow pulseaudio-ctl to be installed along with a patched pulseaudio (e.g. pulseaudio-raop2), without modifying the PKGBUILD manually :)

sirmacik commented on 2014-12-29 23:13 (UTC)

Flagged as out of date. sums don't mach.

lembang commented on 2014-12-28 00:55 (UTC)

same issue after the latest update

gilmoreja commented on 2014-12-27 23:37 (UTC)

After this update the program won't turn volume down. If you try to use pulseaudio-ctl down, the volume doesn't change and the terminal output says "pactl: invalid option -- '5'"

graysky commented on 2014-12-27 12:20 (UTC)

Bump to v1.55-1 Changelog: Fix issue some systems experience with vol operations. Commit:

graysky commented on 2014-12-21 15:50 (UTC)

Bump to v1.54-1 Changelog: Logic predict user intent from entered values in config. Commit:

graysky commented on 2014-12-18 14:58 (UTC)

Bump to v1.53-1 Changelog: Support for pulseaudio-equalizer (Kostafun). Commit:

gilmoreja commented on 2014-12-14 17:58 (UTC)

Yes, the new version solved the issue. Thanks!

graysky commented on 2014-12-14 17:58 (UTC)

Bump to v1.52-1 Changelog: Fix libnotify always on bug. Commit:

graysky commented on 2014-12-14 17:55 (UTC)

Ack... my bad. Please try 1.52-1 which I will upload in a few min.

graysky commented on 2014-12-14 17:55 (UTC)

Ack... my bad. Please try 1.52-1 which I will upload in a few min.

gilmoreja commented on 2014-12-14 17:02 (UTC)

It continues to happen even when the variable is commented out.

graysky commented on 2014-12-14 16:57 (UTC)

@gil - This is expected. Please comment out the variable to avoid pushing notifications to libnotify.

gilmoreja commented on 2014-12-14 16:55 (UTC)

With the latest update, this always causes a libnotify popup even when NOTIFY=no is set in config file.

graysky commented on 2014-12-12 18:43 (UTC)

Bump to v1.51-1 Changelog: Add config option to select barchart or text style notifications. Commit:

graysky commented on 2014-12-08 21:43 (UTC)

Bump to v1.50-1 Changelog: Running with no switches prints status to libnotify by default. Commit:

graysky commented on 2014-12-07 21:09 (UTC)

Bump to v1.49-1 Changelog: Output current stats to libnotify via the 'status' switch. Commit:

graysky commented on 2014-12-07 20:36 (UTC)

Bump to v1.48-1 Changelog: 2nd token to select an mount of up or down vol (umby213). Commit:

graysky commented on 2014-12-03 20:43 (UTC)

Bump to v1.47-1 Changelog: Vol up and down is now graphical (ntrp). Commit:

graysky commented on 2014-11-28 15:16 (UTC)

Bump to v1.46-1 Changelog: Addition of icons to libnotify messages. Commit:

graysky commented on 2014-11-02 20:31 (UTC)

Bump to v1.45-1 Changelog: Support for libnotify notifications and a formal manpage. Commit:

graysky commented on 2014-08-23 14:37 (UTC)

Fine for me...??? % makepkg -s ==> Making package: pulseaudio-ctl 1.42-1 (Sat Aug 23 10:37:25 EDT 2014) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Downloading pulseaudio-ctl-1.42.tar.xz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3112 100 3112 0 0 6540 0 --:--:-- --:--:-- --:--:-- 6537 ==> Validating source files with sha256sums... pulseaudio-ctl-1.42.tar.xz ... Passed ==> Extracting sources... -> Extracting pulseaudio-ctl-1.42.tar.xz with bsdtar ==> Starting build()... Setting version ==> Entering fakeroot environment... ==> Starting package()... Installing main script, initd and config... install -Dm755 common/pulseaudio-ctl "/scratch/pulseaudio-ctl/pkg/pulseaudio-ctl/usr/bin/pulseaudio-ctl" install -Dm644 common/pulseaudio-ctl.conf.skel "/scratch/pulseaudio-ctl/pkg/pulseaudio-ctl/usr/share/pulseaudio-ctl/config.skel" ==> Tidying install... -> Purging unwanted files... -> Removing libtool files... -> Removing static library files... -> Compressing man and info pages... -> Stripping unneeded symbols from binaries and libraries... ==> Creating package "pulseaudio-ctl"... -> Generating .PKGINFO file... -> Adding install file... -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: pulseaudio-ctl 1.42-1 (Sat Aug 23 10:37:25 EDT 2014)

nsmathew commented on 2014-08-23 13:51 (UTC)

curl: (52) Empty reply from server This is the error...

nsmathew commented on 2014-08-23 13:49 (UTC)

makepkg is not able to download the sources. Can you check? Thanks

Theredbaron1834 commented on 2014-08-17 21:20 (UTC)

Is there any way to add notifications to this? Not needed, but it would be nice. I tried looking through the script for when to add the command, but it is much to complicated for me to figger out the best place to do it.

stativ commented on 2013-10-12 14:44 (UTC)

pulseaudio_ctl merged into pulseaudio-ctl as requested by the maintainer.

WOFall commented on 2013-10-12 14:30 (UTC)

As an aside (for sake of "showing off"), after sleeping on it my solution was something like: pacmd list-sinks | awk 'BEGIN {RS="%"} NR==1 {print $NF}'

graysky commented on 2013-10-12 14:08 (UTC)

Cool thanks. I also verified running with [testing] enabled.

WOFall commented on 2013-10-12 13:32 (UTC)

No problems with this one! Thanks.

graysky commented on 2013-10-12 09:11 (UTC)

@WOFall - OK. I think I got it. Please try version 1.30-1 of pulseaudio-ctl and note that if you run it from the shell with no args, it should read out current vol level and mute status. % pulseaudio-ctl /usr/bin/pulseaudio-ctl {up,down,mute} Where up and down adjust volume in ±5 % increments. Where mute toggles the mute status on/off. Volume level : 95 % Is sink muted : no

WOFall commented on 2013-10-12 00:05 (UTC)

Indeed it's field 5, to be precise. It's fiddly stuff ;)

WOFall commented on 2013-10-11 23:59 (UTC)

On testing, the volume% is field 4, and when you select field 3 you get an absolute value from 0-65535 instead. So it doesn't work yet.

graysky commented on 2013-10-11 23:16 (UTC)

@WOFall - Thank you. I have merged the three scripts into a single one that also incorporates your backwards-compatible fix in a new package ( Would you mind verifying compatibility with the new PA as you have done for me here? I have also requested a merge of pulseaudio_ctl --> pulseaudio-ctl to keep the AUR clean. Thanks again for your kind attention and troubleshooting.

WOFall commented on 2013-10-11 22:58 (UTC)

I guess the muted status is on an earlier line in the pacmd output now. If you just want a quick backwards-compatible fix, you can add the following line to the end of mute_toggle: [[ "$mute" == "request:" ]] && pactl set-sink-mute "$sink" toggle > /dev/null 2>&1

graysky commented on 2013-10-11 22:39 (UTC)

Yeah, I just caught the 100 %/0 % cap. Fixing now. What's wrong with mute? Works for me...?

WOFall commented on 2013-10-11 22:33 (UTC)

vol_up and vol_down are working fine now. It doesn't cap at 100%, but I guess this is pulseaudio's choice. mute_toggle will also need fixing - I've never actually used it before, so sorry I didn't notice it was broken too.

graysky commented on 2013-10-11 22:12 (UTC)

@WOFall - I adjusted per your notes in v1.20-1 I just released. These work for me under pulseaudio 4.0-2 [currently stable]. Would you mind trying since you have 4.0-3 installed on your box?

WOFall commented on 2013-10-11 21:06 (UTC)

Some more news: I don't think it was possible before, but with testing/pulseaudio I can do: pactl set-sink-volume 0 -- +5% pactl set-sink-volume 0 -- -5% pactl set-sink-mute 0 toggle Unless I'm missing something, I think these scripts are now superfluous to my needs. Of course it might be nice to keep the package (fixed) for existing users.

graysky commented on 2013-10-10 19:44 (UTC)

Thanks for the output.

WOFall commented on 2013-10-10 19:41 (UTC)

Hey. I didn't really investigate it (at all) before I wrote that comment, but it seems to be quite a different output, so I would imagine this isn't a bug. old: new:

graysky commented on 2013-10-10 19:11 (UTC)

Looks like 4.0-3 in [testing] is a git snapshot rather than a proper upstream release.[1] This could mean breakage so I am really reluctant to modify the code. 1.

graysky commented on 2013-10-10 19:00 (UTC)

Thanks for the heads-up. I usually don't enable [testing] but I'll see what can be done.

WOFall commented on 2013-10-10 18:57 (UTC)

There is a comment in the scripts: # pacmd returns volume as %, but demands setting as range: 0-65535 For the pulseaudio in testing (at least), this doesn't seem to be true any more, so any adjustment results in the max volume being set. It might be good to fix this before too many people lose their hearing.

graysky commented on 2013-08-23 21:33 (UTC)

For anything to get into the official repos, a TU must want to add it and to maintain it. That is the beauty of the AUR. Users are able to provided PKGBUILDs for other users. How do you know it's safe? You trust the upstream source (me in this case) or you look at the source code itself, or you trust that the community at large has audited the code.

jumpily commented on 2013-08-23 21:30 (UTC)

@graysky I got it. I was trying to install it from the official repos. Do you plan on ever getting this added to the official arch repos? Also how can I know that this is a safe program to install?

graysky commented on 2013-08-23 18:53 (UTC)

@jumpily - Not sure what to tell you. Build fine for me. Are you using makepkg or a helpscript? % makepkg -src ==> Making package: pulseaudio_ctl 1.11-2 (Fri Aug 23 14:53:06 EDT 2013) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Downloading pulseaudio_ctl-1.11.tar.xz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1012 100 1012 0 0 2272 0 --:--:-- --:--:-- --:--:-- 2274 ==> Validating source files with sha256sums... pulseaudio_ctl-1.11.tar.xz ... Passed ==> Extracting sources... -> Extracting pulseaudio_ctl-1.11.tar.xz with bsdtar ==> Entering fakeroot environment... ==> Starting package()... ==> Tidying install... -> Purging unwanted files... -> Compressing man and info pages... -> Stripping unneeded symbols from binaries and libraries... ==> Creating package "pulseaudio_ctl"... -> Generating .PKGINFO file... -> Adding install file... -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: pulseaudio_ctl 1.11-2 (Fri Aug 23 14:53:07 EDT 2013)

jumpily commented on 2013-08-23 05:57 (UTC)

I can't install this. It says target not found. I have updated repos, and searched for it, but it doesn't show up. What gives?

smekkleysa commented on 2013-01-25 00:12 (UTC)

Thank you for recommending pamixer. Now I can increase the volume and unmute at the same time. Allow-boost option is excellent, too.

graysky commented on 2013-01-21 21:28 (UTC)

You do have an unmute command: /usr/bin/mute_toggle

cdemoulins commented on 2013-01-21 16:26 (UTC)

You should look at pamixer or pamixer-git (almost the same).

smekkleysa commented on 2013-01-21 14:32 (UTC)

Thank you for such a great package. it would be greater if it had unmute command so that i could add to vol up and vol down command and i can unmute when i also press a volume up or a down button.

graysky commented on 2012-06-27 07:54 (UTC)

Thanks. Enjoy.

commented on 2012-06-27 02:54 (UTC)

dude, this package is a freakin lifesaver, how had I not come across this until now! I was having the hardest time getting xfce working with pulse to my satisfaction, xfce4-volumed just didn't work right, pnmixer's hotkeys didn't work right. I had gotten so annoyed I moved back to alsa/dmix. With this everything regarding my volume hotkeys works flawlessly with pulse.

Psilioxus commented on 2011-11-23 10:31 (UTC)

Works well, thanks for this!

cdemoulins commented on 2011-09-13 21:40 (UTC)

I made a small program to control pulseaudio volume like your scripts, you could be interested :

graysky commented on 2011-08-17 17:19 (UTC)

Good suggestions, fixed.

cdemoulins commented on 2011-08-17 16:28 (UTC)

Thanks for the scripts but there is a little problem with the vol_up. It can raise the volume above 100%. You can fix this issue with this : if [ $volume -gt 65536 ] ; then let volume=65536 fi