[SOLVED] nvidia prime on dual gpu configuration giving a blank screen

Finally finish the code and publhshed on GIHub.
Tests done over lightdm because I have no kdm, gdm, sddm to test on.