Nvidia kernel modules not loading at boot

@bogdancovaciu I’ve done as you suggested and removed video-linux & reinstalled video-nvidia
for posterity, could you edit the “-F” to “-f” as this is the correct flag :slight_smile:

unfortunately i’m still having the same issue

[jpycroft@ManjaroRGB ~]$ cat /etc/modprobe.d/*
## Generated by mhwd - Manjaro Hardware Detection
blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm
[jpycroft@ManjaroRGB ~]$ ^C
[jpycroft@ManjaroRGB ~]$ cat /etc/modules-load.d/*
## Generated by mhwd - Manjaro Hardware Detection
# List of modules to load at boot

EDIT: forgot how copy/paste works #facepalm

1 Like

Hahaha, did i got carried out by something there ? Possible … fixed now!

@bogdancovaciu I feel these line from the journal logs are relevant
EDIT: I need to learn to english

Feb 02 18:52:25 ManjaroRGB kernel: audit: type=1400 audit(1643799145.061:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=320 comm="apparmor_pa>
Feb 02 18:52:25 ManjaroRGB kernel: audit: type=1400 audit(1643799145.061:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=320 comm="appar>
Feb 02 18:52:25 ManjaroRGB audit[320]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=320 comm="apparmor_parser"
Feb 02 18:52:25 ManjaroRGB audit[320]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=320 comm="apparmor_parser"
Feb 02 18:52:24 ManjaroRGB systemd-modules-load[306]: Module 'nvidia' is deny-listed
Feb 02 18:52:24 ManjaroRGB systemd-modules-load[306]: Module 'nvidia_drm' is deny-listed
Feb 02 18:52:24 ManjaroRGB systemd-modules-load[306]: Module 'nvidia_uvm' is deny-listed

This is odd … Please share:

cat /etc/default/grub
cat /etc/mkinitcpio.conf

Also, wonder if you have some custom stuff in /etc/X11/ aside the proper /etc/X11/mhwd.d/nvidia.conf

Maybe worth running:
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

Nothing odd/related in grub config

[jpycroft@ManjaroRGB ~]$ cat /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.

# Uncomment to disable submenus in boot menu

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices

# Uncomment to use basic console

# Uncomment to disable graphical terminal

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'

# Uncomment to allow the kernel use the same resolution used by grub

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"

# Uncomment to disable generation of recovery mode menu entries

# Uncomment this option to enable os-prober execution in the grub-mkconfig command

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.

# Uncomment one of them for the gfx desired, a image background or a gfxtheme

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
[jpycroft@ManjaroRGB ~]$

@gog on the #manjaro IRC suggested i add MODULES=“nvidia nvidia-modeset”
This didn’t change anything as far as logs etc

[jpycroft@ManjaroRGB ~]$ cat /etc/mkinitcpio.conf 
# vim:set ft=sh
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES="nvidia nvidia-modeset"

# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries

# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.

# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap consolefont filesystems fsck"

# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.

# Additional options for the compressor
[jpycroft@ManjaroRGB ~]$ 

I haven’t touched /etc/X11/ apart from to look since install about a week ago.

[jpycroft@ManjaroRGB ~]$ tree /etc/X11/
├── mhwd.d
│   ├── nvidia.conf
│   └── nvidia.conf.nvidia-xconfig-original
├── xinit
│   ├── xinitrc
│   ├── xinitrc.d
│   │   ├── 40-libcanberra-gtk-module.sh
│   │   ├── 50-systemd-user.sh
│   │   └── 80xapp-gtk3-module.sh
│   └── xserverrc
└── xorg.conf.d
    ├── 00-keyboard.conf
    └── 90-mhwd.conf -> /etc/X11/mhwd.d/nvidia.conf

4 directories, 9 files
[jpycroft@ManjaroRGB ~]$ 

This made no difference…

I’m wondering if systemd-modules-load.service is finding another blacklist somewhere

systemd-modules-load.service is an early boot service that loads kernel modules. It reads static configuration from files in /usr/ and /etc/, but also runtime configuration from /run/ and the kernel command line (see below).
See modules-load.d(5) for information about the configuration format of this service and paths where configuration files can be created.

but that should be

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

inside the /etc/mkinitcpio.conf if you want to enable early kms, then you have to run
sudo mkinitcpio -P
sudo update-grub

But then, if you want for later to test wayland (not worth tho), then you add to /etc/default/grub on the cmd line to be like that


then run
sudo update-grub

but, where this comes from

is something i never encountered … :man_shrugging:

It depends on nvidia, nvidia_modeset & nvidia_uvm, so it might be denied because it’s dependencies are denied?
Also, do you know of anything in /usr that systemd might be reading?

I’ll try your mkinitcpio stuff.
I’m not interested in wayland tbh, too buggy and i don’t see the advantage?

Probably it is blacklisted somewhere.

What is content of modprobe folder? ls /usr/lib/modprobe.d/ and ls /etc/modprobe.d/

1 Like

Since @person1873 tested the nvidia-dkms thing, i wonder if that is still present in the system and it creates some custom stuff, but i honestly have no clue. I always avoided dkms stuff …

Similar issue: Manjaro does not boot after update - #18 by dirn

[jpycroft@ManjaroRGB ~]$ tree /etc/modprobe.d/
└── mhwd-gpu.conf

0 directories, 1 file
[jpycroft@ManjaroRGB ~]$ tree /usr/lib/modprobe.d/
├── bluetooth-usb.conf
├── bumblebee.conf
├── nvdimm-security.conf
├── nvidia-utils.conf
├── systemd.conf
└── uvesafb.conf

0 directories, 7 files
[jpycroft@ManjaroRGB ~]$ tree /usr/lib/modules-load.d/
├── bluez.conf
├── nvidia-utils.conf
└── uinput.conf

0 directories, 3 files

I found our smoking gun…
going to remove these blacklists and reboot.

[jpycroft@ManjaroRGB ~]$ cat /usr/lib/modprobe.d/* | grep blacklist
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nouveau
blacklist nouveau

What? I see something not right here… what is this file content? Why do you have Bumblebee installed?

as expected…

I only knew about the blacklist it /etc/modprobe.d
had no idea it also existed in /usr/lib

after reboot it’s all working.
thanks @bogdancovaciu & @omano for assistance

What about Bumblebee? Where were the blacklists?

the /etc/ folder is user interactible (let say that); the /usr/ you shouldn’t manually touch it, hence my question you skipped.

I had bublebee & primus installed as i was using my APU for linux and was going to do virtio passthrough later on.
but decided to swap to my nvidia GPU for linux and not run windows trash.
the blacklist was in /etc/modprobe.d/bublebee.conf

I’ve now uninstalled bumblebee/primus and deleted the bumblebee.conf file

Alright, now that makes sense, here is your solution :point_up_2:

@bogdancovaciu I removed nvidia-dkms before i reinstalled video-nvidia

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.