Pull all the furniture from the room. Lay out tarps on the floor. Set up a ladder.
Scrape a 12-inch drywall knife over the surface of the ceiling to take down any loose paint or plaster. Follow up with a vibrating pad sander, and buff any glossy areas of the ceiling until they are flat and dull.
Use a 4-inch drywall knife to press joint compound into each hole or crack. Let it dry for 12 hours.
Spread a paper-thin coat of compound over the ceiling, starting at one corner and working your way out over the surface in sections of 5 or 6 feet with a 12-inch drywall knife, or as far as you can reach with the ladder in one position. The compound should fill the dips and contours but be translucently thin on the main portions of the ceiling.
Allow the compound to set for six hours. Scrape the 12-inch drywall knife gently over the surface.
Spread on a second coat of compound over the whole ceiling in the same manner. It should also be paper-thin, except where it is filling dips and contours.
Let the second coat dry. Add a third coat if necessary. Let it dry. Sand the final coat by hand, very lightly, to get it smooth and thin. The ceiling is now ready for repainting.