Perhaps the one thing that did save them was their exceptional line of ThinkPad laptops, and strong support from the business and institutional market (likely due to restrictive "IBM-only" contracts).
On the consumer side, however, they went through a series of mostly unsuccessful desktop lineups: PS/1 (1990-1994), PS/ValuePoint (1992-1995), Ambra (1993-1994), PC Series (1994-2000), and finally Aptiva (1994-2001).
It also didn't help that Microsoft punished IBM for buying out Lotus and producing a competitor to Microsoft Office, by charging IBM higher prices and witholding them the OEM license for Windows 95 until after the clone makers were already shipping Windows 95 systems.
Indeed. Now that you mention it, people would come in and ask for ThinkPads by name. But given the price disparity between desktops and laptops at the time, we didn't move nearly as many laptops. To overcome that trust factor, IBM had to make something that was literally 3x as good as anything else on the market and they just never figured out how to do that on the desktop.
And yes, the antagonistic relationship with Microsoft definitely hurt matters too--it made it hard for IBM to keep prices competitive. I still think IBM should have called OS/2 Warp "OS/2 Chicago" when Windows 95 was delayed. Microsoft would have sued, but they had no trademark on the name. IBM would have had bigger legal concerns from the pop band than from Microsoft. But that's a whole other can of worms there.
Once the clones came out there was nothing IBM could do to keep from losing most of its market share. You can say the PS/2 line killed off their home market, but that is the market the clones were going to own anyway. The PS/2 line at least gave corperate buyers the idea they were getting better designed and built machines then what the clones offered (well until EISA came along).
You're right, IBM never completely figured out the home market. But even once they came in with a competitive product at a competitive price (the PCjr was neither, but the PS/1s and Aptivas were competitive with Dell and Compaq on price and capability), it still didn't catch on. Had IBM conceded in the late 1980s that they would have to share the market, phased Microchannel in (the way PCI ultimately was phased in) and charged less costly royalties on it, things could have turned out a lot differently for them. The perception of IBM being proprietary was what kept us from selling IBMs. I sold a lot more Compaqs, Dells, and HPs than I did Packard Bells, because they were much better quality machines and I didn't want to sell junk. (I got in trouble for it sometimes, but rather than push Packard Bell, I just got more subtle.) I did manage to sell more IBMs than most of my coworkers, but it was an uphill battle.
It is kind of hard to blame IBM though, in a way. Their mainframe strategy had been very successful, so you would expect them to repeat the strategies that worked in the past. IBM is out of the PC market now, but they're one of many companies who can say the same thing. Not many companies did get it right.