Warnings since dkms-3.0.10 on Arch system
Beginning with version 3.0.10 (and up to the current version 3.0.12) I get different warnings during kernel upgrades from dkms. Following is an example if I re-install the currently active kernel.
warning: could not get file information for usr/lib/modules/6.6.8-arch1-1/kernel/drivers/media/common/videobuf2/videobuf2-common.ko.zst
warning: could not get file information for usr/lib/modules/6.6.8-arch1-1/kernel/drivers/media/common/videobuf2/videobuf2-dma-contig.ko.zst
warning: could not get file information for usr/lib/modules/6.6.8-arch1-1/kernel/drivers/media/common/videobuf2/videobuf2-dma-sg.ko.zst
warning: could not get file information for usr/lib/modules/6.6.8-arch1-1/kernel/drivers/media/common/videobuf2/videobuf2-vmalloc.ko.zst
warning: could not get file information for usr/lib/modules/6.6.8-arch1-1/kernel/drivers/media/dvb-core/dvb-core.ko.zst
warning: could not get file information for usr/lib/modules/6.6.8-arch1-1/kernel/drivers/media/v4l2-core/videodev.ko.zst
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
==> dkms remove --no-depmod tbs_6904_se/6.6 -k 6.6.8-arch1-1
:: Processing package changes...
(1/3) reinstalling linux [#######################################################################################] 100%
(2/3) reinstalling linux-docs [#######################################################################################] 100%
(3/3) reinstalling linux-headers [#######################################################################################] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating module dependencies...
(3/4) Install DKMS modules
==> dkms install --no-depmod tbs_6904_se/6.6 -k 6.6.8-arch1-1
Module version for m88rs6000t.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Module version for tuner-simple.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Module version for tuner-types.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Module version for v4l2-dv-timings.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Module version for videobuf2-dvb.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Module version for videobuf2-memops.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
Module version for videobuf2-v4l2.ko.zst
exactly matches what is already found in kernel 6.6.8-arch1-1.
DKMS will not replace this module.
You may override by specifying --force.
==> depmod 6.6.8-arch1-1
(4/4) Updating linux initcpios...
[...]
dkms status also returns some warnings:
$ dkms status
tbs_6904_se/6.6, 6.6.8-arch1-1, x86_64: installed (original_module exists) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
dkms.conf
PACKAGE_NAME="tbs-6904-se"
PACKAGE_VERSION="6.0.11"
MAKE[0]="make -C media_build dir DIR=../media KERNELRELEASE=$kernelver && cp ./.config ./media_build/v4l/ && make -C media_build KERNELRELEASE=$kernelver"
CLEAN="make -C media_build distclean"
BUILT_MODULE_NAME[0]="dvb-core"
BUILT_MODULE_LOCATION[0]="media_build/v4l"
DEST_MODULE_LOCATION[0]="/updates/tbs"
BUILT_MODULE_NAME[1]="gx1133"
BUILT_MODULE_LOCATION[1]="media_build/v4l"
DEST_MODULE_LOCATION[1]="/updates/tbs"
BUILT_MODULE_NAME[2]="m88rs6000t"
BUILT_MODULE_LOCATION[2]="media_build/v4l"
DEST_MODULE_LOCATION[2]="/updates/tbs"
BUILT_MODULE_NAME[3]="m88rs6060"
BUILT_MODULE_LOCATION[3]="media_build/v4l"
DEST_MODULE_LOCATION[3]="/updates/tbs"
BUILT_MODULE_NAME[4]="tas2101"
BUILT_MODULE_LOCATION[4]="media_build/v4l"
DEST_MODULE_LOCATION[4]="/updates/tbs"
BUILT_MODULE_NAME[5]="tbsecp3"
BUILT_MODULE_LOCATION[5]="media_build/v4l"
DEST_MODULE_LOCATION[5]="/updates/tbs"
BUILT_MODULE_NAME[6]="tuner-simple"
BUILT_MODULE_LOCATION[6]="media_build/v4l"
DEST_MODULE_LOCATION[6]="/updates/tbs"
BUILT_MODULE_NAME[7]="tuner-types"
BUILT_MODULE_LOCATION[7]="media_build/v4l"
DEST_MODULE_LOCATION[7]="/updates/tbs"
BUILT_MODULE_NAME[8]="v4l2-dv-timings"
BUILT_MODULE_LOCATION[8]="media_build/v4l"
DEST_MODULE_LOCATION[8]="/updates/tbs"
BUILT_MODULE_NAME[9]="videobuf2-common"
BUILT_MODULE_LOCATION[9]="media_build/v4l"
DEST_MODULE_LOCATION[9]="/updates/tbs"
BUILT_MODULE_NAME[10]="videobuf2-dma-contig"
BUILT_MODULE_LOCATION[10]="media_build/v4l"
DEST_MODULE_LOCATION[10]="/updates/tbs"
BUILT_MODULE_NAME[11]="videobuf2-dma-sg"
BUILT_MODULE_LOCATION[11]="media_build/v4l"
DEST_MODULE_LOCATION[11]="/updates/tbs"
BUILT_MODULE_NAME[12]="videobuf2-dvb"
BUILT_MODULE_LOCATION[12]="media_build/v4l"
DEST_MODULE_LOCATION[12]="/updates/tbs"
BUILT_MODULE_NAME[13]="videobuf2-memops"
BUILT_MODULE_LOCATION[13]="media_build/v4l"
DEST_MODULE_LOCATION[13]="/updates/tbs"
BUILT_MODULE_NAME[14]="videobuf2-v4l2"
BUILT_MODULE_LOCATION[14]="media_build/v4l"
DEST_MODULE_LOCATION[14]="/updates/tbs"
BUILT_MODULE_NAME[15]="videobuf2-vmalloc"
BUILT_MODULE_LOCATION[15]="media_build/v4l"
DEST_MODULE_LOCATION[15]="/updates/tbs"
BUILT_MODULE_NAME[16]="videodev"
BUILT_MODULE_LOCATION[16]="media_build/v4l"
DEST_MODULE_LOCATION[16]="/updates/tbs"
AUTOINSTALL="yes"
Do I need to update something in my dkms.conf file to get rid of these warnings? Thanks!
Did some digging today.
First warnings are from pacman because in-tree kernel modules are ~~removed~~ moved when installing the DKMS modules (https://bbs.archlinux.org/viewtopic.php?id=273902). ~~Was this a change in DKMS? I couldn't find any related commit/code...~~ Not exactly sure why this only happens from DKMS 3.0.10 on upwards.
Second warnings are because of https://github.com/dell/dkms/pull/297. I think the easiest "fix" for me would be to force the installation. Any way to do this from dkms.conf?
Other options are removing the modules which match the srcversion from the build and/or from my dkms.conf. If TBS decides to patch those modules in the future though this could cause bad side effects.
The warnings in dkms status are the result of not installing some of the DKMS modules (because the srcversion matches).
EDIT: Did some more reading and found DEST_MODULE_LOCATION should be set to the original location of the in-tree kernel module. Unfortunately because of commit https://github.com/dell/dkms/commit/e6c14d6b4ebaa66253008251b6485b86d425d7a2 this gets ignored on Arch systems. Without that override I think we could get rid of the first pacman warnings.
First warnings are from pacman because in-tree kernel modules are moved ...
Moved where, by who? Can you run find ... -name xxx and print the before/after location? AFAICT dkms should not be moving those.
On the missing version part - where did you get the tbs_6904_se module from? Cannot see it in Arch or AUR. The version comparison is fairly fragile, so I would like to try and replicate/test any potential fixes.
Moved where, by who? Can you run
find ... -name xxxand print the before/after location? AFAICT dkms should not be moving those.
dkms is moving the original modules so they can be restored when the dkms module gets removed again. I can check the exact location later when I'm back at home.
On the missing version part - where did you get the tbs_6904_se module from? Cannot see it in Arch or AUR. The version comparison is fairly fragile, so I would like to try and replicate/test any potential fixes.
I wrote that dkms module for my specific hardware because the complete TBS driver build is taking a very long time. I can update later with specific instructions if you want.
Before:
$ find /usr/lib/modules -name "dvb-core.ko.zst"
/usr/lib/modules/6.6.10-arch1-1/kernel/drivers/media/dvb-core/dvb-core.ko.zst
After:
$ find /usr/lib/modules -name "dvb-core.ko.zst"
/usr/lib/modules/6.6.10-arch1-1/updates/dkms/dvb-core.ko.zst
$ find /var/lib/dkms -name "dvb-core.ko.zst"
/var/lib/dkms/tbs_6904_se/6.6/6.6.10-arch1-1/x86_64/module/dvb-core.ko.zst
/var/lib/dkms/tbs_6904_se/original_module/6.6.10-arch1-1/x86_64/dvb-core.ko.zst
Reproducer:
mkdir -p /usr/src/tbs_6904_se-6.6
cd /usr/src/tbs_6904_se-6.6
# create dkms.conf file
vi dkms.conf
# create .config file with modules to build
vi .config
git clone https://github.com/tbsdtv/media_build.git
git clone --depth=1 https://github.com/tbsdtv/linux_media.git -b latest ./media
dkms add tbs_6904_se/6.6
dkms build tbs_6904_se/6.6
dkms install tbs_6904_se/6.6
dkms.conf
PACKAGE_NAME="tbs-6904-se"
PACKAGE_VERSION="6.6.9"
MAKE[0]="make -C media_build dir DIR=../media KERNELRELEASE=$kernelver && cp ./.config ./media_build/v4l/ && make -C media_build KERNELRELEASE=$kernelver"
CLEAN="make -C media_build distclean"
BUILT_MODULE_NAME[0]="dvb-core"
BUILT_MODULE_LOCATION[0]="media_build/v4l"
DEST_MODULE_LOCATION[0]="/kernel/drivers/media/dvb-core"
BUILT_MODULE_NAME[1]="gx1133"
BUILT_MODULE_LOCATION[1]="media_build/v4l"
DEST_MODULE_LOCATION[1]="/updates/dkms"
BUILT_MODULE_NAME[2]="m88rs6000t"
BUILT_MODULE_LOCATION[2]="media_build/v4l"
DEST_MODULE_LOCATION[2]="/kernel/drivers/media/tuners"
BUILT_MODULE_NAME[3]="m88rs6060"
BUILT_MODULE_LOCATION[3]="media_build/v4l"
DEST_MODULE_LOCATION[3]="/updates/dkms"
BUILT_MODULE_NAME[4]="tas2101"
BUILT_MODULE_LOCATION[4]="media_build/v4l"
DEST_MODULE_LOCATION[4]="/updates/dkms"
BUILT_MODULE_NAME[5]="tbsecp3"
BUILT_MODULE_LOCATION[5]="media_build/v4l"
DEST_MODULE_LOCATION[5]="/updates/dkms"
BUILT_MODULE_NAME[6]="tuner-simple"
BUILT_MODULE_LOCATION[6]="media_build/v4l"
DEST_MODULE_LOCATION[6]="/kernel/drivers/media/tuners"
BUILT_MODULE_NAME[7]="tuner-types"
BUILT_MODULE_LOCATION[7]="media_build/v4l"
DEST_MODULE_LOCATION[7]="/kernel/drivers/media/tuners"
BUILT_MODULE_NAME[8]="v4l2-dv-timings"
BUILT_MODULE_LOCATION[8]="media_build/v4l"
DEST_MODULE_LOCATION[8]="/kernel/drivers/media/v4l2-core"
BUILT_MODULE_NAME[9]="videobuf2-common"
BUILT_MODULE_LOCATION[9]="media_build/v4l"
DEST_MODULE_LOCATION[9]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[10]="videobuf2-dma-contig"
BUILT_MODULE_LOCATION[10]="media_build/v4l"
DEST_MODULE_LOCATION[10]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[11]="videobuf2-dma-sg"
BUILT_MODULE_LOCATION[11]="media_build/v4l"
DEST_MODULE_LOCATION[11]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[12]="videobuf2-dvb"
BUILT_MODULE_LOCATION[12]="media_build/v4l"
DEST_MODULE_LOCATION[12]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[13]="videobuf2-memops"
BUILT_MODULE_LOCATION[13]="media_build/v4l"
DEST_MODULE_LOCATION[13]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[14]="videobuf2-v4l2"
BUILT_MODULE_LOCATION[14]="media_build/v4l"
DEST_MODULE_LOCATION[14]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[15]="videobuf2-vmalloc"
BUILT_MODULE_LOCATION[15]="media_build/v4l"
DEST_MODULE_LOCATION[15]="/kernel/drivers/media/common/videobuf2"
BUILT_MODULE_NAME[16]="videodev"
BUILT_MODULE_LOCATION[16]="media_build/v4l"
DEST_MODULE_LOCATION[16]="/kernel/drivers/media/v4l2-core"
AUTOINSTALL="yes"
.config
CONFIG_MEDIA_TUNER=m
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_M88RS6000T=m
CONFIG_MEDIA_SUPPORT=m
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_PCI_SUPPORT=y
CONFIG_VIDEO_DEV=m
CONFIG_VIDEOBUF2_DMA_SG=m
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_DMA_CONTIG=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_V4L2=m
CONFIG_VIDEOBUF2_DVB=m
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_DVB_CORE=m
CONFIG_DVB_GX1133=m
CONFIG_DVB_M88RS6060=m
CONFIG_DVB_TAS2101=m
CONFIG_DVB_TBSECP3=m
CONFIG_DVB_MAX_ADAPTERS=16
CONFIG_DVB_PLATFORM_DRIVERS=y
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
CONFIG_MEDIA_ATTACH=y
CONFIG_MISC_DEVICES=y
CONFIG_DVB_DYNAMIC_MINORS=yc
CONFIG_DVB_MMAP=y
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_V4L2_I2C=y
Thanks a bunch for the details. Off the top of my head, I think dkms should not be moving the original but instead rely on the depmod.d config/ordering to ensure that kmod picks the new/updated module over the pre-existing original.
If the config does not allow for the correct ordering, then moving of modules may happen.
Will try to look at this over the next week or so o/
any news on this @evelikov?
I'm just churning through some dkms chores and this issue is next. It's been crazy month :sweat_smile:
Glancing through, this has some overlap with https://github.com/dell/dkms/issues/311. Since that one is a little more self-contained, I will address that and then we can see what's left here :crossed_fingers: