Nvidia-smi giving "No devices were found"

I have done quite a lot of things and nothing worked.
Also I am a newbie so don’t know much.
installed nvidia-drivers and wanted to use them always.
Went to nvidia-settings and there whenever I try to switch it gives me a segmentation fault.
and nvidia-smi giving “No devices were found”

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