Re: Bug#753816: [systemd] Broken audio

2014-07-06 Thread Antonio Marcos López Alonso

El 06/07/14 05:34, Ben Hutchings escribió:

On Sat, 2014-07-05 at 18:58 +0200, Michael Biebl wrote:

Am 05.07.2014 18:38, schrieb Antonio Marcos López Alonso:

El 05/07/14 17:06, Michael Biebl escribió:

Am 05.07.2014 17:56, schrieb Antonio Marcos López Alonso:

Just in case, have you noticed I'm using an ALSA-Jack loopback setting
for audio?

Under sysvinit, udev (including udevadm settle) is started before the
kmod init script, which loads snd_aloop.
That means, snd_aloop is loaded after snd_hda_intel.

Under systemd, it looks like the snd_aloop module is loaded about the
same time systemd-udevd is started. There might be a race here and
snd_aloop is loaded before snd_hda_intel.

This *might* be the reason, but I'm no expert on this matter.

Can you try removing snd_aloop from /etc/modules and test if that makes
a difference.


OK removed snd_aloop and audio is back. Then reloaded the module,
restarted JACK and audio is still fine. So as you said there must be
some race condition in there. Should I keep this ticket opened?


Hm, not sure what to do about this. We could order
systemd-load-modules.service after systemd-udevd.service. But that
doesn't guarantee the loading order of the modules and it feels like
papering over the underlying issue.

I'm no sound expert, but I'd say that the loading order should not
matter. Maybe we need some input from the kernel team or some alsa
experts here.

I think this is due to ALSA userland (or maybe higher levels) being
stupid about device selection.  I think the default is to use sound
device 0, which can be whichever driver won the race.


I took the liberty to CC the Debian kernel team and the maintainer of
the snd_aloop module. I hope they can help us here.

For reference the complete bug report is at [1]


Michael


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753816

I think the usual workaround is to add 'index=1' to the snd-aloop line
in /etc/modules.  It is probably possible to do something more
sophisticated in an ALSA configuration file.

Ben.



Adding 'index=1' didn't work. I still have to reload snd_aloop and 
restart JACK to get audio back.


Antonio


--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/53b90b59.6040...@gmail.com



Re: Bug#753816: [systemd] Broken audio

2014-07-06 Thread Michael Biebl
Am 06.07.2014 10:39, schrieb Antonio Marcos López Alonso:
 El 06/07/14 05:34, Ben Hutchings escribió:

 I think the usual workaround is to add 'index=1' to the snd-aloop line
 in /etc/modules.  It is probably possible to do something more
 sophisticated in an ALSA configuration file.
 
 Adding 'index=1' didn't work. I still have to reload snd_aloop and
 restart JACK to get audio back.

Be aware that systemd-modules-load does *not* read module parameters
from /etc/modules. You'll need to set them via a /etc/modprobe.d/ file.


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Re: Bug#753816: [systemd] Broken audio

2014-07-06 Thread Bjørn Mork
Michael Biebl bi...@debian.org writes:

 Be aware that systemd-modules-load does *not* read module parameters
 from /etc/modules. You'll need to set them via a /etc/modprobe.d/ file.

Hmm... Is that considered a bug, or is it just the way things are going
to be?

The modules(5) man page from the kmod package still says

   The /etc/modules file contains the names of kernel modules that
   are to be loaded at boot time, one per line. Arguments can be
   given in the same line as the module name. Lines beginning with a
   '#' are ignored.

and I would expect a few might have used that feature in the past. It
seems unnecessary to break such configurations.


Bjørn


-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87oax2s3oq@nemi.mork.no



Re: Bug#753816: [systemd] Broken audio

2014-07-06 Thread Antonio Marcos López Alonso

El 06/07/14 12:59, Michael Biebl escribió:

Am 06.07.2014 10:39, schrieb Antonio Marcos López Alonso:

El 06/07/14 05:34, Ben Hutchings escribió:

I think the usual workaround is to add 'index=1' to the snd-aloop line
in /etc/modules.  It is probably possible to do something more
sophisticated in an ALSA configuration file.

Adding 'index=1' didn't work. I still have to reload snd_aloop and
restart JACK to get audio back.

