Cannot use nvidia drivers anymore after trying prime-select on Ubuntu 18.04 LTS

I’ve been using nvidia driver on 16.04 LTS and 18.04 LTS with no issues at all.
Then I’ve tried prime-select (cycle trough prime-select intel and prime-select nvidia) as my notebook as multiple graphics cards (integrated intel and GeForce GT650M). Afer issuing the command the driver has stopped working, I get blank screen on each boot.
I’ve tried re-installing many times different version (via apt purge nvidia*) but looks like something got stuck somewhere in the configuration.
Not sure how to figure that out.
The Ubuntu login screen works, but before and after the login I just get blank screen.
The Nouveau driver works fine.

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).

I’ll have to try doing it blind as the terminal login doesn’t work on my laptop (never understood why but Ctrl+alt+f1 results in blank screen no matter what driver is running).
Or can I run the nvidia-bug-report.sh script at the next boot (e.g. in recovery console)?

Worth a try, maybe something is caught nevertheless. Otherwise, you could use ssh from another system.

Hi. To reset nvidia and graphics settings, you try removing nvidia settings (/home/YOUR_USER/.nv) and all xorg.conf file (even those with format xorg.conf.02032020 for example).

rm -R ~/.nv

sudo rm /etc/X11/xorg.conf*

Reboot the system.
I recommend that you do not do any experiments with Prime on 18.04. When 20.04 is released, you upgrade Ubuntu and then configure Prime with latest nvidia drivers.

I’ve found the root cause for my issue.
The problem was the nvidia-kms.conf that prime had created in /lib/modprobe.d
This just sets:

options nvidia-drm modeset=1

removed this and no more black screen.