Skip to main content
Topic: Pulse audio restores volume to 50% on reboot (Read 1462 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Pulse audio restores volume to 50% on reboot

I'm using XFCE. The problem is simple to describe. The expected behavior of the audio is that upon reboot (or powering off and then on again) it remembers the volume level you assigned, but this doesn't happen. Instead, upon rebooting the system it resets to a value close to 50%. I'm not sure, but I think I'm using Pulse Audio (I have a mixer called PavuControl). I have two audio outputs, a headphone jack as default, and my monitor's built-in speakers, which are connected via DisplayPort, but I never use them. Is there a solution for this? So far, it's only happened to me on Artix.

Re: Pulse audio restores volume to 50% on reboot

Reply #1
Hello,

I have been using alsa only for several years.
I removed all pulse packets except libpulse and libcanberra.

I use alsa and the nice and very practical qastools mixer on different pc:
https://forum.artixlinux.org/index.php/topic,4318.msg27848.html#msg27848

Note: I don't play games and don't use wine or steam.
But I have sound in all my apps.

Re: Pulse audio restores volume to 50% on reboot

Reply #2
Hello,

I have been using alsa only for several years.
I removed all pulse packets except libpulse and libcanberra.

I use alsa and the nice and very practical qastools mixer on different pc:
https://forum.artixlinux.org/index.php/topic,4318.msg27848.html#msg27848

Note: I don't play games and don't use wine or steam.
But I have sound in all my apps.

It doesn't really address his question, but FWIW, it is also what I do.   Layer upon layer of complexity doesn't suit me.  I try to conform to the principles of KISS.

Re: Pulse audio restores volume to 50% on reboot

Reply #3
It doesn't really address his question, but FWIW, it is also what I do.   Layer upon layer of complexity doesn't suit me.  I try to conform to the principles of KISS.
I had exactly the same problem with PulseAudio, and since I've been using Alsa and QasTools, it's been all good.

And I completely agree with the kiss principle; as long as I can handle it.

Re: Pulse audio restores volume to 50% on reboot

Reply #4
It doesn't really address his question, but FWIW, it is also what I do.   Layer upon layer of complexity doesn't suit me.  I try to conform to the principles of KISS.
I had exactly the same problem with PulseAudio, and since I've been using Alsa and QasTools, it's been all good.

And I completely agree with the kiss principle; as long as I can handle it.
Tintin, my regards, you're an eminence to me. It's a pleasure interacting with you.

So, what should I do next? I don't care whether I use Alsa or Pulse Audio. I just want my audio to work and be able to manage it from the panel plugin. When I restart, it saves the volume level I assign. I don't understand much about these sound software programs.

Re: Pulse audio restores volume to 50% on reboot

Reply #5
Tintin, my regards, you're an eminence to me. It's a pleasure interacting with you.
I am very honored and the pleasure is all mine, as I am just a humble Artix Linux user.


Quote
So, what should I do next?
There's no risk in trying, as the operation is reversible.

First, you need to search for all packages containing "pulse":
 
Code: [Select]
pacman -Ss pulse

For me, it looks like this:

Spoiler (click to show/hide)

You may have noticed that I only kept the libcanberra and libpulse packages.
I uninstalled the other packages like pavucontrol, pulseaudio, etc.

Then I installed the qastools:
sudo pacman -Sy qastools

Then, to list the sound cards:
cat /proc/asound/cards

On one of my PCs it looks like this:
Spoiler (click to show/hide)

To set the sound card to use by default:
your_text_editor ~/.asoundrc
or
Code: [Select]
mousepad ~/.asoundrc
or
Code: [Select]
nano ~/.asoundrc

And in my case, I specified this in this file:
Code: [Select]
defaults.pcm.card 1
defaults.ctl.card 1

Finally you have to restart or
restart the alsasound service (command for openrc):
Code: [Select]
sudo rc-service alsasound restart


To test sound after reboot:
Code: [Select]
speaker-test

**
If you're not satisfied with the results and want to revert back:
- Reinstall the packages you removed.
- Uninstall qastools.
- Reboot your system.

Re: Pulse audio restores volume to 50% on reboot

Reply #6
your_text_editor ~/.asoundrc


Good tip

Re: Pulse audio restores volume to 50% on reboot

Reply #7
I was thinking about this on the subway ride to work today and I am not sure what exactly is the problem.  Now, I never turn off my workstation, but if I did, I would want it to boot back up is a SANE state,  which is often not the last state.


I have an alarm clock  on my workstation which looks something like this

 3 30 05 * * * /usr/bin/amixer -c 0 set Master playback 100% >> /dev/null
  4 31 05 * * * /usr/bin/mplayer /home/ruben/docs/Rav\ Shorr\ Shium/*mp3 >> /dev    /null
  5 33 05 * * * /usr/bin/killall mplayer >> /dev/null
  6 33 05 * * * /usr/bin/amixer -c 0 set Master playback 70% >> /dev/null


The point is it set my sound to 70%. 

If you want it to remember the previous setting, and mind you there are about 10 things that can set sound volume, including the hot keys  on the hardware and the keyboard, and all the individual applications that play sound including browsers and media players, video games, etc etc  how would one expect the system to remember the last settings on a reboot?

Re: Pulse audio restores volume to 50% on reboot

Reply #8
If you want it to remember the previous setting, and mind you there are about 10 things that can set sound volume, including the hot keys  on the hardware and the keyboard, and all the individual applications that play sound including browsers and media players, video games, etc etc  how would one expect the system to remember the last settings on a reboot?

Maybe :
Install alsa-utils-<your_init>
sudo alsactl store

This may not be the right answer, but I found these links interesting:
https://www.geeksforgeeks.org/alsactl-command-in-linux-with-examples/
https://forum.artixlinux.org/index.php/topic,8036.15.html