If you use liquid detergent, pour it on the stained areas instead of just dumping it in the tub. I use Spray and Wash as well as other brands when they're on sale and pretreat collars.
I also put OxyClean in the wash along with the detergent.
Be sure that you're not overloading the machine. The clothing should fill up only 2/3 of the tub.
My father was an appliance repairman. He said most of the time when his customers complained that their clothes were not coming out clean he found that they were using too much detergent. Unless you have hard water, you need only half the recommended amount.
A test to see if the grime is the result of using too much detergent, try washing your clothes with a water softener compound without detergent. Or just without detergent and no water softener. If the water gets sudsy or scummy that's the excess soap washing out of the clothes.
Wash sheets and towels in hot water and use a chlorine bleach to get them clean looking again. Use a non-chlorine bleach on colors.
You can presoak clothes in the washer just by keeping the lid open once the tub is filled with water. That means planning to do laundry when others aren't waiting. Presoaking with OxyClean gets my dingy dish cloths white again.