Agree, it definitely is rude. Saying hello, good afternoon, responding to a question about cash/card also involves communication, and with earbuds it is simply rude to the other person.
If you don't want to talk to anyone, go to self-checkout or a vending machine, but cashiers are humans and not just robots scanning items.
I see nobody saying "good afternoon" in a grocery store, that's the one place where you keep interactions to a minimum.
Also, self-checkouts are not always an option because at least the ones at grocery stores here never accept cash.
Lived in DC and this is very true, lived in London and would be thinking about it all day if I ignored a cashier. London it is polite to say please, thank you, good afternoon, and all other verbal mannerisms.
This is an assumption that I would interpret as rude if I were the cashier