Artix Linux Forum

Init systems => dinit => Topic started by: Arch_user on 28 July 2022, 10:53:49

Title: /usr/bin/modules-load can't handle alias
Post by: Arch_user on 28 July 2022, 10:53:49
I am using using envycontrol (https://github.com/geminis3/envycontrol) to disable nvidia gpu.
It created file /etc/modprobe.d/blacklist-nvidia.conf
Code: [Select]
# 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
Code: [Select]
modprobe: ERROR: could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)
Title: Re: /usr/bin/modules-load can't handle alias
Post by: Lancia on 28 July 2022, 13:30:38
Why do you need those aliases in the first place?
Title: Re: /usr/bin/modules-load can't handle alias
Post by: Arch_user on 28 July 2022, 13:36:51
Why do you need those aliases in the first place?
have a look at this https://wiki.archlinux.org/title/Kernel_module#Aliasing
Title: Re: /usr/bin/modules-load can't handle alias
Post by: Dudemanguy on 28 July 2022, 14:58:01
Well yeah modules-load is just a simple bash script. Do you happen to know if systemd-modules-load handles aliases?
Title: Re: /usr/bin/modules-load can't handle alias
Post by: Arch_user on 28 July 2022, 18:18:54
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
Title: Re: /usr/bin/modules-load can't handle alias
Post by: capezotte on 29 July 2022, 04:58:19
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:

Code: [Select]
$ 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)

Well yeah modules-load is just a simple bash script. Do you happen to know if systemd-modules-load handles aliases?

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.