I was having problems running opengl libraries in java and had the exact same error as here could not init GLX in minecraft So I followed the instructions from the first answer. I also tried to install bumblebee https://wiki.ubuntu.com/Bumblebee
As I remember I haven't done anything else. Now I get the black screen when booting.I tried removing all installed packages listed, didn't work. Then I tried most of the answers from here Blank screen after installing nvidia restricted driver
Nothing works. I have onboard IntelHD 3000 and separate NVidia 525M.