Nvidia display and more things

So my ubuntu(21.04 just upgraded hoping that it will help and it helped, cause I couldn’t change the Hz or resolution but now I can) can’t have 2 displays. If I put sudo nvidia-prime select nvidia my external monitor works but my laptop screen doesn’t work and is black it doesn’t show anything. If I do sudo nvidia-prime select intel the external monitor doesn’t work but the laptop screen works. And if I try to record with obs it says: Failed to open NVENC codec: Unknown error occurred

Please check your video drivers are up to date.

I tried to redownload the drivers and upgrade to 495 and then returned to 470 drivers. And I got nvidia gtx 1660 ti .

Edit: When I ran nvidia-xconfig it rewrote by xorg.conf and I think this is why it doesn’t work now, but I don’t know how to fix it like what to add to the file.

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log (2.3 MB)

sorry for the late response

Please delete /etc/X11/xorg.conf

I already tried that and it didn’t work…

Please create a new nvidia-bug-report.log without xorg.conf.