The ionization source model is considered to study the effects of trapped electron temperature, dust charge variations, and grain radius on the nonlinear dust ion acoustic waves (DIAWs) in dusty plasmas having trapped electrons. It has been shown that the nonlinear DIAWs damp waves and these waves are governed by a damped modified Korteweg–de Vries equation. It is found that only compressive dust ion acoustic solitons can propagate in dusty plasmas with trapped electrons. The amplitude and the width of the solitons depend mainly on the trapped electron temperature, dust charge variations and grain radius. The existence of the solitons is independent of the trapped electron temperature. The findings of this investigation may be useful in understanding laboratory plasma phenomena and astrophysical situations.