Discussion:
Why are module parameters under /etc/modprobe.d not respected?
(too old to reply)
Franco Martelli
2024-09-05 19:00:01 UTC
Permalink
Hi,
Hello,
I am running debian testing, updated daily.
I'm on stable, so I can't help much
After yesterday's update, the kernel module snd_hda_intel is being
loaded with the wrong (default) parameters.
Have you verified this by running the following commands:

~$ cat /sys/module/snd_hda_intel/parameters/id
~$ cat /sys/module/snd_hda_intel/parameters/index
I have /etc/modprobe.d/snd-hda.conf
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.
as workaround try to specify those parameters in the kernel-line in the
boot loader. See:

https://wiki.archlinux.org/title/Kernel_parameters

then verify by running "cat" on the /sys/ filesystem as described above.

Cheers
--
Franco Martelli
Max Nikulin
2024-09-06 03:10:01 UTC
Permalink
I have /etc/modprobe.d/snd-hda.conf
options snd_hda_intel id=[HDMI,PCH] index=1,0
[...]
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...)
Have you read log messages reported by journalctl? There is a systemd
unit to load modules, but I expect that this one should be autoloaded in
response to an udev event.

Recently there was a long thread with rant on sysctl and an old
configuration file. I have not idea if a similar issue may happen with
modules configuration and dropping legacy config files.
ael
2024-09-07 20:50:02 UTC
Permalink
Have you read log messages reported by journalctl? There is a systemd unit
to load modules, but I expect that this one should be autoloaded in response
to an udev event.
Yes, I did try to find anything relevant using journalctl. There were no
hits for snd_hda_intel with journalctl -b .

In ***@bugs.debian.org you will see that that it appears that the
options are included properly in the initrd.image which is where the
initial kernel is set up, I think before invoking PID 1 = systemd .

Somehow those options are not being set properly by snd_hda_intel. Or so
it seems. Very odd since it has only just started happening, very likely
when the a new initrd.image was generated by an unrelated dpkg trigger
was fired. No, I have not (yet) tried to rebuild the initrd.image. I
should try that when I have more time.

I will copy this to the bug report in case it is useful.

ael
ael
2024-09-07 20:40:01 UTC
Permalink
Post by Franco Martelli
I am running debian testing, updated daily.
I'm on stable, so I can't help much
After yesterday's update, the kernel module snd_hda_intel is being
loaded with the wrong (default) parameters.
~$ cat /sys/module/snd_hda_intel/parameters/id
~$ cat /sys/module/snd_hda_intel/parameters/index
Thanks for the suggestion. No I hadn't checked there, and the results
are peculiar: it is looking like an obscure bug in the snd_hda_intel
driver.

The parameter that matters is "index".
Checking
/sys/module/snd_hda_intel/parameters/index
gives 1,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
which is "correct" as if the options have been correctly set.
BUT sound is still connected to the HDMI port (index 0,1) !!

As usual, manually removing and restoring snd_hda_intel fixes the
problem: sound is then connected to PCH (index 1,0):
# modprobe -r snd_hda_intel
# modprobe snd_hda_intel

/sys/module/snd_hda_intel/parameters/index
does not change, but is now reflecting the truth.

This is now a debian bug against modprobe, although it is probably not
modprobe at fault: ***@bugs.debian.org
As noted there, bug=663436 many years ago had something similar going on
with snd_hda_intel.

I will copy this reply to that the current bug because it adds
significant information. I am wondering whether to contact the
maintainer for snd_hda_intel, but I wnatto be sure that I am not
overlooking something silly.
Post by Franco Martelli
I have /etc/modprobe.d/snd-hda.conf
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.
as workaround try to specify those parameters in the kernel-line in the boot
Yes, I know about the kernel command line possibility, but I already have
a workaround. Rather I wnat to nail this bug. But thanks for the
suggestion.

ael
Stefan Monnier
2024-09-09 13:40:02 UTC
Permalink
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

Loading...