Hydrogen sulfide gas, (H2S), is a major source of odour in wastewater systems. H2S gas has a characteristic 'rotten egg' smell. This gas results from the reduction of sulfate (SO4-2) to hydrogen sulfide (H2S), by anaerobic bacteria:
SO4-2 + 2C + 2H2O → 2HCO3- H2S
It is a highly corrosive and toxic gas, and it is soluble in wastewater.
At a pH = ~9, around 99% of the dissolved sulfide occurs as HS-, which is non-odorous. This means if the wastewater is maintained at around pH=9, odorous H2S gas is not released. While at pH>9 odorous ammonia (NH3) is released.