Configuration nvidia driver For the LightDM display manager.
Installing Package
~ ❱ sudo pacman -S nvidia nvidia-utils nvidia-settings xorg-server-devel opencl-nvidia xorg-xrandr
Disable Nouveau Driver
The following is configuration for /usr/lib/modprobe.d/nvidia-utils.conf
blacklist nouveau
Use NVIDIA graphics only
Configuration for /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
Section "OutputClass"
Identifier "intel"
MatchDriver "i915"
Driver "modesetting"
EndSection
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "PrimaryGPU" "yes"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection
Set-Up LightDM
For the LightDM display manager :
/etc/lightdm/display_setup.sh
#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
Make the script executable.
~ ❱ sudo chmod +x /etc/lightdm/display_setup.sh
Now configure lightdm to run the script by editing the [Seat:*]
section in /etc/lightdm/lightdm.conf
...
[Seat:*]
display-setup-script=/etc/lightdm/display_setup.sh
...
Fix Screen Tearing
Screen tearing usually happens on Arch Linux laptop that uses Prime to switch between NVIDIA and Intel drivers.
create a new config file /etc/modprobe.d/nvidia-drm-nomodeset.conf
options nvidia-drm modeset=1
Finally update intramfs.
~ ❱ sudo mkinitcpio -P
Now reboot and your display manager should start.