Many sources online seem to be claiming that, when in lack of Zyklon B, Nazis used their truck exhaust pipes directly as a source of gas. Is that true?
The Nazis did use carbon monoxide (CO) as a lethal gas to kill prisoners, but it wasn't used as an alternative to Zyklon B, but the other way around, Zyklon B was chosen as an alternative to CO. They used CO both in mobile gas chambers (Gas Vans) and in stationary gas chambers (located in death and concentration camps).
They used CO from the exhausts of a truck engine to kill prisoners, mostly Jews. The method has a Wikipedia article, sourced to many sources, indicating that the first to use this method of execution were the NKVD, the soviet secret police.
The gas van was invented in the Soviet Union in 1936, by Isay Berg, the head of the administrative and economic department of the NKVD of Moscow Oblast which suffocated batches of prisoners with engine fumes in a camouflaged bread van while on the drive out to the mass graves at Butovo, where the prisoners were subsequently buried.
The United States Holocaust Memorial Museum, on their web page about the Nazis gassing operation state:
After the June 1941 German invasion of the Soviet Union and Einsatzgruppe (mobile killing unit) mass shootings of civilians, the Nazis experimented with gas vans for mass killing. Gas vans were hermetically sealed trucks with engine exhaust diverted to the interior compartment. Use of gas vans began after Einsatzgruppe members complained of battle fatigue and mental anguish caused by shooting large numbers of women and children. Gassing also proved to be less costly. Einsatzgruppen (mobile killing units) gassed hundreds of thousands of people, mostly Jews, Roma (Gypsies), and mentally ill people. In 1941, the SS concluded that the deportation of Jews to killing centers (to be gassed) was the most efficient way of achieving the "Final Solution". That same year, the Nazis opened the Chelmno camp in Poland. Jews from the Lodz area of Poland and Roma were killed there in mobile gas vans.
The Gas Vans were not a substitution for the Zyklon B gas chambers, but the other way around, as the page in USHMM continues to point out that the first stationary gas chambers also used carbon monoxide exhaust from engines:
In 1942, systematic mass killing in stationary gas chambers (with carbon monoxide gas generated by diesel engines) began at Belzec, Sobibor, and Treblinka, all in Poland.
And that the Nazis switched to ZyKlon B because it was more efficient:
The Nazis constantly searched for more efficient means of extermination. At the Auschwitz camp in Poland, they conducted experiments with Zyklon B (previously used for fumigation) by gassing some 600 Soviet prisoners of war and 250 ill prisoners in September 1941. Zyklon B pellets, converted to lethal gas when exposed to air. They proved the quickest gassing method and were chosen as the means of mass murder at Auschwitz. At the height of the deportations, up to 6,000 Jews were gassed each day at Auschwitz.