I don't always wave, nor do I always, in every situation, say something when passing (but I'm VERY conservative about passing on my bike, and will sit behind someone for a long time until the perfect passing conditions come along, maybe more than I should).

But I always, always, aways slow and ask someone if they are OK if it looks like they might be having a mechanical problem. I have fixed flats for strangers with my own tubes on more than one occasion, and if they ask if they can buy the tube, or whatever, I say no. I figure it's good karma. Sometime I might get caught without a tube. Amazing how many people who ride bikes can't fix flats though. It's really worth learning.