Skip to content

Instantly share code, notes, and snippets.

@kaangiray26
Last active November 29, 2023 17:35
Show Gist options
  • Save kaangiray26/0c7c0880c6c0108bfd3c350f9faef656 to your computer and use it in GitHub Desktop.
Save kaangiray26/0c7c0880c6c0108bfd3c350f9faef656 to your computer and use it in GitHub Desktop.
Arch Linux - Nvidia Discrete Graphics Card

Enabling the discrete graphics card

Install the following packages:

sudo pacman -S nvidia nvidia-prime nvidia-utils lib32-nvidia-utils mesa-utils lib32-mesa-utils nvidia-settings

Remove the following from HOOKS in /etc/mkinitcpio.conf:

kms

Add the following kernel parameters in /etc/default/grub:

nvidia_drm.modeset=1
nvidia_drm.fbdev=1

Recreate grub config:

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

Regenerate the initframs:

sudo mkinitcpio -P

Force-enable Wayland(optional):

sudo ln -s /dev/null /etc/udev/rules.d/61-gdm.rules

Reboot

Disabling the discrete graphics card

  • Uninstall all packages
  • Add kms to HOOKS in /etc/mkinitcpio.conf
  • Remove kernel parameters from /etc/default/grub
  • Recreate grub config
  • regenerate the initframs

Remove symlink:

sudo rm /etc/udev/rules.d/61-gdm.rules

Reboot

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