Rough idle and stalling

My truck is an 88 Nissan D21 2.4 TBI 5spd. The problem it has is when the engine is cold the truck won’t stay running unless you stay on the gas for a minute. It will fire up everytime, but will if you let off the gas it goes down to idle speed (about 800rpm) then stall. Once it stays running the idle is rough (it fluctuates between 400 and 1200 rpms). So far I’ve replaced all the plugs, wires, cap and rotor, air and fuel filters. All worn vacuum hoses replaced (about 3 didn’t get replaced due to running out of hose, but these look in good shape). I checked compression all cylinders run between 150 and 155 (service manual calls for 130 to 160) I’m at a loss now. Could a bad fan clutch cause any of these issues? I know mine is seized and the fan spins at full engine speed all the time. Recently my fan belt decided to snap and in the brief minute it ran while I pulled over it seemed to idle smooth, but I didn’t risk running it longer since the water pump runs off the same belt. I do sometimes also get hesitation on acceleration but seems to go away once the truck is warmed up. Any help on this is greatly appreciated I’m at a loss on this and the factory service manual doesn’t really cover a problem of this nature.

Have you tried to see if the air and idle adjustments in the TBI are responding?
There is a similar question on this web site for a nissan, the guys recommend to check the EGR (stuck valve) and the TBI.

My fan clutch also froze and I have a similar problem with rough idle a slow speed, and runs really well at higher speeds, but it does not stall. I’ll remove my fan belt and see if the rough idle goes a away as a test and give you some feedback.

Something I found pretty interesting, was to add SeaFoam to remove carbon buildup. Before I used this product, my truck was missing some pep, and I could not peel the tires from standstill. After using this product, the intake airpassages have opened, and I am able to make the truck tires spin. I have not added it to the fuel or the oil to clean them yet.