Also, for 20mhz crystal/resonator, you MUST change the osc type to HS instead of XT.
HS will not work on 4Mhz, and vise versa.
SO,
here is what to do to get it working, "for sure". It seems to work for some with different setting however.
Ensure PPLDIV is 1 for 4Mhz, 5 for 20MHz
Ensure osc type is XT for 4MHz and HS for 20MHz
Include ALL config options.
After experimenting fpr days on end these seem to be the things that affect it most, for me anyway.
Bookmarks