We use a 1-D numerical model to study the atmospheric photochemistry of oxygen, methane, and sulfur after the advent of oxygenic photosynthesis. We assume that mass-independent fractionation (MIF) of sulfur isotopes – characteristic of the Archean – was best preserved in sediments when insoluble elemental sulfur (S8) was an important product of atmospheric photochemistry. Efficient S8 production requires three things: (i) very low levels of tropospheric O2; (ii) a source of sulfur gases to the atmosphere at least as large as the volcanic SO2 source today; and (iii) a sufficiently high abundance of methane or other reduced gas. All three requirements must be met. We suggest that the disappearance of a strong MIF sulfur signature at the beginning of the Proterozoic is better explained by the collapse of atmospheric methane, rather than by a failure of volcanism or the rise of oxygen. The photochemical models are consistent in demanding that methane decline before O2 can rise (although they are silent as to how quickly), and the collapse of a methane greenhouse effect is consistent with the onset of major ice ages immediately following the disappearance of MIF sulfur. We attribute the decline of methane to the growth of the oceanic sulfate pool as indicated by the widening envelope of mass-dependent sulfur fractionation through the Archean. We find that a given level of biological forcing can support either oxic or anoxic atmospheres, and that the transition between the anoxic state and the oxic state is inhibited by high levels of atmospheric methane. Transition from an oxygen-poor to an oxygen-rich atmosphere occurs most easily when methane levels are low, which suggests that the collapse of methane not only caused the end of MIF S and major ice ages, but it may also have enabled the rise of O2. In this story the early Proterozoic ice ages were ended by the establishment of a stable oxic atmosphere, which protected a renewed methane greenhouse with an ozone shield.