Before 16.04 I had been using bumblebee but after upgrading ubuntu, nvidia drivers have broken again so I decided to use nvidia-prime instead. However it doesn't want to work, too. I get a black screen after bootup animation. It doesn't work even on a clean ubuntu installation. I tried it with both nvidia-361 and nvidia-340. I have disabled secure boot.
I get this error in Xorg.0.log:
[ 22.545] (EE) open /dev/fb0: Permission denied
[ 22.679] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
I saw some suggestions that I should make X run as root but I don't know if this is safe and won't break things later.