Second Monitor doesn't work with iMac
I have a late 2012 iMac, Processor 2.7 GHz Intel Core i5, Memory 16 GB 1600 MHz DDR3 running High Sierra 10.13.6. I am trying to connect as second display a Samsung SyncMaster 226BW, but have so far had no success. The monitor has been tested with a friend's PC and it works fine. I've tried to connect via DVI and VGA cables through Mini Displayport adapters, and have tested both the cables and adapters which work on other machines.
When I connect my iMac's screen goes briefly blank, and the System Preferences/Displays shows the brightness increasing slightly. I've tried "Detect Displays" in there and also at different resolutions but this doesn't work, and there is no "Arrangement" tab. The monitor first shows a box in the top left hand corner which alternates saying "analogue/digital", after a while a floating box saying "Check Signal Cable" appears; when using DVI to connect then this box has "analogue" written at the bottom, and has "digital" when using VGA.
I have restarted in Safe Mode, have reset NVRAM and reset SMC. None of these have made a difference. Could anyone please help?
iMac, macOS High Sierra (10.13.6), Late 2012