58

I have one speaker next to my computer which I use mostly as a headphone amplifier. On occasion I need to use it as a loudspeaker. Is it possible to quickly change the audio output from stereo to mono, either system-wide or as a plugin for a media player?

2
  • As a side note I can do this on my android phone using the Voodoo Control app which requires a custom kernel that tweaks the headphone amp found in the galaxy phones
    – daithib8
    Sep 17, 2011 at 8:56
  • If you're in Ubuntu 22.10 (which uses PipeWire instead of PulseAudio) you can install EasyEffects for this; check this answer.
    – geekley
    Nov 20, 2022 at 0:07

6 Answers 6

88
  1. Find the name of your audio sink by running

    pacmd list-sinks | grep name:
    
  2. Then run this command (taking care to remove the angled brackets from the result of previous command):

    pacmd load-module module-remap-sink sink_name=mono master=NAME_OF_AUDIO_SINK_GIVEN_BY_PREVIOUS_COMMAND channels=2 channel_map=mono,mono
    

or add

    load-module module-remap-sink sink_name=mono master=NAME_OF_AUDIO_SINK_GIVEN_BY_PREVIOUS_COMMAND channels=2 channel_map=mono,mono

to /etc/pulse/default.pa to have it run at startup.

  1. Then in Sound Preferences choose "Mono" as the output, but remember to reduce volumes by half, since two channels are getting mixed into one, or else you'll have distortion. To test, run:

    speaker-test -c 2 -t sine
    

Same thing in a single command:

pacmd load-module module-remap-sink sink_name=mono master=$(pacmd list-sinks | grep -m 1 -oP 'name:\s<\K.*(?=>)') channels=2 channel_map=mono,mono
  1. To remove the mono channel, just use:

    pacmd unload-module module-remap-sink
    
18
  • 2
    Be sure to reduce the "Applications" volume (also found within the Sound Preferences) as well as the "Output" volume. If you play music from the terminal you can adjust that volume from there.
    – daithib8
    May 21, 2012 at 16:04
  • 8
    Just a comment for anyone who gets a little confused (as I did): when @daithib8 writes "or add the argument to pacmd to /etc/pulse/default.pa", that means doing sudo emacs /etc/pulse/default.pa (or sudo nano or whatever editor you prefer), scrolling down to the end, and then pasting everything from the command except the pacmd part in to a new line at the bottom of the file. Then save and restart :-) May 3, 2013 at 21:40
  • 8
    You're a lifesaver for people with single-sided hearing loss.
    – Omri Barel
    Mar 8, 2014 at 22:04
  • 2
    And I am doing fine by channels=1 channel_map=mono.
    – jarno
    Sep 6, 2015 at 10:56
  • 1
    On Ubuntu 19-04 pacmd is replaced to pactl. Please update.
    – RedEyed
    May 15, 2019 at 12:37
18

I've cast answer 1 into a perl-script, so I don't need to remember these 2 commands:

#!/usr/bin/perl
use strict;

my @choices = ();
my $i = 0;
for (`pacmd list-sinks`) {
    if( /name:.*<(.+)>/) {
        $choices[$i++] = $1;
        print "$i:\t$1\n";
    }
}
my $choice = $choices[<>-1] or die "invalid choice";
exec (qw(pacmd load-module module-remap-sink sink_name=mono),
    "master=$choice",
    qw(channels=2 channel_map=mono,mono));

(I would've annotated that answer, but my karma is to low ;-) )

2
  • How can you hide the output of pacmd command?
    – jarno
    Sep 6, 2015 at 11:04
  • 2
    Oh, you could replace the exec command by exec "pacmd load-module module-remap-sink sink_name=hono master=$choice channels=1 channel_map=mono >/dev/null"; (This hides output, and uses slightly simpler mapping.)
    – jarno
    Sep 6, 2015 at 11:16
4

If you are using jack, then you can do so using patchage(which can be installed with apt-get install patchage ). It has a very intuitive interface.

2
  • 1
    So what do you do after installing patchage? There is no help in the "Help" menu and I can't find a manual or intro on the website.
    – Tsundoku
    Oct 31, 2018 at 11:43
  • @user800 : connect pulse_sink left/right and jack sink left/right to system playback_1 Oct 31, 2019 at 7:20
1

It seems there is no easy way to do this.

You can do it though, by proxying all PulseAudio output to a Jack sink. Too cumbersome to be used casually...

1

As an addendum, after you have created your mono sink with the above answers, you might map this script to a hotkey:

 #!/bin/bash

 if [ "* index: 0" == "$(pacmd list-sinks | grep "*" | sed 's/^ *//')" ];
    then pacmd set-default-sink 1 && notify-send "Mono";
    SINK=1;
 else
    pacmd set-default-sink 0 && notify-send "Stereo";
    SINK=0; 
 fi;
 pacmd list-sink-inputs | grep index | grep -o '[0-9]*' | while read -r line; 
    do pacmd move-sink-input $line $SINK;
 done;

This will toggle between sinks and remap the current stream to the new sink(ma

0

You might be able to use the pulseaudio sound settings manager to change stereo to mono. Or perhaps you can try just panning everything to the left or right speaker.

2
  • Paning won't work. It will not mix both channels together, it will mute one of the speakers and take just the output from one of the channels. Apr 22, 2011 at 9:50
  • Panning is what David is asking for. Panning is the act of mixing two channels together in order to output them to one speaker, usually in order to give the impression that the sound is coming from a particular direction. Hence the name pan(orama)ing. A variant of this, called panning straight up, mixes the channels together but outputs an equal amount of the result to each speaker. Since he is only using one speaker this would also work for him. Pulseaudio volume control only adjusts the balance, where the volume at each speaker is adjusted though no mixing takes place.
    – daithib8
    Apr 22, 2011 at 13:05

You must log in to answer this question.