bonus points if like my old inspiron, it's actually genuine and the cable is "tired".
Extra bonus points when actually all cables are fine, but the port has clapped out.
On the manufacturers of various power adapters I have experience with:
Dell/Inspiron power adapters have a 512-byte 1-wire memory chip hooked up to the center pin. Not exactly friendly, but at least blank chips are available and programming one isn't impossible:
Lenovo Thinkpad series doesn't do any ID checks, but uses different values of resistors in the cable tip between the center pin and ground so the machine can determine which 'model' power adapter (90 watt, 135 watt, 200 watt, etc) it is. Simple enough to not be an issue most of the time. No resistor (infinity ohms) means one of the larger adapters anyway so it's generally fail-safe.
Apple Lightning has a proprietary TI chip (unpublished model number, no datasheet available) which sends unknown-format data upon powering up: http://www.iphoneincanada.ca/iphone-5-2/revealed-how-apples-new-lighting-cable-talks-to-your-iphone/ - ugh.
For an iPhone... my design of choice would have been: 1. just mirror the pins side to side so flipping the cable upside down isn't a problem, IF that feature was even required (use microUSB otherwise), and 2. just provide the proper 5v or whatever and detect when output current isn't sufficient for that particular device's needs. Nothing fancy but it would always work. But then again, I don't think about vendor lock-in when building circuits either.
and I thought It was just me
Okay, funny story: I just got back from the Apple store in a completely failed attempt to get my iphone 5's battery replaced under the current recall. You'd think that having announced a major battery recall Apple might have tried to make sure that their stores had adequate stock of the replacement batteries on the first business day after the announcement but you would be wrong. Anyway, that's not why I'm here:
While in the process of verifying that I did in fact need a new battery (and before realizing that they had no new battery to give me), the genius bar dude happened to notice that my lightning port was displaying exactly the same behavior you see above. He shined a small LED flashlight into the port and knitted his brows.
"Wait here one minute" he said, and disappeared into the back with my phone.
About 90 seconds later he came back, plugged the charge cable in, and it seated firmly and began charging with no dumb warnings on the first try.
Here, apparently, is the deal: dust and other shmutz from your pocket gets slowly crammed into the port. The action of plugging the cable in compresses the crap into a sedimentary layer which eventually ossifies, thickens and prevents the cable from making a proper connection. It's apparently possible to clean it out yourself, but not recommended: compressed air won't usually dislodge it, and using a pick yourself runs the risk of damaging the pins. But they've got a specialized cleaning tool at the stores (or so they claim; for all I know it's just a dental pick and a tiny vacuum) and this is a no-charge repair even if you're not in warranty.
(This obviously doesn't solve the problem of the Lighning port being a terrible design, but it at least resets the clock on having to deal with the consequences -- hopefully they'll figure out some way to make the tolerances a little less strict in the 6.)