• Why are module parameters under /etc/modprobe.d not respected?

    From ael@21:1/5 to All on Tue Sep 3 18:00:01 2024
    Hello,

    I am running debian testing, updated daily.

    After yesterday's update, the kernel module snd_hda_intel is being
    loaded with the wrong (default) parameters.

    I have /etc/modprobe.d/snd-hda.conf
    which specifies:
    options snd_hda_intel id=[HDMI,PCH] index=1,0

    The details are very unlikely to be important, but if you are
    interested, the snd_hda_intel module defaults to emitting sound on the
    HDMI port instead of the PCH port connected to the speakers and
    headphone.

    I very much doubt that this has anything to do with this particular
    module: rather it would seem to be some change in the way the kernel
    loads modules with the proper parameters. Very likely some vile systemd
    thing deciding that it knows best :-) I have tried to search some of the systemd pages to find some hint, but as usual I can find nothing and
    lose the will to live while looking :-)

    Importantly, modprobe is not broken and I can fix the problem manually
    with simply:

    # modprobe -r snd_hda_intel
    # modprobe snd_hda_intel

    Maybe there are some release notes that I have failed to read? Can
    anyone point me in the right direction? (If the direction is Devuan,
    I have already moved on other boxes...)

    Thanks in anticipation,

    ael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Sep 3 20:40:01 2024
    ael (12024-09-03):
    options snd_hda_intel id=[HDMI,PCH] index=1,0

    Might be you need to write with dashes, as the module files is named
    with dashes.

    Might be brackets are not the correct syntax for an array option.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ael@21:1/5 to Nicolas George on Tue Sep 3 22:00:01 2024
    On Tue, Sep 03, 2024 at 08:33:54PM +0200, Nicolas George wrote:
    ael (12024-09-03):
    options snd_hda_intel id=[HDMI,PCH] index=1,0

    Might be you need to write with dashes, as the module files is named
    with dashes.

    Thank you for the reply. However, dashes and underscores can be
    interchanged in these files.

    From man modprobe.d: "Note that module and alias names (like other
    module names) can have - or _ in them: both are interchangeable
    throughout all the module commands as underscore conversion happens automatically.

    And lsmod shows the names with underscores as does /proc/modules.
    So I assume the underscore is actually the "real" name/alias.

    Might be brackets are not the correct syntax for an array option.

    Well, yes the documentation on these module parameters is not very
    clear. However that options line has been working for many years and is
    still working with modprobe and this same kernel. So I think the syntax
    is OK. It is just some module loading going on perhaps around boot
    which has just started to ignore the options.

    A long time ago, I had a pretty good idea about how the modules got
    loaded at boot during device discovery. I suppose that I may need to
    refresh my memory.

    Since posting I did find /usr/lib/modprobe.d/ and tried putting the snd_hda_intel.conf in there, but it made no difference.

    Again, thanks for the suggestions.

    ael

    --
    Nicolas George


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ael@21:1/5 to ael on Tue Sep 3 23:10:02 2024
    On Tue, Sep 03, 2024 at 04:51:02PM +0100, ael wrote:
    Hello,

    I am running debian testing, updated daily.

    After yesterday's update, the kernel module snd_hda_intel is being
    loaded with the wrong (default) parameters.

    I have /etc/modprobe.d/snd-hda.conf
    which specifies:
    options snd_hda_intel id=[HDMI,PCH] index=1,0

    --[snip]--

    Importantly, modprobe is not broken and I can fix the problem manually
    with simply:

    # modprobe -r snd_hda_intel
    # modprobe snd_hda_intel

    I will just add that I have checked dmsg and found nothing helpful.
    And just checked the kernel documention in
    linux-stable/Documentation/DocBook/admin-guide/kernel-parameters.rst

    which states:
    -------------------------------
    Module parameters can be specified in two ways: via the kernel command
    line with a module name prefix, or via modprobe, e.g.::

    (kernel command line) usbcore.blinkenlights=1
    (modprobe command line) modprobe usbcore blinkenlights=1
    [snip]
    modprobe looks through the
    kernel command line (/proc/cmdline) and collects module parameters
    when it loads a module, so the kernel command line can be used for
    loadable modules too.
    ------------------------------------

    So modprobe is identified as the responsible component.

    That documention may be out of date, of course.
    I did try to look through git log for anything relevant, but didn't
    find anything. Anyway, as I say, modprobe works just fine, but just not
    during kernel boot for some odd reason.

    Please help... I am wondering whether to bug report this against
    modprobe. I did make a report against the kernel for want of anywhere
    better, but kernel bug reports as so numerous, that I doubt that they
    get read.

    I didn't actually say which kernel. Here it is
    6.10.6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.6-1 (2024-08-19) x86_64 GNU/Linux

    However, I think this problem only showed up after some other packages upgrades. I did see
    2024-08-26 15:31:22 upgrade kmod:amd64 32+20240611-1 33+20240816-2
    2024-08-26 15:31:22 upgrade libkmod2:amd64 32+20240611-1 33+20240816-2
    in /var/log/dpkg.1

    But I think that sound was working thoughout August..

    ael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Mon Sep 9 15:40:02 2024
    options snd_hda_intel id=[HDMI,PCH] index=1,0
    Might be you need to write with dashes, as the module files is named
    with dashes.
    Thank you for the reply. However, dashes and underscores can be
    interchanged in these files.

    FWIW: That's been my experience for the `modprobe` command argument, but
    *not* for the `modprobe.d` config files.


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)