Not able to install nvidia drivers for my graphics card

At that point you wont be best served by me.

I might be able to help undo the things, but only with some research.

If I am to understand you … you installed the envycontrol package, used it a bit with the switch commands, and now switching to hybrid again results in black screen.

Looking at the source (GitHub - bayasdev/envycontrol: Easy GPU switching for Nvidia Optimus laptops under Linux) I note

But most importantly for us

So I might guess

sudo envycontrol --reset

Would be helpful.

If you need help getting interaction with the system then please see this guide (runlevel 3?)