After uninstalling recommend driver and installation of open source driver, i mentioned that everything was fine. But it didn't last for a day.
I don't know why...i think its because of an update i did after changing driver as mentioned above.
Now again i am encountering similar problems... ...
I misunderstood that the problem is due to the AMD ryzen 5 processor, but now i realize that it is the Nvidia driver package causing the troubles.
Previously i had installed linux recommended nvidia package from the driver manager.
Now,after i uninstalled it and installed open source nvidia...
black screen during linux 19.3 boot
boot issue-acer nitro 5-amd ryzen 5-nvidia
brightness is maximum and cannot be altered
nomodeset results in high battery performance
video driver is not installed