Can't open Nvidia X Server settings

I've had the same problem. I resolved it by running the command

sudo prime-select nvidia

and rebooting.

After reboot I was able to open nvidia X server settings.


It seems that the only or easiest way to fix this problem is to just reinstall Ubuntu, I managed to get Nvidia settings to open with the Intel as the selected graphics driver by purging Nvidia and installing Nvidia settings before installing the driver, but it's missing the settings Nvidia I supposed to have. So from what I got here, if you have nvidia and Intel hd graphics in the same computer, probably don't switch to Intel for power saving (after having nvidia installed of course), it just broke my installation. If anyone could get a better solution to this feel free to do so, I couldn't find anything online.