moviuro / mkmm

Moviuro's Kernel Module Manager intended to be used in an alpm-hook(5) to save and restore the running kernel's modules
MIT License
9 stars 1 forks source link

Mkmm is interfering with dkms #1

Open Edu4rdSHL opened 3 years ago

Edu4rdSHL commented 3 years ago

Hello, Movi. As you can see in the following output, dkms tries to install the modules in mkmm-$(uname -r), probably because it's creating one folder in the kernel's directory.

Package (5)            Old Version  New Version  Net Change  Download Size

extra/cmake            3.20.1-1     3.20.2-1       0.01 MiB       8.26 MiB
extra/libxnvctrl       465.24.02-1  465.27-1       0.00 MiB       0.08 MiB
extra/nvidia-dkms      465.24.02-2  465.27-1       0.02 MiB      24.19 MiB
extra/nvidia-settings  465.24.02-1  465.27-1       0.00 MiB       0.77 MiB
extra/nvidia-utils     465.24.02-2  465.27-1       0.04 MiB     136.23 MiB

Total Download Size:   169.52 MiB
Total Installed Size:  486.78 MiB
Net Upgrade Size:        0.06 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 libxnvctrl-465.2...    76.9 KiB  62.5 KiB/s 00:01 [----------------------] 100%
 cmake-3.20.2-1-x...     8.3 MiB  1414 KiB/s 00:06 [----------------------] 100%
 nvidia-settings-...   785.9 KiB   172 KiB/s 00:05 [----------------------] 100%
 nvidia-dkms-465....    24.2 MiB  1134 KiB/s 00:22 [----------------------] 100%
 nvidia-utils-465...   136.2 MiB  2.30 MiB/s 00:59 [----------------------] 100%
 Total (5/5)           169.5 MiB  2.86 MiB/s 00:59 [----------------------] 100%
(5/5) checking keys in keyring                     [----------------------] 100%
(5/5) checking package integrity                   [----------------------] 100%
(5/5) loading package files                        [----------------------] 100%
(5/5) checking for file conflicts                  [----------------------] 100%
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms remove --no-depmod -m nvidia -v 465.24.02 -k 5.10.33-1-lts
==> dkms remove --no-depmod -m nvidia -v 465.24.02 -k 5.12.0-152-tkg-MuQSS
==> depmod 5.12.0-152-tkg-MuQSS
==> depmod 5.10.33-1-lts
==> Unable to remove module nvidia/465.24.02 for kernel mkmm-5.12.0-152-tkg-MuQSS: Not found in dkms status output.
:: Processing package changes...
(1/5) upgrading cmake                              [----------------------] 100%
(2/5) upgrading libxnvctrl                         [----------------------] 100%
(3/5) upgrading nvidia-utils                       [----------------------] 100%
If you run into trouble with CUDA not being available, run nvidia-modprobe first.
(4/5) upgrading nvidia-dkms                        [----------------------] 100%
(5/5) upgrading nvidia-settings                    [----------------------] 100%
:: Running post-transaction hooks...
(1/8) Creating system user accounts...
(2/8) Reloading system manager configuration...
(3/8) Arming ConditionNeedsUpdate...
(4/8) Install DKMS modules
==> dkms install --no-depmod -m nvidia -v 465.27 -k 5.12.0-152-tkg-MuQSS
==> dkms install --no-depmod -m nvidia -v 465.27 -k mkmm-5.12.0-152-tkg-MuQSS
==> dkms install --no-depmod -m nvidia -v 465.27 -k 5.10.33-1-lts
==> depmod 5.12.0-152-tkg-MuQSS
==> depmod mkmm-5.12.0-152-tkg-MuQSS
depmod: ERROR: Bad version passed mkmm-5.12.0-152-tkg-MuQSS
==> Warning, `depmod mkmm-5.12.0-152-tkg-MuQSS' returned 1
==> depmod 5.10.33-1-lts
(5/8) Updating icon theme caches...
(6/8) Update Nvidia module in initcpio
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts.img
==> Starting build: 5.10.33-1-lts
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-lts.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: 5.10.33-1-lts
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-lts-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-tkg-muqss-zen2.preset: 'default'
  -> -k /boot/vmlinuz-linux-tkg-muqss-zen2 -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-tkg-muqss-zen2.img
==> Starting build: 5.12.0-152-tkg-MuQSS
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-tkg-muqss-zen2.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-tkg-muqss-zen2.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-tkg-muqss-zen2 -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-tkg-muqss-zen2-fallback.img -S autodetect
==> Starting build: 5.12.0-152-tkg-MuQSS
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-tkg-muqss-zen2-fallback.img
==> Image generation successful
(7/8) Updating the desktop file MIME type cache...
(8/8) Updating the MIME type database...
:: Looking for AUR upgrades
:: Looking for devel upgrades
 there is nothing to do

Regards, Ed

moviuro commented 3 years ago

This looks to me like a feature: you wouldn't want the kernel module to be removed, right?... I'm not using dkms myself, and I suspect that dkms does some sort of find -mindepth 1 -maxdepth 1... which would match the mkmm-xx/module, but because it's not in a database somewhere?

Anyway, is something broken? Does dkms have a way to "ignore" some kernels?

Edu4rdSHL commented 3 years ago

This looks to me like a feature: you wouldn't want the kernel module to be removed, right?... I'm not using dkms myself, and I suspect that dkms does some sort of find -mindepth 1 -maxdepth 1... which would match the mkmm-xx/module, but because it's not in a database somewhere?

Well, something that causes an error message shouldn't be called "feature". And what you're saying is correct -though- but I wonder why we don't put the modules in a hidden folder like .mkmm-xx/... ?

Anyway, is something broken?

No, it doesn't break anything.

Does dkms have a way to "ignore" some kernels?

No, as far as I know.

moviuro commented 3 years ago

Can you try https://github.com/moviuro/mkmm/commit/391b5f0f985a4ea2b3177235ca7aaf19484230d1 ? Your problem should no longer occur.