Stuck on login page after editing 'Option “PrimaryGPU” “Yes”' in /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf for external monitor


I was having issue to connect external monitor with my Asus F15 laptop having parrot os . I followed all the steps mentioned in Having problem while using external monitor on parrot os - #19 by Mart . After that my external monitor get connected but now i am stucked on login page loop of parrot os means when i login to parrot os , it again come to login page. To login to parrot os i have to edit ‘Option “PrimaryGPU” “no”’ but then external monitor donot work…Kindly help so that i can use external monitor

nvidia-bug-report.log (709.4 KB)

earlier report is when ‘Option “PrimaryGPU” “no”’ …Attached report is when ‘Option “PrimaryGPU” “yes”’ and system got stuck on login page. To create report , I press alt+ctrl+F2 to run terminal
nvidia-bug-report.log.gz (265.3 KB)

The xrandr commands for the display manager are missing. Also, please set kernel parameter
With primarygpu=no, you can enable external monitors running
xrandr --setprovideroutputsink NVIDIA-G0 modesetting && xrandr --auto

do i have to replace it with xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto on /etc/lightdm/ . Or i have to write the above alon with the previous command

nvidia-drm.modeset=1 is already set