Update deleted nvidia config file unable to get it working again

I downloaded Manjaro about 4 days ago and set up the Nvidia config file to make my rtx2060 my primary GPU (/usr/share/X11/xorg.conf.d) But this morning, I was asked to update, and after the update, I no longer can use my external monitor. Checking the config files, I noticed the update deleted the config file and made a new file in this location /etc/X11/mhwd.d/nvidia.conf. I then copy-pasted what I had last time, and it no longer works. I tried to move the file, but the system does not allow me to copy or cut.

Currently, the file has this inside it.

Generated by mhwd - Manjaro Hardware Detection

Section “OutputClass”
Identifier “nvidia”
MatchDriver “Nvidia-drm”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration”
Option “SLI” “Auto”
Option “BaseMosaic” “on”
Option “PrimaryGPU” “yes”

Section “OutputClass”
Identifier “layout”
Option “AllowNVIDIAGPUScreens”

You using modesetting & have mkinitcpio.conf set?

nvidia-drm.modeset=1 in kernel

~ > cat /etc/mkinitcpio.conf               
# vim:set ft=sh
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=(nvme iwlwifi iwlmvm bluetooth btusb thunderbolt xhci_pci nvidia nvidia_modeset nvidia_uvm nvidia_drm)
 > lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)

This is what I use and in the /etc/X11/xorg.conf.d/ folder

~ > cat /etc/X11/xorg.conf.d/90-nvidia.conf  
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 375.26
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "ConnectToAcpid" "0"
    Option "RegistryDwords" "PerfLevelSrc=0x2222"

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "true"

Section "Extensions"
    Option      "Composite" "Enable"
    Option	"RENDER" "Enable"

Thanks for the reply,

My MODULES= were only “” but I copy-pasted everything in the () and the () with it.

I then copy-pasted what you have in you /etc/X11/xorg.conf.d/ folder but I noticed that by what your saying your file is /etc/X11/xorg.conf.d/ folder while my file is in /etc/X11/mhwd.d I see the xorg.conf.d which is where it was before the update but after the update, it has been moved to the mhwd.d folder.

I copy-pasted the code you have provided but after resetting it still hasn’t switched over as “about settings” still says Graphics Processor: AMD RENOIR

No… it is a symlink:

/etc/X11/xorg.conf.d/90-mhwd.conf -> /etc/X11/mhwd.d/nvidia.conf

So both are the same.

sudo mhwd-gpu --setxorg /etc/X11/mhwd.d/nvidia.conf