  Close-packed chalcogenide spinels, such as MgSc$_2$Se$_4$, MgIn$_2$S$_4$ and
MgSc$_2$S$_4$, show potential as solid electrolytes in Mg batteries, but are
affected by non-negligible electronic conductivity, which contributes to
self-discharge when used in an electrochemical storage device. Using
first-principles calculations, we evaluate the energy of point defects as
function of synthesis conditions and Fermi level to identify the origins of the
undesired electronic conductivity. Our results suggest that Mg-vacancies and
Mg-metal anti-sites (where Mg is exchanged with Sc or In) are the dominant
point defects that can occur in the systems under consideration. While we find
anion-excess conditions and slow cooling to likely create conditions for low
electronic conductivity, the spinels are likely to exhibit significant $n$-type
conductivity under anion-poor environments, which are often present during high
temperature synthesis. Finally, we explore extrinsic aliovalent doping to
potentially mitigate the electronic conductivity in these chalcogenide spinels.
The computational strategy is general and can be easily extended to other solid
electrolytes (and electrodes) to aid in the optimization of the electronic
properties of the corresponding frameworks.
