Power up and boot into Single User Recovery by holding
(if you are on high sierra 10.13.6+ you might need to use Command + r instead)
Command + r + s
Disable SIP (This takes a bit to complete so wait for it)
csrutil disable
Disable Discrete GPU on boot by running
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
Enable verbose boot mode (This will show text everytime you boot up, shutdown or restart your mac)
nvram boot-args="-v"
Reboot:
reboot
Boot into Single User-mode by holding
Command + s + r
It might look as if it hanged, but press enter and you should see the shell (root#)
Mount root partition writeable
/sbin/mount -uw /
Make a kext-backup directory
mkdir -p /System/Library/Extensions-off
Move ONLY ONE offending kext out of the way
mv /System/Library/Extensions/AMDRadeonX3000.kext /System/Library/Extensions-off/
Inform the system to update its kextcache:
touch /System/Library/Extensions/
Reboot
reboot
It will show a bunch of text in the screen (don't be alarmed, let it finish) and then it will restart again In second restart it will show text in the screen again and then it will show normal login screen Your computer now should work properly (dGPU off and iGPU on.