Paolo Pedroni wrote:
> Andrej Borsenkow wrote:
> 
>>Michael Reinsch wrote:
>>
>>>Hi!
>>>
>>>Since DevFs loads the sound modules, /etc/init.d/alsa and probably also
>>>/etc/init.d/sound no longer restore the mixer settings. So after every
>>>reboot: silence (at least with my sound card) until one manually restores
>>>the mixer setting.
>>>
>>>
>>They do, at least sound (I do not use ALSA). Could you be more specific?
>>What card, what driver, what application? I have seen weird things with
>>OSS compatibility mode in ALSA.
>>
>>-andrej
>>
> 
> It happened to me as well. I had to disable module autoloading on lookup
> (in /etc/devfsd.conf, the lines beginning with LOOKUP), otherwise devfsd
> at startup loaded the ALSA modules (probably when it copied the links
> from /lib/dev-state) without restoring mixer settings and
> /etc/rc.d/init.d/alsa didn't do anything because it found that the
> modules were already installed. My solution is probably overkill, but
> it's nice for me because autoloading of modules was loading several
> modules I seldom need (printer, floppy, whatever) and it caused several
> 'device already registered' errors.
> 

Ah! I was just about send a patch. I was not happy with cp 
/lib/dev-state triggering all sorts of weird actions too early. The 
correct solution is to copy /lib/dev-state before starting devfsd.

-andrej

--- rc.sysinit.bor      Sat Sep  1 08:35:00 2001
+++ rc.sysinit   Sun Sep  2 22:40:00 2001
@@ -62,6 +62,11 @@
  # Try to get devfsd
  if [ -c /dev/.devfsd ]; then
    if [ -x /sbin/devfsd ]; then
+    # copy /lib/dev-state before starting devfsd to avoid accidentally
+    # triggering devfsd actions (like module loading)
+    if [ -d /lib/dev-state ]; then
+       cp -af /lib/dev-state/* /dev > /dev/null 2>&1
+    fi
      action "Running DevFs deamon" devfsd /dev
      if [ -f /etc/sysconfig/mouse ];then
        . /etc/sysconfig/mouse
@@ -69,9 +74,6 @@
        if [ -n "$device" ]; then
          ln -s /dev/$device /dev/mouse
        fi
-    fi
-    if [ -d /lib/dev-state ]; then
-       cp -af /lib/dev-state/* /dev > /dev/null 2>&1
      fi
    else
      # devfs is used but devfsd isn't installed


Reply via email to