archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
6.13k stars 530 forks source link

NVIDIA /etc/mkinitcpio.conf #1239

Open ShiGhost opened 2 years ago

ShiGhost commented 2 years ago

When installing the NVIDIA drivers, you should also add the nvidia nvidia_modeset nvidia_uvm nvidia_drm modules to /etc/mkinitcpio.conf This is what the Arch Wiki says https://wiki.archlinux.org/title/NVIDIA

dylanmtaylor commented 2 years ago

Specifically it states

If you want to ensure it is loaded at the earliest possible occasion, or are noticing startup issues (such as the nvidia kernel module being loaded after the display manager) you can add nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm to the initramfs.

I am not sure that this matters too much, as the driver seems to be functional by the time that the display manager loads up in practice.

Torxed commented 2 years ago

It also feels like it's user-specific if you should do this or not? I don't have it an my nvidia card runs fine. I might be missing some details here tho.

dylanmtaylor commented 2 years ago

It also feels like it's user-specific if you should do this or not? I don't have it an my nvidia card runs fine. I might be missing some details here tho.

On both of my Nvidia devices including a desktop and a laptop I haven't needed to do this sort of configuration.

wc7086 commented 2 years ago

I don't think it's necessary to add options that have little to no visible performance improvement when the program is working well.

Spunkie commented 1 year ago

For people saying they don't experience this issue, this is mostly proprietary nvidia driver + wayland specific. Related issue https://github.com/archlinux/archinstall/issues/1566

Still, I'm very much opposed to the idea that this isn't something that should be taken care of by archinstall.

Right now if you run through archinstall and select KDE + proprietary nvidia drivers with anything approaching a modern dGPU. You end up with a system that by default, crashes on login.


The user has no indication at all what needs to be done and forces them to comb through the archwiki blindly looking for a solution. On the off chance they figure out they need to load some extra nvidia kernel modules, the user is still being asked to mess with stuff that could easily result in a system that won't even boot.

Yes the user could "fix" their issue by switching to X11 in sddm, but they have no way of knowing that. And it's besides the point, wayland is here, things like plasma6 and wayland by default are coming. Archinstall can't hide from that.

Ultimately it's a horrible experience that wastes the users time and undermines the point of using archinstall at all.

roboboredom commented 1 year ago

I agree with Spunkie. This is a lovely program but there is no harm in doing this, and it can break a few edge case systems if not done.

Torxed commented 1 year ago

I understand the frustration, and I'll just leave it there without addressing the frustration itself.

Regarding the technical aspect of adopting early loading by adding it to the initramfs. We have two ways of tackling this:

  1. Just add it, and hope it does no harm to those that don't need it.
  2. Detect if the GPU is a discrete GPU and limit this to those GPU's.

The first one is simple - but might give me a lot of shit for bloating down the installation (we have numerous tickets about this already). The second one adds a slight code complexity but will limit the first concern.

I'm in favor of either of tbh, and if no one objects 1 is the simplest option here.

Torxed commented 1 year ago

Apologies for the delay in response btw, been playing a bit of catchup!