Ubuntu doesn't work if you have connected the monitor with the DVI connection. I don't know if it will ever work inside the OS, but it simply doesn't boot. I tried it and it hangs just before showing up X server.
Some people have even claimed that it NUKES the DVI port of the monitor!! OMG!!!
Luckily that didn't happen to me.
But there is a fix, but it doesn't seem to work on all the monitors.
1) Turn the PC and monitor off.
2) Remove power cables and the DVI cable from the back of both the monitor and PC.
3) Press the monitor’s “on” button (yes, without the monitor plugged in) to drain any residue power from the monitor. Repeat a few times if necessary to ensure no residue power is left.
4) Reconnect everything and boot up.
5) Voila, DVI works again!