[SOLVED] How do I load modules needed by lircd

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] How do I load modules needed by lircd

Postby junk_no_spam » Jun 16th, '13, 09:45

How do I load modules needed by lircd?

what would be the commands I would put in /etc/modprobe.d/my_lircd.conf to load modules
/usr/lib/modules/3.8.13-desktop-1.mga3/kernel/drivers/media/rc/lirc_dev.ko.xz
/usr/lib/modules/3.8.13-desktop-1.mga3/kernel/drivers/staging/media/lirc/lirc_serial.ko.xz

insmod (each of above) works.

I had complaints about install when /etc/modprobe.d/my_lircd.conf had
Code: Select all
install lirc_dev
install lirc_serial


I am trying to find a workaround for
lircd could not get file information for /dev/lirc0
https://bugs.mageia.org/show_bug.cgi?id=10304
Last edited by isadora on Jun 29th, '13, 11:21, edited 2 times in total.
Reason: Cosmetical alteration in subject ;)
junk_no_spam
 
Posts: 32
Joined: Jan 26th, '12, 19:30

Re: How do I load modules needed by lircd

Postby doktor5000 » Jun 16th, '13, 10:26

junk_no_spam wrote:I had complaints about install when /etc/modprobe.d/my_lircd.conf had

Which complaints exactly?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I load modules needed by lircd

Postby junk_no_spam » Jun 16th, '13, 11:19

doktor5000 wrote:
junk_no_spam wrote:I had complaints about install when /etc/modprobe.d/lircd.conf had

Which complaints exactly?


systemd-modules-load[369]: libkmod: kmod_config_parse: /etc/modprobe.d/lirc.conf line 1: ignoring bad line starting with 'install'
systemd-modules-load[369]: libkmod: kmod_config_parse: /etc/modprobe.d/lirc.conf line 2: ignoring bad line starting with 'install'
junk_no_spam
 
Posts: 32
Joined: Jan 26th, '12, 19:30

Re: How do I load modules needed by lircd

Postby doktor5000 » Jun 16th, '13, 14:03

Check the man page for modprobe.d:

install modulename command...
This command instructs modprobe to run your command instead of inserting the module in the kernel as normal. The command can be any shell
command: this allows you to do any kind of complex processing you might wish. For example, if the module "fred" works better with the module
"barney" already installed (but it doesn't depend on it, so modprobe won't automatically load it), you could say "install fred
/sbin/modprobe barney; /sbin/modprobe --ignore-install fred", which would do what you wanted. Note the --ignore-install, which stops the
second modprobe from running the same install command again. See also remove below.

The long term future of this command as a solution to the problem of providing additional module dependencies is not assured and it is
intended to replace this command with a warning about its eventual removal or deprecation at some point in a future release. Its use
complicates the automated determination of module dependencies by distribution utilities, such as mkinitrd (because these now need to
somehow interpret what the install commands might be doing. In a perfect world, modules would provide all dependency information without the
use of this command and work is underway to implement soft dependency support within the Linux kernel.

If you use the string "$CMDLINE_OPTS" in the command, it will be replaced by any options specified on the modprobe command line. This can be
useful because users expect "modprobe fred opt=1" to pass the "opt=1" arg to the module, even if there's an install command in the
configuration file. So our above example becomes "install fred /sbin/modprobe barney; /sbin/modprobe --ignore-install fred $CMDLINE_OPTS"

COMPATIBILITY
A future version of kmod will come with a strong warning to avoid use of the install as explained above. This will happen once support for soft
dependencies in the kernel is complete. That support will complement the existing softdep support within this utility by providing such
dependencies directly within the modules.


You should take a look for the softdeps stanza.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I load modules needed by lircd

Postby junk_no_spam » Jun 16th, '13, 14:51

doktor5000 wrote:Check the man page for modprobe.d:


I did.

, you could say "install fred
/sbin/modprobe barney; /sbin/modprobe --ignore-install fred", which would do what you wanted. Note the --ignore-install, which stops the


Yup, I had tried that too.

Code: Select all
install /sbin/modprobe lirc_dev; /sbin/modprobe --ignore-install lirc_dev
install /sbin/modprobe lirc_serial; /sbin/modprobe --ignore-install lirc_serial


The above does not cause any errors, but fails to insert the modules. :(
# lsmod | grep lirc
#
junk_no_spam
 
Posts: 32
Joined: Jan 26th, '12, 19:30

Re: How do I load modules needed by lircd

Postby doktor5000 » Jun 16th, '13, 17:00

The stanzas you put in there don't make much sense, the second modprobe command on each line is useless.

Why no try inserting the module names into /etc/modules-load.d/modules.conf ?
FYI: I've just tested installing lirc, starting lircd service, and modprobe'ing lirc_serial and then lirc_dev,
and afterwards the /dev/lirc0 was present.

Code: Select all
[doktor5000@Mageia3 ~]$ sudo service lircd start
Redirecting to /bin/systemctl start lircd.service
[doktor5000@Mageia3 ~]$ sudo service lircd status
Redirecting to /bin/systemctl status lircd.service                                                                                                                     
lircd.service - LIRC Infrared Signal Decoder                                                                                                                           
          Loaded: loaded (/usr/lib/systemd/system/lircd.service; enabled)                                                                                               
          Active: active (running) since Sun, 2013-06-16 16:53:55 CEST; 5s ago
         Process: 21378 ExecStart=/usr/sbin/lircd --driver=default --device=/dev/lirc0 (code=exited, status=0/SUCCESS)
        Main PID: 21379 (lircd)
          CGroup: name=systemd:/system/lircd.service
                  └ 21379 /usr/sbin/lircd --driver=default --device=/dev/lirc0

Jun 16 16:53:55 Mageia3 systemd[1]: Started LIRC Infrared Signal Decoder.
Jun 16 16:53:55 Mageia3 lircd-0.9.0[21379]: lircd(default) ready, using /var/run/lirc/lircd


Code: Select all
[doktor5000@Mageia3 ~]$ sudo lsmod | grep lir
[doktor5000@Mageia3 ~]$ sudo modprobe lirc_serial
[doktor5000@Mageia3 ~]$ sudo modprobe lirc_dev
[doktor5000@Mageia3 ~]$ sudo lsmod | grep lir
lirc_serial            19151  0
lirc_dev               19980  1 lirc_serial
[doktor5000@Mageia3 ~]$ ls -la /dev/lirc*
crw------- 1 root root 249, 0 Jun 16 16:54 /dev/lirc0
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I load modules needed by lircd SOLUTION

Postby junk_no_spam » Jun 16th, '13, 18:34

doktor5000 wrote:Why not try inserting the module names into /etc/modules-load.d/modules.conf ?


Might get overwritten by an update, so I'll just create my own.
# grep -v \# /etc/modules-load.d/lirc.conf
lirc_dev
lirc_serial

Rebooted and it is all better now.

# lsmod | grep lir
lirc_serial 19151 0
lirc_dev 19980 1 lirc_serial


# ll /dev/lirc*
crw------- 1 root root 251, 0 Jun 16 11:20 /dev/lirc0

Thank you for your time and the other work you do for Mageia.
junk_no_spam
 
Posts: 32
Joined: Jan 26th, '12, 19:30


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 0 guests