2017 iMac 27 connecting to external displays
I'm trying to set up a new 2017 iMac for a friend, and I'm having trouble connecting an external display to it. I first tried connecting an LG Ultra Fine 5K display using the supplied cable. It worked for a few minutes, and then it started flickering until it just blacked out. I tried a different cable (Belkin Thunderbolt 3) with no luck.
I also connected it to a ViewSonic 4K monitor through the Display Port using a Display Port to Thunderbolt 3 adapter. That monitor wouldn't even come on.
The weird part is that he was using both monitors with his 2016 MacBook Pro (has since sold), and they worked fine.
I have tried restarting as well as just shutting the iMac off before plugging the monitor in, even though I know I shouldn't have to. To be clear, I have only plugged in each monitor separately and never both at the same time.
I am at a loss. It appears to be an issue with the iMac itself, but I thought I'd post here in case this has happened to someone else and there's a fix, or I'm doing something wrong. Thanks in advance for your help.
The specs for the iMac - 4.2 GHz Core i7, 64GB RAM, Radeon Pro 580