Stop all the printing, and put the printer in the maintenance mode. Wait for the cartridges to align properly, pull them out gently and then lower the cover and print something. It will say that you don't have the cartridges installed. The printer will perform various operations regarding the carriage. This is a way to fix it. Put the cartridges back gently and then print again. If you still encounter issues, you will need to take the printer to service repair because this could indicate it's a hardware error.