Time out respond for displayport - zcu104

Last time I was facing a problem with HDMI output when it was not connected. It was not showing any error and being stuck in the same position. Which was solved with @PeterOgden suggestion on changing the file responsible for HDMI.

The same type of problem I am facing with display port, but not time out error, and it shows the following errors and quite the program directly. But I want to run it even the display port cable is not connected. I have tried to modify the DisplayPort class file I found in the library. But it is not showing any effect on changing the file.

Ignoring unconnected port
Ignoring unconnected port
terminate called after throwing an instance of ‘std::runtime_error’
what(): Could not find compatible mode
Aborted (core dumped)

Is there anyone who could help me with this?