Sometimes on this error it is caused by the coded stip that determent the cartridge possition,that strip might get dirty.Wipe the plastic strip behind the cartridge with a damp cloth.That helps 80 persent of the times.
I have worked on tons of printers. This particular error had stumped me for a while, but I finally found the cause. As others had pointed out before, it can have alot to do with some obstruction in the print path, the gears, or ink on the clear plastic encoder strip. You're on the right track - I found the the purge cap (the white sliding mechanism that the print head parks to when it's not in use) was not lubricated well enough from factory. If you lubricate the sliders with some white grease (don't get it on the small wipers or the black caps) the mechanism can now slide more freely, and the unit can park the head properly without giving you the dreaded head homing error 5100. Keep in mind that this repair will probably require you to remove the right panel off of the printer to gain access to the purge mechanism. There are two screws behind the printer, and two in front for each corrosponding side panel (the front screws are behind the grey front panel of the printer - open the top cover to see the clips which hold the front cover on) Hope this helps some of you out.