1

I'm using Ubuntu with Xfce, ALSA, pavucontrol, …

After I reboot the system my sound always goes off.

And my speakers in alsamixer are listed as Headphones (which I have to always increase the volume after boot so it works).

What can I be doing wrong that the sound isn't saved?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

$ uname -r
4.16.12

$ alsactl -version
alsactl version 1.1.3

alsamixer controls the sound OK, Master and Speaker are the same but Headphones also controls the volume.

$ pavucontrol 
Package: pavucontrol
Version: 3.0-4
1

For some reason the pavucontrol does not work well with alsa.

To solve this issue the only way it seems to work is to follow the third answer at https://askubuntu.com/questions/50067/howto-save-alsamixer-settings/606115#606115

some modifications are required following the comments like adding a sleep to the Exec So to have the settings save after reboot you need to create a configuration stored file alsactl --file ~/.config/autostart/asound.state store

and then restore that configuration in a autostart boot script

[Desktop Entry]
Type=Application
Terminal=false
Name=alsarestore
Exec=bash -c "sleep 5 && alsactl --file ~/.config/asound.state restore"

in ~/.config/autostart/alsarestore.desktop

  • Please note there is no fixed order of answers, any user can choose from three options. The answer you link to is third according to votes now, these votes can change in the future. So the term "third answer" is ill-defined and shouldn't be used. – Kamil Maciorowski Aug 31 '18 at 23:48
0

The setup where this solution worked:

  • Ubuntu 18.04 (GNOME), not xfce
  • gnome alsa mixer, not pavucontrol
  • realtek alc1220 on the X470 AORUS GAMING 7 WIFI rev1.0

However, the core problem was the same:

  1. Speakers from the back panel were detected as a headphones line.
  2. After a reboot or relog, the line was muted and had zero level in the gnome alsa mixer.

Solution

Almost 9 years old answer on ubuntu forums helped. Citing it:

I managed to get it to work as expected by replacing the line

load-module module-device-restore

in /etc/pulse/default.pa with

#load-module module-device-restore

Partial solution (just to beware)

Before finding out the solution I tried another approach. I changed the respective block of /usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf to

[Element Speaker]
switch = on
volume = ignore

Unfortunately, it only unchecks the "mute" checkbox, leaving the line level on the zero mark. So, don't use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.