I am using using envycontrol (https://github.com/geminis3/envycontrol) to disable nvidia gpu.
It created file
/etc/modprobe.d/blacklist-nvidia.conf # Automatically generated by EnvyControl
blacklist nouveau
blacklist nvidia
blacklist nvidia_drm
blacklist nvidia_uvm
blacklist nvidia_modeset
alias nouveau off
alias nvidia off
alias nvidia_drm off
alias nvidia_uvm off
alias nvidia_modeset off
Dinit and Runit has script
/usr/bin/modules-load which can't handle alias for kernel modules. when modules-load is executed it give error
modprobe: ERROR: could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)
Why do you need those aliases in the first place?
have a look at this https://wiki.archlinux.org/title/Kernel_module#Aliasing
Well yeah modules-load is just a simple bash script. Do you happen to know if systemd-modules-load handles aliases?
I have not checked on systemd
Are any of the aliased-to-off modules mentioned in files from your
/usr/lib/modules-load.d or
/etc/modules-load.d folders?
I copypasted your
/etc/modprobe.d/blacklist-nvidia.conf to my AMD-based system but the error message doesn't show up, however running:
$ modprobe nvidia
modprobe: ERROR: could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)
systemd's modules-load.d manpage doesn't mention them (https://www.man7.org/linux/man-pages/man5/modules-load.d.5.html).
Aliases seem to be handled by modprobe, which is provided by
util-linux kmod on both systemd and non-systemd GNU/Linux™ systems.