Best indications are that a series of super-volcanic events triggered massive drought, which probably led to drying conditions and decreased sunlight for photosynthesis, which triggered massive fires which burnt up tons of oxygen and caused hypoxic conditions for tens of thousands of years. This whole episode is also associated with geomagnetic instability [2]. Now, the two are related, because geomagnetism is caused by movement of the inner and outer core of the Earth. If the earth sees periodic disruptions in the normal movement of the cores, I can easily imagine that to trigger massive volcanic activity.
Now, in that case, a release of CO2 occurred from all the plant matter dying off as a result of drought, fire, flood, and volcanism. The CO2 itself didn't cause the extinction. The volcanism caused the extinction.
[1] http://www.biocab.org/Geological_Timescale.jpg [2] https://www.sciencedirect.com/science/article/abs/pii/S13429...
And stop reading bad science.