Be aware that systemd-modules-load does *not* read module parameters
from /etc/modules. You'll need to set them via a /etc/modprobe.d/ file.


Ah! It sounded somewhat strange but as this module stuff is a sort of 
terra incognita for me... :) Now I created a 
/etc/modprobe.d/snd-aloop.conf file which contains a single line with 
'options snd-aloop index=1' and everything is fine again after boot!


Thanks a lot for your tips!
Antonio


--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/53b9a5b1.10...@gmail.com



Re: Bug#753816: [systemd] Broken audio

2014-07-05 Thread Michael Biebl
Am 05.07.2014 18:38, schrieb Antonio Marcos López Alonso:
 El 05/07/14 17:06, Michael Biebl escribió:
 Am 05.07.2014 17:56, schrieb Antonio Marcos López Alonso:
 Just in case, have you noticed I'm using an ALSA-Jack loopback setting
 for audio?
 Under sysvinit, udev (including udevadm settle) is started before the
 kmod init script, which loads snd_aloop.
 That means, snd_aloop is loaded after snd_hda_intel.

 Under systemd, it looks like the snd_aloop module is loaded about the
 same time systemd-udevd is started. There might be a race here and
 snd_aloop is loaded before snd_hda_intel.

 This *might* be the reason, but I'm no expert on this matter.

 Can you try removing snd_aloop from /etc/modules and test if that makes
 a difference.

 
 OK removed snd_aloop and audio is back. Then reloaded the module,
 restarted JACK and audio is still fine. So as you said there must be
 some race condition in there. Should I keep this ticket opened?
 

Hm, not sure what to do about this. We could order
systemd-load-modules.service after systemd-udevd.service. But that
doesn't guarantee the loading order of the modules and it feels like
papering over the underlying issue.

I'm no sound expert, but I'd say that the loading order should not
matter. Maybe we need some input from the kernel team or some alsa
experts here.

I took the liberty to CC the Debian kernel team and the maintainer of
the snd_aloop module. I hope they can help us here.

For reference the complete bug report is at [1]


Michael


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753816


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Re: Bug#753816: [systemd] Broken audio

2014-07-05 Thread Ben Hutchings
On Sat, 2014-07-05 at 18:58 +0200, Michael Biebl wrote:
 Am 05.07.2014 18:38, schrieb Antonio Marcos López Alonso:
  El 05/07/14 17:06, Michael Biebl escribió:
  Am 05.07.2014 17:56, schrieb Antonio Marcos López Alonso:
  Just in case, have you noticed I'm using an ALSA-Jack loopback setting
  for audio?
  Under sysvinit, udev (including udevadm settle) is started before the
  kmod init script, which loads snd_aloop.
  That means, snd_aloop is loaded after snd_hda_intel.
 
  Under systemd, it looks like the snd_aloop module is loaded about the
  same time systemd-udevd is started. There might be a race here and
  snd_aloop is loaded before snd_hda_intel.
 
  This *might* be the reason, but I'm no expert on this matter.
 
  Can you try removing snd_aloop from /etc/modules and test if that makes
  a difference.
 
  
  OK removed snd_aloop and audio is back. Then reloaded the module,
  restarted JACK and audio is still fine. So as you said there must be
  some race condition in there. Should I keep this ticket opened?
  
 
 Hm, not sure what to do about this. We could order
 systemd-load-modules.service after systemd-udevd.service. But that
 doesn't guarantee the loading order of the modules and it feels like
 papering over the underlying issue.
 
 I'm no sound expert, but I'd say that the loading order should not
 matter. Maybe we need some input from the kernel team or some alsa
 experts here.

I think this is due to ALSA userland (or maybe higher levels) being
stupid about device selection.  I think the default is to use sound
device 0, which can be whichever driver won the race.

 I took the liberty to CC the Debian kernel team and the maintainer of
 the snd_aloop module. I hope they can help us here.
 
 For reference the complete bug report is at [1]
 
 
 Michael
 
 
 [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753816

I think the usual workaround is to add 'index=1' to the snd-aloop line
in /etc/modules.  It is probably possible to do something more
sophisticated in an ALSA configuration file.

Ben.

-- 
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg


signature.asc
Description: This is a digitally signed message part