Installing nvidia driver bricks my system

START HERE FOR NVIDIA DRIVERS: **Note this is relevant for Optimus users like myself
(https://discovery.endeavouros.com/nvidia/nvidia-optional-enhancements-and-troubleshooting/2021/03/)

You’ll want to force nvidia-drm.modeset=1, by adding it to the grub.cfg so to do that:

sudo nano /etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 quiet loglevel=3 nowatchdog"
GRUB_CMDLINE_LINUX=""

Make it look like that, save the file, ctrl+x, hit Y to save. Then rebuild the grub.cfg

sudo grub-mkconfig -o /boot/grub/grub.cfg

Next part to this, is force nvidia drivers to load on early boot (helps to prevent black screens before login screen)

sudo nano /etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# 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 nvidia_uvm nvidia_drm"

save the file, ctrl+x, hit Y to save and rebuild the mkinitcpio.conf

sudo mkinitcpio -P

Reboot and should be good to go!

For a bonus (you don’t have to do this if you don’t need to), in case you want to avoid screen tearing:

sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
    Identifier "Nvidia Card"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Option "NoLogo" "true"
EndSection

Section "Screen"
        Identifier      "nvidia"
        Option         "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
        Option          "TripleBuffer"                  "on"
        Option          "AllowIndirectGLXProtocol"      "off"
EndSection

save the file, ctrl+x, hit Y to save

Use a hook to make sure you do get kernel images to rebuild on updates:

sudo pacman -S nvidia-hook

**Final note, this was source mainly from the amazing EndeavourOS wiki, I just had it written all down in LibreOffice in case I ever needed to do a fresh install, I could be up and running quickly, instead of having to search all over the place again for solutions to problems I already fixed once, Good luck! :stuck_out_tongue:

Edit: I’ll also add this just in case it may also help. With optimus you can either have the intel graphics (no thanks!) or use the dedicated Nvidia graphics (yes please!). To get that to work, we have to do a bit more work, but it’s straightforward and simple enough!

Sourced from the following:
(https://discovery.endeavouros.com/nvidia/optimus-manager-for-nvidia/2021/03/)

yay -S optimus-manager

yay -S optimus-manager-qt

Reboot your system

Check optimus manager service (should be running)

systemctl status optimus-manager

If it’s not running, start and enable it:

sudo systemctl enable --now optimus-manager

Now open and use optimus-manager app to select from tray icon>settings>optimus tab> startup mode: NVIDIA and now whenever you start your system, it should default to always Nvidia ON. You can select other options from that list if you would prefer something also.

I’d also recommend using the LTS kernel :wink:

2 Likes