I recently dual booted ubuntu (with windows 10). My computer has a nvidia geforce graphics card and that has been the root of my problems with ubuntu for the past few weeks. I have the proper nvidia drivers installed yet I still get stuck at a purple screen sometimes when I try to login. The keyword being sometimes. Typically my first attempt at logging in gets met by a purple screen after I choose to boot ubuntu through the grub. Then after it freezes on the purple screen, and I am forced to shutdown my computer by holding the power button and restart it. This second time around I press e on the ubuntu option and enter into a block of code. There I press the up and down keys and delete and retype a few words and then type control x to boot. Note that I have not added any extra parameters such as "nomodeset" or removed anything. Then the majority of the time it magically boots and I am able to login. Note that a black screen does appear and some text is written but it boots successfully. Of course sometimes this does not work and I'm forced to enter recovery mode (which also freezes half the time) and try to fix the issue (typically by purging nvidia and reinstalling the exact thing I just purged -.- again this does not work all the time).

Any ideas on what's happening? This is pretty ridiculous. I don't want to force shutdown my computer 5 times before being able to login -.-

This is what the screen flashes when I login successfully and restart immediately after: 1

Ubuntu 18.04.2 LTS

Nvidia Geforce MX150

nvidia-driver-390 (proprietary)

Here is the output from cpu-z

Secure boot is disabled already

The open source driver nouveau is the default one I believe, so yes I had that one first. But then i got the purple screen with it so i installed the nvidia drivers

I checked asus for uefi updates here. There is only one: version 300.

My computer is a "ASUS ZenBook Flip 14 UX461FN."

When running "sudo apt install xubuntu-desktop lightdm" I get: