2

I'm using Debian Stretch 64-bit with Gnome 3.22.2. When trying to update the NVIDIA driver, I got the following message:

ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your kernel. This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading. Please be sure to exit any programs that may be using the GPU(s) before attempting to upgrade your driver. If no GPU-based programs are running, you know that your kernel supports module unloading, and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to reboot your computer.

How do I know if my kernel supports module unloading?

I'm trying the other solutions too, but no success up to now.

  • 1
    if you didn't really try to have it not support module unloading, then it does support it by default. on Debian as well as most distributions. non-support is on some embedded or security hardened systems. if you're currently not running on console with GDM turned off, then it's "for example, by an X server" (or other available choices, including a bug) – A.B May 6 '18 at 22:49
2

There's no universal way to checking kernel configuration options.

If you have access to the kernel configuration, check whether it contains #define CONFIG_MODULE_UNLOAD. Debian-based distributions store the kernel configuration in /boot/config-VERSION where VERSION is the output from uname -r. Some distributions (but not Debian) store the configuration in the kernel itself, where you can retrieve it with zcat /proc/config.gz.

Alternatively, you can test the feature. Load some module for hardware that you don't have or for some networking feature that you don't use, then unload it. For example (assuming that tunnel6 is not loaded — check that /sys/modules/tunnel6 doesn't exist)

insmod /lib/modules/`uname -r`/kernel/net/ipv6/tunnel6.ko
rmmod tunnel6

Kernels for PCs and more generally for systems where hardware can be plugged an unplugged dynamically are pretty much always compiled with support for module unloading. This include Debian kernels. So you can check to make sure, but for you the answer is yes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.