Bacteria which perform photosynthesis in absence of oxygen uses H2S instead of H2O. So, S2 gas is produced instead of O2.