Remove all the covers from the light switches and electrical outlets on the wall that you'd like to prime. Usually dust accumulates behind the covers, so it's a good idea to clean around the outlets and light switches as well with a fresh rag and warm water.
Feel every surface of the wall to see if there are any bumps or divots.
Fix any area that requires patchwork. Then sand the patchwork areas to make sure they're smooth.
Brush and vacuum away all the dust created from sanding.
Clean the walls with a cleaning solution to remove any dust particles missed during the vacuuming. TSP (trisodium phosphate) and water is a good cleaning solution choice since it doesn't require rinsing and can also remove scuffs.
Allow to dry before applying the primer.