How to install the NVIDIA driver on an ASUS laptop with both Intel and NVIDIA cards. This enables the NVIDIA card only and disables the Intel card. This is mostly based on the Arch Linux guide.
- Install the NVIDIA driver (and kernel module) from Slackbuilds.org
- Install the xf86-video-nouveau-blacklist. Can be done via
slackpkg
. - Configure the NVIDIA card in the Xorg configuration.
- Configure the KDE login manager (aka SDDM).
Install the NVIDIA driver:
$ export MAKEFLAGS=-j8
$ sqg -p nvidia-driver
$ sbopkg -i nvidia-driver
Disable the nouveau driver:
$ slackpkg install xf86-video-nouveau-blacklist
Configure the NVIDIA card in the Xorg configuration. Create the file
/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
with the
following contents:
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
Configure KDE login manager by editing the file
/usr/share/sddm/scripts/Xsetup
and adding the following commands to
the top of the file.
$ xrandr --setprovideroutputsource modesetting NVIDIA-0
$ xrandr --auto