Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently running Ubuntu 9.04. I wanted to swap the stereo channels, but I couldn't find that option in the Volume Control Preferences.

Is there a way to do this without touching any configuration file? (I'm not allowed to log as root in this machine)

share|improve this question
Swap the speakers? – grawity Oct 23 '09 at 16:56
I have to have my speakers swapped. That's why I wanted to reswap the stereo channels :D – Auron Oct 26 '09 at 16:18
up vote 18 down vote accepted

The PulseAudio way (tested on Ubuntu 10.04, should work on 9.04):

Copy /etc/pulse/ to ~/.pulse/, and add the following two lines to the end:

load-module module-remap-sink sink_name=reverse-stereo master=0 channels=2 master_channel_map=front-right,front-left channel_map=front-left,front-right
set-default-sink reverse-stereo

Restart PulseAudio by running pactl exit at the command line.

Leave out the second line if you don't want to use the reversed stereo by default. You can switch between reversed and normal stereo output in the "Output" tab in Sound Preferences. If you do have root and want this system wide, you can just add the lines to /etc/pulse/ instead of making a user-specific configuration.

This configuration makes a few basic assumptions: that the card you're reversing the channels of is card 0; that you only have to deal with 2 channels; and that those channels are called front-left and front-right. If you have a videocard with HDMI out, it is likely the analog out of your motherboard will be card 1, not 0; so master=1.

For more information, see the PulseAudio documentation for module-remap-sink.

share|improve this answer
Initially it seemed to do the trick on 14.04. But after reboot pulseaudio daemon failed to start. had to remove the call to fix it. – uval Jun 26 '14 at 13:54
Works via pacmd too (i.e. no need to copy config & restart pulseaudio). – ulidtko Oct 6 '14 at 9:52
If you have more sinks, so you can use pacmd list-sinks to display a list of existing sinks and their indexes. than replace master=0 with the master=IndexOfTheSinkToSwap – user1182474 Jul 15 at 8:36

If you're using ALSA, Add this to your ~/.asoundrc file:

pcm.swapped {
    type         route
    slave.pcm    "cards.pcm.default"
    ttable.0.1   1
    ttable.1.0   1

pcm.default      pcm.swapped


share|improve this answer
+1 beat me by seconds... note Ubuntu 9.04 installs PulseAudio by default which probably has its own way to do it. – quack quixote Oct 23 '09 at 15:34
@ ~quack doesn't PulseAudio route the sounds to ALSA ? – Sathya Oct 23 '09 at 15:43
yes, just sayin' PA can probably do the swap on its own, on the There's More Than One Way To Do It principle. :) – quack quixote Oct 23 '09 at 15:44
@~quack Ah, Gotcha ;) – Sathya Oct 23 '09 at 15:47

Essentially the same approach as Brian's above, but without touching any configuration file:

pactl load-module module-remap-sink \
    sink_name=reverse-stereo \
    master=0 \
    channels=2 \
    master_channel_map=front-right,front-left \

This will create on the fly an additional PA sink with reversed channels. (It will disappear after pulseaudio restart). To switch to it:

pactl set-default-sink reverse-stereo

— OR, you can also switch manually via the sound control panel:

pulseaudio volume control window

Off course it's possible to switch back and forth, e.g. when experimenting.

This way is better if you want to try something out quickly rather than to save the setup permanently.

share|improve this answer
pactl set-default-sink reverse-stereo failed with No valid command specified. on a Ubuntu 12.04. – Auron Oct 6 '14 at 11:41
@Auron works fine on 14.04. – ulidtko Oct 8 '14 at 0:43
Hmm, I would have to check it. – Auron Oct 16 '14 at 12:10
@Auron, see update; you can also switch manually via the sound panel. – ulidtko Oct 16 '14 at 13:41
Hey, very nice! :) – Auron Oct 16 '14 at 15:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .