[Bug 926688] Re: upstart task alsa-restore has no effect

Jochen Fahrner 926688 at bugs.launchpad.net
Sat Feb 4 15:26:46 UTC 2012


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.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/926688

Title:
  upstart task alsa-restore has no effect

Status in “upstart” package in Ubuntu:
  New

Bug description:
  There is a upstart task 'alsa-restore' which should restore the alsa
  state to the state that was saved with upstart task 'alsa-store'.

  This does not work. It looks like there is some other task that
  initializes alsamixer to its default state AFTER alsa-restore is run.

  There is a help page which recommends running 'alsactl restore' in the users startup applications:
  https://help.ubuntu.com/community/MacBook5-1/Natty

  This should not be necessary if the upstart task 'alsa-restore' was
  working right.

  I suggest find the task that is initializing alsamixer to its default
  state and eliminate this, or delay alsa-restore until the
  initialization was done.

  This happens in latest Natty release, but I think this problem also
  exits in Oneiric because this problem exists as far as I can remember.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/926688/+subscriptions




More information about the foundations-bugs mailing list