Skip to content

Instantly share code, notes, and snippets.

@jstarcher
Created July 9, 2024 02:44
Show Gist options
  • Save jstarcher/abdac9c2c0b5de8b073d527870b73a19 to your computer and use it in GitHub Desktop.
Save jstarcher/abdac9c2c0b5de8b073d527870b73a19 to your computer and use it in GitHub Desktop.
Stable Nvidia + Wayland on EndeavourOS (Arch) with working Suspend

This guide was created for EndeavourOs Endeavour Release which if using the Online installer, as of July 2024, will provide Plasma 6.1 and Nvidia 555 drivers. This guide shows using Grub but will work with systemd-boot as well if you follow steps for kernel params.

  1. Create file /etc/modprobe.d/nvidia.conf with the following contents
options nvidia_drm modeset=1
options nvidia_drm fbdev=1
options nvidia NVreg_EnableGpuFirmware=0
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

Warning

Ensure /var/tmp has enough space to store your temporary file (total VRAM of all cards + 5% margin)

  1. Edit /etc/default/grub and add the following lines inside line GRUB_CMDLINE_LINUX_DEFAULT as followed:
nvidia.NVreg_PreserveVideoMemoryAllocations=1 nvidia.NVreg_EnableGpuFirmware=0

so for example it should look something like this: GRUB_CMDLINE_LINUX_DEFAULT="nowatchdog quiet nvidia.NVreg_PreserveVideoMemoryAllocations=1 nvidia.NVreg_EnableGpuFirmware=0 nvme_load=YES nvidia_drm.modeset=1 loglevel=3 nvidia-drm.modeset=1"

then run sudo grub-mkconfig -o /boot/grub/grub.cfg to update grub

  1. Enable services as followed:
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service
  1. Reboot and you should be good to go!

This was tested against a Ryzen system with an RTX 4070.

@danilw
Copy link

danilw commented Dec 5, 2024

@ReillyBrogan
Copy link

Step 2 is redundant with the last two module parameters in step 1. One or the other could be removed. All the kernel argument is doing is setting the NVreg_PreserveVideoMemoryAllocations and NVreg_EnableGpuFirmware module parameter for the nvidia module which is exactly what the modprobe config is doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment