Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

How to restore sound session in ALSA [SOLVED]

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
neyuru
Apprentice
Apprentice
Posts: 191
Joined: Sat Mar 21, 2020 6:51 am

How to restore sound session in ALSA [SOLVED]

  • Quote

Post by neyuru » Sat May 09, 2020 4:32 pm

System sound settings are not stored when computer restarts. There are two systemd services that help store the configuration. The problem is that none of the configuration files exist for these services:

Code: Select all

systemctl status alsa-restore
● alsa-restore.service - Save/Restore Sound Card State
     Loaded: loaded (/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
     Active: inactive (dead)
  Condition: start condition failed at Sat 2020-05-09 10:48:57 CDT; 4min 33s ago
             └─ ConditionPathExists=/var/lib/alsa/asound.state was not met

Code: Select all

systemctl status alsa-state
● alsa-state.service - Manage Sound Card State (restore and store)
     Loaded: loaded (/lib/systemd/system/alsa-state.service; static; vendor preset: disabled)
     Active: inactive (dead)
  Condition: start condition failed at Sat 2020-05-09 10:48:57 CDT; 13min ago
             └─ ConditionPathExists=/etc/alsa/state-daemon.conf was not met
and thus none of the services are executed. How can I save sound session configurations?
Last edited by neyuru on Sun May 10, 2020 4:35 am, edited 1 time in total.
Top
neyuru
Apprentice
Apprentice
Posts: 191
Joined: Sat Mar 21, 2020 6:51 am

  • Quote

Post by neyuru » Sun May 10, 2020 4:34 am

The solution, although if not optimal (because the cause of the problem was not found) was to:


1) unmerge alsa-utils:

Code: Select all

emerge -aC alsa-utils
2) emerge alsa utils:

Code: Select all

emerge -a alsa-utils
and now the service is active:

Code: Select all

● alsa-restore.service - Save/Restore Sound Card State
     Loaded: loaded (/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
     Active: active (exited) since Sat 2020-05-09 23:30:26 CDT; 2min 9s ago
    Process: 325 ExecStart=/usr/sbin/alsactl restore (code=exited, status=0/SUCCESS)
   Main PID: 325 (code=exited, status=0/SUCCESS)
        CPU: 2ms
At every shutdown, the service records the sound settings back to /var/lib/alsa/asound.state
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sun May 10, 2020 11:53 am

I wonder if

Code: Select all

systemctl is-enabled alsa-state
would answer your question.
Before you re-emerged it. It's too late to check it now (unless you have a backup), but i'm leaving it here just in case someone in the future stumbles over a similar problem.
Top
neyuru
Apprentice
Apprentice
Posts: 191
Joined: Sat Mar 21, 2020 6:51 am

  • Quote

Post by neyuru » Fri Jun 05, 2020 4:54 am

I figured out the problem. Here are the steps to enable autosaves by alsa from a fresh install (assumes alsa-restore or alsa-state are not running, maybe never been run):

Option 1. Saving settings with a daemon:

1) Make sure state-daemon.conf file exists:

Code: Select all

touch /etc/alsa/state-daemon.conf
2) Manually save your settings (only required for the first time):

Code: Select all

alsactl store
3) Enable and start the daemon:

Code: Select all

systemctl enable alsa-state
systemctl start alsa-state
Option 2. Saving settings when session ends:

1) Make sure state-daemon.conf file does not exists:

Code: Select all

touch /etc/alsa/state-daemon.conf
2) Manually save your settings (only required for the first time):

Code: Select all

alsactl store
3) Enable and start the service:

Code: Select all

systemctl enable alsa-restore
systemctl start alsa-restore
The previous solution worked because before the reinstall I had manually saved the configuration by alsactl store.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic