You are not logged in.

#1 2019-07-31 08:30:47

amivaleo
Member
From: Italy
Registered: 2019-07-31
Posts: 3

[Solved] Can't autoload a kernel module at startup

Hi!

I have a Dell XPS 9360 whose fan can be monitored only if I load a specific module:

$ sudo modprobe dell-smm-hwmon

And here I get the first issue: the terminal gives me an error if I give that command:

$ sudo modprobe dell-smm-hwmon
modprobe: ERROR: could not insert 'dell_smm_hwmon': No such device

I googled that and I found out that such module can be loaded correctly if I add a parameter:

$ sudo modprobe dell-smm-hwmon ignore_dmi=1

That works fine. Although I don't really know what that parameter does...


I tried to autoload such module at startup, so I added a file in "/etc/modules-load.d/":

$ sudo touch /etc/modules-load.d/dell-smm-hwmon.conf
$ sudo echo "dell-smm-hwmon ignore_dmi=1" > /etc/modules-load.d/dell-smm-hwmon.conf

I rebooted and I noticed that the system fails when loading that module at startup:

$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-07-31 10:07:56 CEST; 10min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 809 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 809 (code=exited, status=1/FAILURE)

lug 31 10:07:56 jimmy-xps-9360 systemd[1]: Starting Load Kernel Modules...
lug 31 10:07:56 jimmy-xps-9360 systemd-modules-load[809]: Failed to find module 'dell-smm-hwmon ignore_dmi=1'
lug 31 10:07:56 jimmy-xps-9360 systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
lug 31 10:07:56 jimmy-xps-9360 systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
lug 31 10:07:56 jimmy-xps-9360 systemd[1]: Failed to start Load Kernel Modules.

Do you have any suggestion on how to make such module load correctly at startup?

Last edited by amivaleo (2019-07-31 11:29:21)

Offline

#2 2019-07-31 08:46:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,414

Re: [Solved] Can't autoload a kernel module at startup

Use modules-load.d only to load the module (no parameters) use /etc/modprobe.d/ to define parameters that should be applied when a module is loaded https://wiki.archlinux.org/index.php/Ke … odprobe.d/

Offline

#3 2019-07-31 09:06:18

amivaleo
Member
From: Italy
Registered: 2019-07-31
Posts: 3

Re: [Solved] Can't autoload a kernel module at startup

Ok, I tried that:

$ cat /etc/modprobe.d/dell-smm-hwmon.conf 
options dell-smm-hwmon ignore_dmi=1

After a reboot, the module is not loaded and it looks like that the system didn't even checked for that:

$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: inactive (dead)
Condition: start condition failed at Wed 2019-07-31 11:00:09 CEST; 1min 0s ago
           ├─ ConditionDirectoryNotEmpty=|/lib/modules-load.d was not met
           ├─ ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d was not met
           ├─ ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d was not met
           ├─ ConditionDirectoryNotEmpty=|/etc/modules-load.d was not met
           ├─ ConditionDirectoryNotEmpty=|/run/modules-load.d was not met
           ├─ ConditionKernelCommandLine=|modules-load was not met
           └─ ConditionKernelCommandLine=|rd.modules-load was not met
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)

lug 31 11:00:09 jimmy-xps-9360 systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
lug 31 11:00:09 jimmy-xps-9360 systemd[1]: Condition check resulted in Load Kernel Modules being skipped.

Offline

#4 2019-07-31 11:22:35

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Can't autoload a kernel module at startup

ConditionDirectoryNotEmpty=|/etc/modules-load.d was not met

So you completely removed /etc/modules-load.d/dell-smm-hwmon.conf ...?

Offline

#5 2019-07-31 11:29:04

amivaleo
Member
From: Italy
Registered: 2019-07-31
Posts: 3

Re: [Solved] Can't autoload a kernel module at startup

Ups!

My apologies, I'm dumb. :3

Fixed that. And now it works! smile Thank you!

Offline

Board footer

Powered by FluxBB