Your Raspberry Pi will attempt to detect the modes supported by your monitor and make a choice for what is feels is the best option for the display mode. If you operate in a “headless” mode (no display attached at boot time), and then later decide to connect a monitor, you either get a very ugly display or none at all. The solution is to configure your Pi with the ideal HDMI settings.
I have to operate headless because I have a lot of USB devices connected and I think I am drawing more power at boot time than the Pi can deliver to my network interfaces (another issue for another post later). All I know now is that if I disconnect the HDMI cable all my network interfaces come up.
There is a post that provides a lot of great information – http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=5851. This is how I set up my Pi to solve this problem
From the command-line, logged-in as root
1. Get the list of what’s supported by your monitor:
tvservice -d edid edidparser edid
2. Find the mode that you want to use in the displayed list. The video mode is the number between parentheses – you will use this next.
3. Edit your boot-up config file:
Find the section about HDMI, uncomment the two lines for hdmi_group and hdmi_mode. Then set the right group and mode you desire from step 2. If your mode description contains CEA, it should be “1” and if it contains DMT the group value should be “2”.
I had a 4:3 NEC monitor so my values were:
Exit the editor with CTRL+X, Y, and enter.
4. Reboot your Pi:
shutdown -r now
If the display comes up properly, try rebooting again and removing the HDMI cable quickly. Wait a couple minutes and plug it in. You should see the display in the proper format.