Comment 1 for bug 926688

Revision history for this message
Jochen Fahrner (jofa) wrote :

I did some more testing on this topic. My Macbook has a optical audio out which is on by default. I want it to be off, so the led is not always on. I turned S/PDIF off in alsamixer and stored it with 'alsactl store'.

I created a script /usr/local/bin/alsarestore:

#!/bin/sh
sleep 15
/sbin/alsactl restore

I changed /etc/init/alsa-restore.conf to execute my script instead of running alsactl directly.

I watched the led during boot and stopped the time the led was on. On boot the led turned on at some stage, then was on for 8 seconds and then switched off by my script.

This means: 7 seconds after upstart task alsa-restore was invoked, some process initiliazed alsa and turned S/PDIF on. 8 seconds later (the sleep was 15 seconds) my script turned it off again.

So the whole process of alsa-store and alsa-restore does not work as designed. It was designed to store the current state of alsamixer on shutdown, and restore it on bootup.

The workaround to restore the state in users startup applications only works if all users have this workaround in their startup, and if a user logs in after boot. I you boot the system and shut it down immediately without logging in (from the gdm screen), then this process is broken because the default settings are stored through alsa-store. From now on the settings you made are lost.