If you're wondering

If you're wondering why (as I did), when you test your speakers, one speaker seems to be louder than the other despite the fact that you've got the Balance set to the middle position:

pactl list

Module #23
Name: module-position-event-sounds
Argument:
Usage counter: n/a
Properties:
module.author = "Lennart Poettering"
module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
module.version = "13.99.1"

I have Conky taking up the right-hand side of the screen, and it's set up to force other windows to see Conky as the edge of the screen (so Conky is always visible). Thus, when I brought up the dialog box to test the sound, I'd butted it right up against the edge of Conky, and thus my right speaker seemed louder than my left speaker because this module saw the speaker-testing dialog box as if it were at the extreme right-hand edge of the screen.

That leads to the question... how do we permanently unload this module?


[EDIT]
Ok, what I've got so far:
pactl list modules short
This lists the modules that are loaded.

pactl unload-module module-position-event-sounds
This unloads the offending Pulse Audio module. I'm not sure if the unloading is persistent across reboots. Doing more research...


[EDIT 2]
Ok, so we have to edit /etc/pulse/default.pa:
Change:

### Enable positioned event sounds
load-module module-position-event-sounds

To:

### Enable positioned event sounds
# load-module module-position-event-sounds

And we have to edit /etc/pulse/system.pa:
Change:

### Enable positioned event sounds
load-module module-position-event-sounds

To:

### Enable positioned event sounds
# load-module module-position-event-sounds

That is also the file one would edit if the auto-switching functionality was glitching... for instance, Pulse Audio is known to switch to HDMI when the computer wakes up from sleep if the speakers used are connected via an optical connection... tweaking this file can put the optical connection as the default.

So you'd issue: pacmd list-sinks

Let's say your optical connection to the speakers is listed as alsa_output.optical-1130_OPTICAL_AUDIO-00.-stereo.

So in /etc/pulse/default.pa, at the bottom of the file, you'd change:

 ### Make some devices default
#set-default-sink output
#set-default-source input

To:

### Make some devices default
set-default-sink alsa_output.optical-1130_OPTICAL_AUDIO-00.-stereo
#set-default-source input

You can do the same for inputs. Let's say you've got two microphones... one cheap built-in, and one expensive external you want to use to create a podcast... but Pulse Audio keeps switching to the built-in microphone.

Find the name of the source using pacmd list-sources, then enter it in:
#set-default-source input
... and remove the 'input' part of that line, and uncomment that line.


If you still have issues with audio cutting out, you can try editing /etc/pulse/default.pa.
Change:

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

To:

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

And edit /etc/pulse/system.pa.
Change:

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

To:

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

Then issue:
pactl unload-module module-suspend-on-idle

1 Like

I would have just assumed its because i am old a trifle deaf in one ear :rofl:

2 Likes

Just eat the Trifle and balance will be restored. :rofl:
(Bet you knew that one was coming)

1 Like

I prefer truffles in chocolate...you can keep the trifle.

1 Like

I just figured out that module-position-event-sounds apparently shifts sound left and right by affecting where the mid-point is.

So, for example, I was testing my speakers with the Settings window all the way to the right, up against Conky (which is set up so windows view it as the edge of the screen), so the right-hand side was louder... and it remained that way even after disabling and unloading module-position-event-sounds.

The way to fix that is to go to Zorin menu > Settings > Sound > Output, then move your Balance away from and back to the center to reset where the mid-point is.