@bobbythemoh I am currently unable to test it on a Raspberry Pi running Raspbian, because I am working on another project. Please try to execute /opt/vc/bin/tvservice -o
, this will turn off the HTMI port, if this won’t work there may be an issue with the last update of Rasbian.
I am currently anyway working on another method to toggle the HDMI port on different operating systems, so I may resolve this anyway.