[SOLVED] Volume at 100% after each reboot
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Location
    Minnesota
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Volume at 100% after each reboot

    I'm running Fedora 20 GNOME, fully updated. The sound for my USB headset, Corsair Vengeance 1500, is at 100% after each reboot. How can I get Fedora to remember my last volume setting, or at the very least start with something that won't blow out my ear drums.

    Thanks

  2. #2
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,394
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)

    Re: Volume at 100% after each reboot

    In theory, if, after setting volume levels to your liking, you do,
    Code:
    # alsactl store
    That will create the file /var/lib/alsa/asound.state with your current settings, and the alsa-state.service should restore the settings from that file upon reboot. In reality, that doesn't always seems to work so well. The alsa-state.service should also write the current sound settings to that file at shutdown.

    I've had much more consistent results by creating a bash script file that sets some selected sound levels using amixer and setting that script as an auto-start item on session login. By example, here's the contents of that script on my laptop:
    Code:
    $ cat /usr/local/bin/set-volume
    #!/bin/bash
    # Set audio volume levels
    
    amixer -c0 -q cset iface=MIXER,name='Master Playback Volume' 125
    amixer -c0 -q cset iface=MIXER,name='Speaker Playback Volume' 127
    amixer -c0 -q cset iface=MIXER,name='Headphone Playback Volume' 127
    amixer -c0 -q cset iface=MIXER,name='PCM Playback Volume' 205
    Amixer is a command line program. See "man amixer". You'll need to play with settings until you find something comfortable for yoiu.

    amixer -c0 contents <== show all settings, including min/max limits
    amixer -c0 controls <== show numid, interface, and name of each control

    Remember that pulseaudio is the top level control for your audio settings though, so I end up using a combination of audio-mixer and pulseaudio when setting volume levels, as changing level in one usually affects the levels in the other, and it's hard to figure out just how that relationship works. Also keep in mind that on today's systems, plugin headphones are often automatically set to have zero volume level when unplugged and are set to 100% volume once plugged in. I've found that it's just prudent to dial the volume control down on my volume panel-app right after plugging in my headphones, just in case, but I also find that usually the pulseaudio volume level for my "headphone" is usually something very low and non-threatening to my eardrums.

  3. #3
    Join Date
    Aug 2008
    Location
    Minnesota
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Volume at 100% after each reboot

    Thanks for the suggestion, PabloTwo. As you suspected may happen, saving the state did not enable the volume to be restored. I was hoping I was missing a checkbox or something.

    I forgot I'm running GNOME 3.12 from one of the Copr repos. If I get back to stock and it's still an issue I'll file a bug with Fedora if there isn't one already.

    Thanks again,

    woelfman10

  4. #4
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,394
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)

    Re: Volume at 100% after each reboot

    By checking the status of the alsa-state.service I see it has a reference to the file /etc/alsa/alsactl.conf, so maybe it's now expecting setting to be in that file (?). Just a guess on my part.
    Code:
    $ sudo systemctl status alsa-state.service
    alsa-state.service - Manage Sound Card State (restore and store)
       Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static)
       Active: active (running) since Thu 2014-06-26 19:58:06 EDT; 1h 33min ago
     Main PID: 589 (alsactl)
       CGroup: /system.slice/alsa-state.service
               └─589 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/i...
    
    Jun 26 19:58:06 Brody alsactl[589]: alsactl 1.0.27.2 daemon started

  5. #5
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,394
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)

    Re: Volume at 100% after each reboot

    You might want to also try this making your regular user own that file and then running then the "alsactl store" command as a regular user instead of root to see if that makes any difference.
    Code:
    # chown user:user /var/lib/alsa/asound.state
    I recall doing that sometime back with some success.

  6. #6
    dobbi Guest

    Re: Volume at 100% after each reboot

    Code:
    /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
    ~/.config/pulse/
    Code:
    FILES
           ~/.config/pulse/daemon.conf, /etc/pulse/daemon.conf: configuration set‐
           tings  for  the  PulseAudio  daemon.  If the version in the user's home
           directory does not exist the global configuration file is  loaded.  See
           pulse-daemon.conf(5) for more information.
    
           ~/.config/pulse/default.pa, /etc/pulse/default.pa: the default configu‐
           ration script to execute when the PulseAudio daemon is started. If  the
           version in the user's home directory does not exist the global configu‐
           ration script is loaded. See default.pa(5) for more information.
    
           ~/.config/pulse/client.conf, /etc/pulse/client.conf: configuration set‐
           tings  for PulseAudio client applications. If the version in the user's
           home directory does not exist the global configuration file is  loaded.
           See pulse-client.conf(5) for more information.
    source: man pulseaudio

    Code:
    Per-application volumes change when the Master volume is adjusted
    
    This is because PulseAudio uses flat volumes by default, instead of relative volumes, relative to an absolute master volume. If this is found to be inconvenient, asinine, or otherwise undesireable, relative volumes can be enabled by disabling flat volumes in the PulseAudio daemon's configuration file:
    
    
    
    Code:
    /etc/pulse/daemon.conf
    
    flat-volumes = no
    and then restarting PulseAudio by executing
    Code:
    $ pulseaudio -k
    $ pulseaudio --start
    source: https://wiki.archlinux.org/index.php...ion_is_started

    After reading that I came with the impression that you need to delete the contents of ~/.config/pulse and create a new ~/.config/pulse/daemon.conf disabling flat-volumes.

    the files in /usr/share/pulseaudio/alsa-mixer/path configure how pulseaudio acts according to the things it finds, I didn't understand the instructions on the "common" config files that are supposed to explain what they do, but then again I just did a quick read.

  7. #7
    Join Date
    Aug 2008
    Location
    Minnesota
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Volume at 100% after each reboot

    Quote Originally Posted by PabloTwo
    You might want to also try this making your regular user own that file and then running then the "alsactl store" command as a regular user instead of root to see if that makes any difference.
    Code:
    # chown user:user /var/lib/alsa/asound.state
    I recall doing that sometime back with some success.
    Thanks, PabloTwo. This seems to have done the trick of making PA remember my last volume setting. Seems weird to me, but I'm happy with the results.

    Thanks for the wiki link, dobbi. Unfortunately none of the entries seem to address my particular issue.

    Cheers,

    Matt

Similar Threads

  1. [SOLVED]
    After Upgrade to F18 Bansee Volume goes to 100%
    By Divit11 in forum Using Fedora
    Replies: 1
    Last Post: 24th January 2013, 12:17 AM
  2. Limit volume to 100%
    By Kingoftherings in forum Using Fedora
    Replies: 2
    Last Post: 8th November 2009, 11:09 PM
  3. Volume group will not mount after reboot
    By Court in forum Using Fedora
    Replies: 0
    Last Post: 30th June 2006, 09:44 PM
  4. 100% volume too loud, distorted
    By mamoulian in forum Using Fedora
    Replies: 0
    Last Post: 18th April 2006, 06:50 PM
  5. Why Sound Volume is Always Mute After Reboot?
    By dealmaker in forum Using Fedora
    Replies: 1
    Last Post: 1st December 2005, 05:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •