My knee problem arose when I bought a beautiful full suspension bike which was either too small for me or its geometry was just for one purpose only, trails. And if possible only descents. I was feeling really horrible on that bike despite my efforts to adjust to my liking everything adjustable. Anyway I ditched the bike (my downhill years were over anyway) and I've never had a problem since then.
So maybe some bikes are meant to be ridden by specific type of bodies. I don't know, but that seems to be the case with me.