Hi, All. Curious if anybody has had the problem of max volume on startup, and if anybody know what to do about it.

I usullay keep my main/system volume at about 15%, turning it up only when an application (e.g., VLC) volume is maxed out.

Without fail, the main/system volume is maxed out each time I restart my computer. I usually remember to turn it down first thing (or keep my speakers off until I do); however, on occasion, I forget and I am inevitbly reminded by some ear-busting notification of one sort or another.

Any ideas on how to make the volume stick between sessions? This has happened since installation, and continues to this day.

Last edited by etisdale on Sat Aug 18, 2012 11:25 pm, edited 1 time in total.

It seems that I have found at least a partial solution. It's a partial solution because I now know the command to run, but I do not know where to put it so that it is executed system-wide. I thought /etc/profile might work, but I couldn't get it to work. Anybody have an idea for how to run this command for each user that logs in?

Should anybody be having the same problem, below is how I figured out the exact command to run on my system. Maybe somebody will come along and provide the rest of the solution.

pacmd is a program for reconfiguring the PulseAudio sound server during runtime.

The general form of the pacmd command: pacmd set-sink-volume (args: index|name, volume)

This is the specific command that I use on my system, using alsa_output.pci-0000_02_09.0.analog-stereo and 10000 for the 'name' and 'volume' arguments, respectively: pacmd set-sink-volume alsa_output.pci-0000_02_09.0.analog-stereo 10000

As for the my command, this is how I figured it out (in a condensed way):

NOTE: I did the following with my speakers turned OFF!

1) pacmd help | grep volume

This gave me the following:set-sink-volume Set the volume of a sink (args: index|name, volume)set-sink-input-volume Set the volume of a sink input (args: index, volume)set-source-volume Set the volume of a source (args: index|name, volume)

2) I did not know which volume to set, so I started to fool around with the graphical volume setting to see what changed.

First, I set the volume to something high, then issued this command: pacmd info | grep volume

Then, I set the volume to something low, then issed the "pacmd info | grep volume" command again. There was definitely a change. In my case the volume went from 86% to 16%.

Without any further volume adjustments, I dumped all the info from the 'pacmd info' command into a text file on my Desktop: pacmd info > ~/Desktop/pacmd.txt

3) To learn what volume to adjust via pacmd (i.e., set-sink-volume; set-sink-input-volume; or set-source-volume), I opened the pacmd.txt file on my Desktop and searched for 16% (my last volume setting).

I the general section where I found the 16% volume, I also found the index and name of my sink:

In Linux Mint Mate 13 there is a "Volume Control" startup application. If you have the same program, I believe that it is overriding what you're doing in /etc/profile.d. Try putting a sleep command in your script. I suspect a low number, 3-5, will probably work.

I put my version of the program in the startup applications so each user can set the volume.

rebelxt wrote:In Linux Mint Mate 13 there is a "Volume Control" startup application. If you have the same program, I believe that it is overriding what you're doing in /etc/profile.d. Try putting a sleep command in your script. I suspect a low number, 3-5, will probably work.

I put my version of the program in the startup applications so each user can set the volume.

Thanks for the suggestion. I will give it a try.

I poked around my menu and found a menu item (Menu > Preferences > Desktop Session Settings) that indicated that the PulseAudio Sound System is automatically started after entering the desktop. Ideally, I would be able to modify the way PulseAudio is automatically started, not after the fact. Trouble is, I have not been able to find a way to do it!

I learned that /etc/xdg/autostart/pulseaudio.desktop is used when entering the desktop environment (LXDE). I opened the file, and, from there, determined that it was start-pulseaudio-x11 that I was looking for.

Specifically, near the end of pulseaudio.desktop was the following line : Exec=start-pulseaudio-x11

I found start-pulseaudio-x11 in /usr/bin/ using the 'which' command. The is also a kde version.

Below is the full file as it appears with my edit. All I did is add the following line: /usr/bin/pactl set-sink-volume 0 10000

As above, '10000' sets the volume to '15' when entering LXDE. And I chose to use '0' instead of 'alsa_output.pci-0000_02_09.0.analog-stereo.' That way, if I change my soundcard, I won't have to edit the start-pulseaudio-x11 file again!

#!/bin/sh

# This file is part of PulseAudio.## PulseAudio is free software; you can redistribute it and/or modify# it under the terms of the GNU Lesser General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## PulseAudio is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License for more details.## You should have received a copy of the GNU Lesser General Public License# along with PulseAudio; if not, write to the Free Software# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307# USA.

Not a good idea if you want your changes to stick through upgrades. That is, on the next pulseaudio upgrade, the file will be overwritten and your changes will be lost.You could simply add your command to the end of /xdg/lxsession/LXDE/autostart for LXDE. This applies to all users using LXDE. If you wanted to the command to run only for your user account, add it to ~/.config/lxsession/LXDE/autostart~ being /home/yourusername