As stated above, I believe 500 RPM is the normal idle range. If that is true, turning up the idle would just be a band-aid fix and you need to fix what is actually wrong.
You can do a visual check and make sure everything is tight. Intake manifold and would also check for exhaust manifold leaks (snapped studs). Other things that need checked, but would require a scan tool capable of reading live data....even a lower-mid level scan tool can have this capability so not like you need a fancy one.
- what do the O2 sensors read? Meaning is it running rich or lean?
if they are saying the engine is running either rich or lean that can point you in the right direction
I have seen a faulty O2 sensor give an incorrect reading....it said the air/fuel ratio was correct but it really wasn't
- IAT (intake air temperature) sensor
- IAC (idle air control) valve
The explanation as to why the truck may run fine when first started and cold and then start running poor when warmed up. During the initial startup the engines are running in open loop, meaning they are running on preset parameters (fuel ratio, etc...) programmed into the ECM and NOT based on what the sensors are stating. Once warmed up the engine goes into closed loop mode which means the sensors are adjusting the engine parameters. The main one is probably the O2 sensors as they need to be warmed up some before getting good numbers. Once in closed loop the ECM depends on the readings from the O2 sensors to adjuat and optimize the running of the engine. In general, if the engine runs fine when cold and then starts running poorly when warmed up there is a sensor issue somewhere that is either not working or giving a bad signal.