I solved the same problem by disable screen saver, disable any kind of standby. Teamviewer only connects when a monitor is attached and display is on, so to say screensaver or power save are the cause. As soon one uses the system, it wakes up, and so the display, and teamviewer does work again. i think it's because mainly teamviewer cannot wake up the screen, so if the screen went to standby mode, teamviewer will not initialize the display. the only fix i could find in this is to keep your display awake at all time. disable it from the power settings to never turn off display. ( Off course, you can turn off the power button on your monitor, but on unbuntu, you must disable screen saver and disble turn off display after 10 min, keep display on all time) This is the ultimate solution.
... View more