I don't know what the problem was but it now works, It may have been a bad connection with the CMOS battery because I did move the battery in its socket to read the text on it and that could have fixed it but I honestly don't know. Thanks you guys for trying to help anyway.
So a couple days ago my mouse broke and since I had no spares my pc was turned off for like four days (plug socket off as well) when I got a new mouse and tried to turn it on again my monitor detected the hdmi signal but only showed a black screen with a small white rectangle towards the upper...