Intro
So i got laptop with dual vga card Nvidia and Intel, the I install Manjaro with Gnome desktop on top of it.
Now, how I can set up Nvidia as default graphic driver instead of Intel on my manjaro system.
Install nvidia graphic driver on manjaro
To install nvidia graphic driver on manjaro, run the following command.
|
|
Now reboot the system and check again the installed nvidia driver.
|
|
Make sure you got the video-hybrid-intel-nvidia-prime driver.
Check BusID of nvidia graphic card
Before going any further, check BusID of your nvidia graphic.
|
|
Below is the an example result.
00:02.0 VGA compatible controller: Intel Corporation XXLake-H GT2 [UHD Graphics XXX]
01:00.0 3D controller: NVIDIA Corporation GPXXM [GeForce GTX 10XX Ti Mobile] (rev a1)
The BusID for nvidia graphic card is PCI:1:0:0, and for intel is PCI:2:0:0.
Setup Xorg configuration for nvidia
By default the mhwd tool created the nvidia graphic driver configuration /etc/X11/xorg.conf.d/90-mhwd.conf.
Delete the default mhwd configuration and create another one.
|
|
Change the BusID options as your own and paste the configuration.
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
Save.
Block nouveau and Enable nvidia-drm.modeset
Backup all default configuration at the /etc/modprobe.d/ directory.
|
|
Create new blacklist configuration.
|
|
Paste the following configuration to block the nouveau kernel driver.
blacklist nouveau
blacklist nvidiafb
blacklist riafb
Save.
Next, enable the nvidia-drm.modeset by creating new configuration.
|
|
Paste the following configuration.
options nvidia_drm modeset=1
Save.
Setup ourput source for GDM (Gnome Display Manager)
Create new configuration file.
|
|
Paste the following configuration.
[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
Save.
Now make it auto-start on the login.
|
|
After that reboot the system.
Verify the nvidia driver
To verify our setup, run the following command.
|
|
Optionall, you can use the tool nvtop.
|
|
Enjoy your system is fully using nvidia graphic card.