In addition to chemosynthesis by living organisms, carbon dioxide can be reduced to methane and more complex hydrocarbons by serpentization.
Serpentization is a high-temperature, high-pressure reaction between mafic minerals (principally olivines and pyroxenes) and water to form a less mafic mineral, from the serpentine group (including serpentine itself and talc, among others). The reaction displaces iron and magnesium oxides. The magnesium oxide is purely basic and emerges combined with water to form magnesium hydroxide (brucite) or perhaps with carbon dioxide to give magnesium carbonate (magnesite) or other carbonate minerals. The iron oxide is a reducing agent, tending to convert from the $\ce{FeO}$ component of the mafic minerals to $\ce{Fe3O4}$ (magnetite) with displacement of hydrogen from water. As described in the Wikipedia article, carbon dioxide may also be reduced, especially in the presence of the water, to produce hydrocarbons:
Laboratory experiments have confirmed that at a temperature of 300 °C (572 °F) and pressure of 500 bars, olivine serpentinizes with release of hydrogen gas. In addition, methane and complex hydrocarbons are formed through reduction of carbon dioxide. The process may be catalyzed by magnetite formed during serpentinization.[1] One reaction pathway is:[2]
$\ce{18\overset{forsterite}{Mg2SiO4} + 6\overset{fayalite}{Fe2SiO4} + 26 H2O + CO2 -> 12\overset{serpentine}{Mg3Si2O5(OH)4} + 4\overset{magnetite}{Fe3O4} + \overset{methane}{CH4}}$
Serpentization is widely studied by planetary scientists because when they search for signatures of life, they reckon with serpentization as an alternate source of the organic matter they observe -- and as a source for the raw materials organisms might use.
Cited References
Berndt, Michael E.; Allen, Douglas E.; Seyfried, William E. (1 April 1996). "Reduction of CO2 during serpentinization of olivine at 300 °C and 500 bar". _Geology 24 (4): 351–354. Bibcode:1996Geo....24..351B. DOI: 10.1130/0091-7613(1996)024<0351:ROCDSO>2.3.CO;2.
Russell, M. J.; Hall, A. J.; Martin, W. (2010). "Serpentinization as a source of energy at the origin of life". _Geobiology 8 (5): 355–371. https://doi.org/10.1111/j.1472-4669.2010.00249.x. PMID 20572872. S2CID 41118603.