External monitor recognized but getting "no signal"

I had the exact same problem as the question poster: Ubuntu 12.10, Nvidia card, monitor connected via HDMI, using nouveau driver, monitor worked before (with the same setup), the monitor is detected and enabled in Ubuntu, but no signal to monitor.

The temporary solution: I'm running Ubuntu on a laptop and there is a special key on my keyboard which allows me to enable/disable external displays (in my case the key is Fn + F7, this differs per laptop). So I just pressed that key combination and the external monitor immediately was turned on.

EDIT:

Though the key combination to enable the external monitor works, you'll have to repeat this every time you reboot. I found a way to have the external monitor automatically detected and enabled at the login screen (after a reboot). And when you login, the previous settings for your monitors are restored, as you would expect. Here's how to do it:

Note: I only tested this with an Nvidia card. And before you continue, I recommend you install SSH first (sudo apt-get install ssh) to be safe. In the case something goes wrong and both internal and external monitor stop working, you can always undo whatever you did by logging in from another computer via SSH (e.g. ssh [email protected]). So make sure you know the IP address of your computer in the network.

  1. First of all, run sudo apt-get install v86d in a terminal to install the v86d package.

  2. Run gksu gedit /etc/initramfs-tools/modules or sudo vim /etc/initramfs-tools/modules and add the following line at the end of the file (replace 1280x1024 by the resolution of your internal monitor):

    uvesafb mode_option=1280x1024-24 mtrr=3 scroll=ywrap

    save and exit.

  3. Create the file /etc/initramfs-tools/conf.d/splash by running gksu gedit /etc/initramfs-tools/conf.d/splash or sudo vim /etc/initramfs-tools/conf.d/splash with the following content:

    FRAMEBUFFER=y

    save and exit

  4. Now you need to update the initramfs image because we changed some configurations. Do this by runnning sudo update-initramfs -u.

Now reboot your system and your external monitor should get a signal as soon as the Ubuntu login screen appears.