I experienced knee pain only while on my trainer and after trying many other steps which usually would solve bike pain problems for me, I came across an unusual solution. My Wahoo Kickr feet have adjustable height and although they were fairly similar, the right Kickr foot was higher than the left one, which resulted in left knee pain. After adjusting the left one to match in height, the feeling of resistance in my knee and the pain that followed went away.
This is what I tried before which is probably more likely to solve your problem:
- Bike fit (very important!)
- Physio (also very important; weak hips and other mobility have caused me problems on-bike)
- Ensuring distances between the front and rear axle and the floor were equal.
- adding/removing pedal spacers (cleat position done by fitter)
- decreasing load / slowing down / taking rest
- eating more hummus (I like it, leave me alone.)
Also remember to stretch. Especially the upper leg front muscles (no idea how they are called)
Quads?