Some companies may not accept the two week notice, and may ask you to leave immediately. This may be true even if you have a good manager or relationship with the company.
When I quit my job, I intended to give four weeks notice, and to offer to work part time for a month later if they wanted it. Manager took the offer to their upper-management, upper-management came back and said, "nope, two weeks max."
I had prepared for that, but did not expect it, at all. Generally speaking you should only give notice if you're also willing to leave that day.
2 weeks is the norm for regular jobs, but top tech companies are really struggling to fill top talent spots these days. While it is perfectly legal to give only 2 weeks notice, it's normally better to ask your manager how much time they'd reasonably need to fill your position, then have a conversation.
So, I'd re-phrase the original conversation as
"Hey Jerry, got a minute? Look, I don't think this is working out. I intend to give you a letter of resignation by the end of the day, but I want to discuss how much time you'd need to reasonably fill my position before I give my notice."
Then again, if you
1. hate your job, or
2. your manager is being unreasonable about how much time they need to fill that position, or
3. don't care about burning your bridges
Then go right ahead and give 2 weeks notice. It's up to you to decide how you want to frame the conversation.
When I quit my job, I intended to give four weeks notice, and to offer to work part time for a month later if they wanted it. Manager took the offer to their upper-management, upper-management came back and said, "nope, two weeks max."
I had prepared for that, but did not expect it, at all. Generally speaking you should only give notice if you're also willing to leave that day.