My iMac started to have a problem when booting. It begins to boot where you hear the optical drive and Mac sound goes off, but then it gets stuck on a black screen where it's not responsive. After 10 to 20 minutes it might turn on. Most of the time if I unplug the back power cable and wait for the Mac to cool down then plug it in, it starts normally. If I then restart the computer, it goes back to the same problem. Overall, the Mac works well when it's on.
One more thing: the iMac also sometimes boots with many white and black lines and dots moving all over the screen, with the Apple logo with the cursor appearing at the right side of the screen instead of being in the middle. When I put the Mac to sleep, it turns on with a blue screen, but it is not responsive.
Does any one know what it might be?
The system has 3gb ram running osx 10.9