Swap Audio Channels permanently

With the help of google i was able to swap the audio channels with some terminal commands.


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

pactl set-default-sink reverse-stereo

After restart these changes disapear. How can i make the change permanent?

Increase your chances of solving your issue:

Use this command to add module-remap-sink as custom user configuration in home folder

cat <<EOT > ~/.config/pulse/default.pa
.include /etc/pulse/default.pa
load-module module-remap-sink sink_name=reverse-stereo master=1 channels=2 master_channel_map=front-right,front-left channel_map=front-left,front-right
set-default-sink reverse-stereo
EOT

Reboot system or restart PulseAudio to load custom configuration

systemctl --user restart pulseaudio

use this command to check if custom configuration is loaded

pacmd dump | grep -E `module-remap|default-sink'

Thanks. Meanwhile i did solve the problem tonight for myself.
I createt a script file named audiochannelswap.sh.

#/bin/sh
pactl load-module module-remap-sink
sink_name=reverse-stereo
master=1
channels=2
master_channel_map=front-right,front-left
channel_map=front-left,front-right
pacmd set-default-sink 2

this file i made executeable and added it as autostart into (session and start?) at my Manjaro (Sitzung und Startverhalten).

As you might notice i had to change pactl set default-sink reverse stereo into pacmd set default-sink 2. The number i got via the command pactl list

Since my solution did work for me, I didn´t test your solution which is probably the better one. Did you test your config file? Does set-default-sink reverse-stereo work there, or do you have to edit that part similar to my solution?

Whats the point you are making here? I did try to solve the problem for nearly 2 hours via google. than i asked in this forum and tried for two more hours until i solved the problem.
I hope the next new user can will find my topic here as a shortcut.

I tested the remap configuration when it was accepted as a solution by another user
Logitech PRO X Wireless channel map reversed - #2 by nikgnomic

I had to change one option (master=0) because my system has only one active hardware sink,
but it works as expected:

pacmd dump | grep -E `module-remap|default-sink'

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-sink-volume reverse-stereo 0x10000
set-sink-mute reverse-stereo no
suspend-sink reverse-stereo no
set-source-volume reverse-stereo.monitor 0x10000
set-source-mute reverse-stereo.monitor no
suspend-source reverse-stereo.monitor no
set-default-sink reverse-stereo

The module passes the Whole Lotta Zeppelin :headphones: test if I put headphones on backwards

The only minor disadvantage of using a shell script compared to custom configuration would be that the script would have to reload the module when PulseAudio is restarted

systemctl --user restart pulseaudio && /usr/bin/sh ~/.local/bin/audiochannelswap.sh

But if PulseAudio is working correctly it should not need to be restarted. So if the shell script is working for you there is not much difference to make it worth trying other solutions
(If it ain’t broke it don’t need to be fixed)

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.