Default Login Volume

Is there a way to change the default volume to be 100% upon login, and possibly when waking from sleep?

Right now the default behavior is to remember the last volume level set no matter what. I’m using KDE and there is no option for this that I can find in the settings. I took a look at

/etc/pulse/client.conf

But that didn’t appear to have an existing setting for this. I do not have a copy of this configuration file in my home config folder.

Are you using pulse? Or pipewire?
And if pipewire are you using wireplumber?

(I believe pipewire+wireplumber should be default now)

If you do have wireplumber you should be able to set it using a command like

wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%

I also think you can set the default somehow or another …

That looks like it should do just that.

PulseAudio has a configuration option in /etc/pulse/daemon.conf to reset volume to 100%
but it was disabled by default in 2020

PulseAudio 14.0 release notes - flat volumes are now disabled by default

Flat volumes are now disabled by default

Flat volumes have always been a controversial feature in PulseAudio. With flat volumes the stream volumes control also the sink volume. In the simple case of only one stream, the stream and the sink volume are always the same. In case of multiple streams, the sink volume is set to the maximum of the stream volumes. The purpose of this is to simplify the volume control of an application: the full volume range is always available via the application volume slider, so there’s no need to think about the sink volume. In practice, however, this has caused more harm than good (the worst problem is that some applications automatically set their stream volume to 100%, causing the audio to be played at the maximum volume that the hardware can produce), and most large distributions have patched PulseAudio to disable flat volumes by default. Now that patching won’t be needed any more.

Flat volumes can be enabled by setting flat-volumes = yes in ~/.config/pulse/daemon.conf.

To set PulseAudio default sink to 100% immediately

pactl set-sink-volume @DEFAULT_SINK@ 100%

@DEFAULT_SINK@ can be replaced with a specific sink number or name shown in

pactl list sinks short

I also think you can set the default somehow or another

To get the name of the default sink for PulseAudio or pipewire-pulse

pactl get-default-sink 

To change name of default sink

pactl set-default-sink NAME

using sink NAME from pactl list sinks short

It would set the volume. Like now.
As in if you run that command during a session your volume will become 100%.

So … it could be run at every boot or login and achieve the desired outcome…

But I was opining that there is probably a switch in a config file somewhere, I just dont know it.

Nor do I. However, this seems like something that could/should be abstracted to the gui. I’ve seen others with this apparent problem from time to time.

My mistake, I have pipewire and wireplumber installed. For some reason I thought it was pulse.

Seems like my best option at this point would be to use wpctl command in a script to run upon login. Not sure if there is a way to do that upon wake, but that’s another topic.

I was somewhat surprised that it isn’t an option in the GUI, and more surprised that it’s not an obvious configuration file option. But I suppose this is a relatively rare need. I’m trying to leave the volume set for my HTPC and only adjust the receiver volume. It gets confusing for other people when there are too many volumes to control.

Thanks for the replies, the pactl commands are good to know as well.

1 Like

I’ve taken the liberty of marking the post from @cscs as the solution, as it seems like you forgot to make that choice. You can always mark another post as the solution instead, if you wish to change it.

Cheers.

To set sink volumes with pw-cli, see Wiki · PipeWire - Sink/Source Port Volume/Mute/Port-Latency

I use use flat-volumes so audio levels from PulseAudio are similar to JACK
But having this option on by default was annoying for users on non-Arch distributions

PulseAudio - ArchWiki
The default behavior upstream can sometimes be confusing and some applications, unaware of this feature, can set their volume to 100% at startup, potentially blowing your speakers or your ears. This is why Arch defaults to the classic (ALSA) behavior by setting this to no.

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