Inorder for hdmi to be able to output, you should add
<key>Mac-A5C67F76ED83108C</key>
<string>none</string>
under ConfigMap->dict
in /System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist
and rebuild kext cache using
sudo kextcache -i /
Thank for @timrijckaert we have a more detail guide