The Audio Persistence Daemon
In Ubuntu Linux, the Advanced Linux Sound Architecture (ALSA) handles low-level audio hardware communication. Because audio hardware resets its volume levels to a default state every time it loses power, ALSA utilizes a background service called alsa-state.service. This daemon’s sole purpose is to remember the exact volume levels and mute states of all your audio channels when you shut down the PC, and then automatically restore those precise settings the next time you boot up.
This is highly desirable on a desktop PC or a laptop where you want your speakers to stay at the volume you left them. However, it is completely useless on a headless server. If you are running an Ubuntu web server, a database cluster, or a cloud instance, there are no speakers connected, and nobody is listening to audio output. Running a background daemon to save and restore imaginary volume states on a server is a waste of CPU cycles and boot time. It should be disabled.
How to Disable the Alsa-State Service
You can permanently stop this audio restoration daemon using systemctl.
Warning: Do not run this on a desktop computer, or your volume levels will reset to maximum (or zero) every time you reboot.
- Open your Ubuntu Terminal or connect via SSH.
- Stop the active service if it is currently running in the background:
sudo systemctl stop alsa-state.service
- Disable the service to prevent it from starting during the next system boot:
sudo systemctl disable alsa-state.service
- To ensure no other audio-related packages attempt to wake it up via dependencies, mask it completely:
sudo systemctl mask alsa-state.service
Your Ubuntu server will immediately stop tracking audio hardware states, streamlining the boot process and removing an unnecessary background task from your headless environment.