Having watched fellow startup employees be let go and told to clear out by the end of the day, I don't believe they (or you, or I) have any duty to give more than the culturally accepted 2-weeks notice.
I always advise to give the amount of notice (or severance) the employer would give. If the departure is prompted by a recent layoff, there's not even need to speculate.
As a rule of thumb, I would avoid giving more than required notice when quitting because you're unhappy with the job. There's no way to explain it that won't eventually create a poisonous atmosphere. If it's something less emotionally loaded, like moving to accompany a spouse or to go back to school, then a couple of months notice could be seen as a noble gesture. Any longer and there's no realistic benefit for the employer, but plenty of risk for the employee.