In my experience, ultimatums never work. It's absolutely fine to tell someone that something they're doing is hurtful or them changing their behaviour is an important thing for you.
However, if they don't care about making these changes to help you out for the relationship and your partnership in general, then they're telling you in the most sincere way possible that what's important to you is not important for them.
With an ultimatum, you're saying that you're so unhappy that if they don't change this behaviour, the relationship isn't worth continuing. So, they'll either accept the ultimatum and the end of the relationship, or they'll do the absolute minimum possible to prevent that happening - either way you lose.
Personally, I often have lots of little ultimatums but they stay inside my head and aren't given out as an "or else". For example, if I wanted someone to make some kind of commitment gesture, I'd tell them that was what I wanted, that it was important for me to happen in a reasonable time, then I'd set a date around that but just for myself. At that point, if they're not doing anything, I'd walk away.
But, honestly, if you're at the point where you've decided the relationship isn't worth continuing unless he makes significant, prolonged changes across his behaviour, then it sounds like you've already made your mind up :/
I'm sorry, you deserve to be treated better than this.
Otherwise, maybe try counselling? Find a friendly relationship counsellor who can mediate this and get it across to him that he's not doing what's needed. Then you've given it every chance possible, so you're easy in your mind that you didn't walk away lightly?