You are not logged in.

#1 2011-10-07 09:00:40

lolhue
Member
Registered: 2011-10-06
Posts: 21

[SOLVED] Force loading kernel modules on boot

Is there a way to force load kernel modules on boot? Whether through mkinitcpio or rc.conf?

Last edited by lolhue (2011-10-09 03:42:48)

Offline

#2 2011-10-07 09:15:05

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: [SOLVED] Force loading kernel modules on boot

If by force you mean `modprobe -f module`: don't.
If by force you mean manually load a non-autodetected module: Please search before posting and read the wiki (you can use either mkinitcpio or rc.conf).

Last edited by Stebalien (2011-10-07 09:16:01)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#3 2011-10-07 18:33:37

lolhue
Member
Registered: 2011-10-06
Posts: 21

Re: [SOLVED] Force loading kernel modules on boot

Stebalien wrote:

If by force you mean `modprobe -f module`: don't.
If by force you mean manually load a non-autodetected module: Please search before posting and read the wiki (you can use either mkinitcpio or rc.conf).


I mean 'modprobe -f module'. I need the samsung_laptop module for backlight/fan/cpu support, but it refuses to detect my samsung laptop, so I want a way to force load it on boot short of making a script with "modprobe -f samsung-laptop"

Last edited by lolhue (2011-10-07 18:42:34)

Offline

#4 2011-10-07 19:04:43

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: [SOLVED] Force loading kernel modules on boot

Well "-f" just tells modprobe to ignore version checks. So samsung_laptop compiled for the right kernel version as it is in Arch's package should load whether you use the "-f" flag or not. What happens when you add it to the MODULES array in rc.conf? And out of curiosity, what is the cpu support you mention? Frequency scaling?

Last edited by ConnorBehan (2011-10-07 19:06:28)


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#5 2011-10-07 19:04:45

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Force loading kernel modules on boot

The force option doesn't do what you think it does. -f ignores vermagic and modversion attributes and loads the module anyways. It has no bearing on whether or not the hardware exists.

# modprobe padlock-sha
FATAL: Error inserting padlock_sha (/lib/modules/3.0-ARCH/kernel/drivers/crypto/padlock-sha.ko.gz): No such device
# modprobe -f padlock-sha
FATAL: Error inserting padlock_sha (/lib/modules/3.0-ARCH/kernel/drivers/crypto/padlock-sha.ko.gz): No such device

Offline

#6 2011-10-08 03:31:37

lolhue
Member
Registered: 2011-10-06
Posts: 21

Re: [SOLVED] Force loading kernel modules on boot

ConnorBehan wrote:

Well "-f" just tells modprobe to ignore version checks. So samsung_laptop compiled for the right kernel version as it is in Arch's package should load whether you use the "-f" flag or not. What happens when you add it to the MODULES array in rc.conf? And out of curiosity, what is the cpu support you mention? Frequency scaling?

Adding it to rc.conf doesn't load it on boot. (ie typing "rmmod samsung-laptop" after a reboot says it's not loaded)

The module should add support for Samsung's fan speed and cpu frequency scaling support (prioritizing fan noise over cpu frequency and vice versa)

falconindy wrote:

The force option doesn't do what you think it does. -f ignores vermagic and modversion attributes and loads the module anyways. It has no bearing on whether or not the hardware exists.

Ah, sorry, I got "modprobe samsung-laptop force" mixed up with "modprobe -f samsung-laptop". There's an argument for the samsung-laptop module that lets you ignore DMI checks, which allows the module to be loaded despite it complaining the device doesn't exist.

Offline

#7 2011-10-08 22:50:04

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: [SOLVED] Force loading kernel modules on boot

Oh well then you should make sure that one of the files in /etc/modprobe.d contains the line "options samsung-laptop force". Or you can put samsung-laptop.force on your kernel command line.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#8 2011-10-09 03:15:32

lolhue
Member
Registered: 2011-10-06
Posts: 21

Re: [SOLVED] Force loading kernel modules on boot

Just out of curiosity, is there a way to get it to force load in mkinitcpio and not just rc.conf?

Offline

#9 2011-10-09 03:22:23

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Force loading kernel modules on boot

You'd need to include a modprobe.conf file in the mkinitcpio, just the same as you would for rc.conf. Add /etc/modprobe.d/samsung.conf or whatever to the FILES= variable in /etc/mkinitcpio.conf and regenerate the initramfs images.

Offline

#10 2011-10-09 03:42:30

lolhue
Member
Registered: 2011-10-06
Posts: 21

Re: [SOLVED] Force loading kernel modules on boot

Alright thanks. Works fine now.

Offline

Board footer

Powered by FluxBB