Skip to content

Stopped at an ExecCondition to run nvidia-cdi-refresh.service #1395

@tr4cks

Description

@tr4cks

Since the last update of nvidia-container-toolkit (v1.18.0), I wanted to follow the manual and update the CDI, or at least generate it in my case. So I ran the following command:

sudo systemctl restart nvidia-cdi-refresh.service

The problem is that I'm blocked by a condition in the file /etc/systemd/system/nvidia-cdi-refresh.service.
Here it is:

ExecCondition=/usr/bin/grep -qE '/nvidia.ko' /lib/modules/%v/modules.dep

As shown by this command, I have the NVIDIA drivers installed on my computer, and everything works fine with Docker containers.

$> lsmod | grep nvidia
nvidia_uvm           1540096  4
nvidia_drm             77824  0
nvidia_modeset       1314816  1 nvidia_drm
video                  65536  1 nvidia_modeset
drm_kms_helper        212992  4 mgag200,nvidia_drm
nvidia              56860672  29 nvidia_uvm,nvidia_modeset
drm                   614400  6 drm_kms_helper,drm_shmem_helper,nvidia,mgag200,nvidia_drm

Just in case, I updated the modules.dep file using the following command:

sudo depmod -a

However, this still did not fulfill the condition.

Here is the content of the module.dep file with a less strict grep command:

$> cat /lib/modules/$(uname -r)/modules.dep | grep "nvidia"
kernel/drivers/net/ethernet/nvidia/forcedeth.ko:
kernel/drivers/usb/typec/altmodes/typec_nvidia.ko: kernel/drivers/usb/typec/altmodes/typec_displayport.ko kernel/drivers/usb/typec/typec.ko kernel/drivers/gpu/drm/drm.ko
kernel/drivers/platform/x86/nvidia-wmi-ec-backlight.ko: kernel/drivers/acpi/video.ko kernel/drivers/platform/x86/wmi.ko
updates/dkms/nvidia-current-peermem.ko:
updates/dkms/nvidia-current-modeset.ko: updates/dkms/nvidia-current.ko kernel/drivers/acpi/video.ko kernel/drivers/platform/x86/wmi.ko kernel/drivers/gpu/drm/drm.ko
updates/dkms/nvidia-current-drm.ko: updates/dkms/nvidia-current-modeset.ko updates/dkms/nvidia-current.ko kernel/drivers/acpi/video.ko kernel/drivers/platform/x86/wmi.ko kernel/drivers/gpu/drm/drm_kms_helper.ko kernel/drivers/gpu/drm/drm.ko
updates/dkms/nvidia-current-uvm.ko: updates/dkms/nvidia-current.ko kernel/drivers/gpu/drm/drm.ko
updates/dkms/nvidia-current.ko: kernel/drivers/gpu/drm/drm.ko

So I wonder if the prerequisites are too strict and not permissive enough. Because in my case, the Nvidia drivers were installed correctly using the method provided by Debian with the official packages.

In terms of my configuration, I am running Debian 12 Bookworm with kernel 6.1.0-40-amd64 and I installed the NVIDIA drivers as recommended by Debian here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions