Solved! Laptop crashes while playing games connected to TV(HDMI)

Jan 10, 2019
My Dell G5 laptop (Nvidia 1050ti Graphics card and i7 8750H intel processor) keeps crashing while playing games connected to a TV by an HDMI cable. It stays on the gamescreen and doesn’t respond unless I long press the power button and shut it down. No issues occur when I play it normally on the laptop’s screen itself. Only happens when I connect it to a TV via HDMI and that too within 20-25 minutes of gaming. The temperature stays the same while its connected to the TV, fps doesn’t drop also(I use msi afterburner’s statistics). Tried reducing my cpu undervolting, reducing cpu turbo ratio, disabling cpu turbo mode (all from ThrottleStop) and none of it works. Someone please help!
Install the graphics driver for intel and nvidia from the Dell´s service/support homepage. Eventually update the BIOS of this laptop if available