Open mabod opened 3 years ago
I compared the loaded modules directly after booting with dracut with the modules I get when I reload the dvb_usb_pctv452e
module. Surprisingly reloading the dvb_usb_pctv452e
module loads additional modules:
edev
lnbp22
rc_core
rc_tt_1500
stb0899
stb6100
So I added all dvb related modules with the add_drivers
parameter
add_drivers+="dvb_usb_pctv452e evdev lnbp22 rc_core rc_tt_1500 stb0899 stb6100"
And that works. But shouldnt dracut load all relevant modules automatically?
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.
I believe the issue is that I had self-compiled dvb modules like dvb_usb_pctv452e
in e.g./lib/modules/5.10.4-arch2-1/extra/dvb
dracut does not seem to honour the extra
directory. Instead it takes the modules from /lib/modules/5.10.4-arch2-1/kernel/drivers/media/usb/dvb-usb/
. And they fail.
I have to reload the modules when the system is up and running. This reloading will pick the right modules from the extra
directory.
And that works. But shouldnt dracut load all relevant modules automatically?
Dracut will load the module and it's dependencies, but all of them aren't marked as depends... $ modinfo -F depends dvb_usb_pctv452e dvb-usb,ttpci-eeprom,dvb-core
You might need to report that to the driver kernel maintainer to see if they need to be added to the depends list.
For info, what's the reason behind having dvb modules in dracut in the first step ?
For info, what's the reason behind having dvb modules in dracut in the first step ?
I have customized dvb modules dvb-usb-pctv452e.ko.xz
and dvb-usb.ko.xz
. They are stored in an extra directory outside of the default kernel modules, e.g. /lib/modules/5.4.87-1-lts/extra/dvb
.
Now, when I use default dracut and boot, the two extra modules are loaded but none of the dependencies. Which leaves the TV tuner dysfunctional after boot. I can fix it by unloading and reloading of the two extra dvb modules. The reload will then also pull in all dependencies. I do not know why dracut is not doing that.
I can solve this issue by adding the dependencies to the drivers in dracut:
add_drivers+=" dvb_usb_pctv452e evdev lnbp22 rc_core rc_tt_1500 stb0899 stb6100 "
But in the meantime I have solved it differently. I do not add drivers anymore but simply replace the default dvb modules with my customized versions. That way my custom modules end up in the default directory,
/lib/modules/5.4.87-1-lts//kernel/drivers/media/usb/dvb-usb/dvb-usb-pctv452e.ko.xz
and default dracut is loading the modules including the dependencies.
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.
I believe the issue is that I had self-compiled dvb modules like
dvb_usb_pctv452e
in e.g./lib/modules/5.10.4-arch2-1/extra/dvb
dracut does not seem to honour the
extra
directory. Instead it takes the modules from/lib/modules/5.10.4-arch2-1/kernel/drivers/media/usb/dvb-usb/
. And they fail.I have to reload the modules when the system is up and running. This reloading will pick the right modules from the
extra
directory.
Hmm, dracut relies on depmod
. So if depmod
reports the correct paths for the modules, dracut would pick up the correct modules.
So, basically your distribution should have configured /usr/lib/depmod.d/*.conf
in a way, which gives /lib/modules/*/extra
priority over other paths.
I did another test and dracut is not picking the updated modules.
This is example is for kernel 5.11.0-zen1-1-zen but it hapens with any other kernel too:
1) I compile two modules: dvb-usb.ko and dvb-usb-pctv452e.ko. 2) I put them in /lib/modules/5.11.0-zen1-1-zen/updates/ . This is the place to put new modules which overwrite existing modules. 3) depmod -a 4) modinfo is showing the right path:
modinfo dvb-usb-pctv452e
filename: /lib/modules/5.11.0-zen1-1-zen/updates/dvb-usb-pctv452e.ko
license: GPL
description: Pinnacle PCTV HDTV USB DVB / TT connect S2-3600 Driver
author: Michael H. Schimek <mschimek@gmx.at>
author: Andre Weidemann <Andre.Weidemann@web.de>
author: Dominik Kuhlen <dkuhlen@gmx.net>
srcversion: B8EE340AA3CE4CE67CE8E41
alias: usb:v0B48p300Ad*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0B48p3007d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2304p021Fd*dc*dsc*dp*ic*isc*ip*in*
depends: dvb-usb,ttpci-eeprom,dvb-core
retpoline: Y
name: dvb_usb_pctv452e
vermagic: 5.11.0-zen1-1-zen SMP preempt mod_unload
parm: debug:Turn on/off debugging (default:off). (int)
parm: adapter_nr:DVB adapter numbers (array of short)
5) updating initramfs
dracut --force --kver 5.11.0-zen1-1-zen /boot/initramfs-linux-zen.img
dracut: Executing: /usr/bin/dracut --force --kver 5.11.0-zen1-1-zen /boot/initramfs-linux-zen.img
dracut: zfsexpandknowledge: host device /dev/nvme0n1p2
dracut: zfsexpandknowledge: host device /dev/nvme0n1p1
dracut: zfsexpandknowledge: device /dev/nvme0n1p1 of type vfat
dracut: zfsexpandknowledge: device /dev/nvme0n1p2 of type xfs
dracut: zfsexpandknowledge: host device /dev/nvme0n1p2
dracut: zfsexpandknowledge: host device /dev/nvme0n1p1
dracut: zfsexpandknowledge: device /dev/nvme0n1p1 of type vfat
dracut: zfsexpandknowledge: device /dev/nvme0n1p2 of type xfs
dracut: *** Including module: bash ***
dracut: *** Including module: mksh ***
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: zfs ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: Skipping udev rule: 70-persistent-net.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing AuthenticAMD.bin ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/boot/initramfs-linux-zen.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-linux-zen.img' done ***
6) after boot dvb-usb is not working:
kernel: DVB: Unable to find symbol stb0899_attach()
kernel: dvb-usb: no frontend was attached by 'Technotrend TT Connect S2-3600'
kernel: rc_core: IR keymap rc-tt-1500 not found
7) I have to reload the modules to make it work.
I do not have that issue when creating initramfs with mkinitcpio
Describe the bug I am using a "Technotrend TT Connect S2-3600" DVB box on USB. It is not working when booting with dracut. But it works fine when booting with mkinitcpio.
When booting with dracut I see the following message in the journal:
I have to reload the module after each boot to make it work:
modprobe -r dvb_usb_pctv452e && modprobe dvb_usb_pctv452e
Distribution used EndeavourOS = Arch Linux
Dracut version dracut 050-1
Init system systemd 247-1
Expected behavior I expect that the dvb usb box is working automatically after each boot like it does when I use mkinitcpio