You are not logged in.
I’m in the process of configuring NVIDIA card on a fresh install. I followed the instructions of the Arch wiki article’s “DRM kernel mode setting” section , and after adding nvidia-drm.modeset=1 kernel boot parameter in the bootloader config file, it fixed my OpenGL rendering (which used open, Mesa renderer before the change).
The subsection “Early loading” then talks about loading DRM “at the earliest possible occasion” by adding nvidia modules to the initramfs, and proceeds to the instructions on how to do it. What it doesn’t cover is “why”.
Can someone please shed light on this?
My main question is why would you want to add nvidia modules to initramfs? Is it generally recommended? Any examples of when this could be useful? Or is it only needed when you’re having issues?
It’s also unclear whether nvidia-drm.modeset=1 method becomes redundant when employing this “early loading” method.
Last edited by temkyn (2021-12-16 18:34:53)
Offline
The why, is that there exists a potential race condition especially if you have your system on an SSD, between the system coming up and trying to initialize the graphics subsystem. Where there's a chance that xorg or your graphics subsystem in general tries to start before the graphics card is fully initialized. Technically this is a lack of communication between the kernel and systemd and it can happen with every driver. By adding them to the initramfs you load the graphics driver earlier making the chance to "lose" this race less.
This doesn't obsolete the need for the modeset parameter, you need to set that anyway if you want to enable KMS in the nvidia driver.
The case you mention that got fixed, is precisely such an example. You definitely want to add them to the initramfs in that case, but this is a race condition, depending on what amounts to chance, you either get proper acceleration or broken acceleration between every boot unless you add them to the initramfs.
Last edited by V1del (2021-12-16 18:49:39)
Online
Thanks for the detailed explanation V1del, it's very helpful.
Offline