  Classifying endotrivial kG-modules, i.e., elements of the Picard group of the
stable module category for an arbitrary finite group G, has been a long-running
quest. By deep work of Dade, Alperin, Carlson, Thevenaz, and others, it has
been reduced to understanding the subgroup consisting of modular
representations that split as the trivial module k direct sum a projective
module when restricted to a Sylow p-subgroup. In this paper we identify this
subgroup as the first cohomology group of the orbit category on non-trivial
p-subgroups with values in the units k^x, viewed as a constant coefficient
system. We then use homotopical techniques to give a number of formulas for
this group in terms of the abelianization of normalizers and centralizers in G,
in particular verifying the Carlson-Thevenaz conjecture--this reduces the
calculation of this group to algorithmic calculations in local group theory
rather than representation theory. We also provide strong restrictions on when
such representations of dimension greater than one can occur, in terms of the
p-subgroup complex and p-fusion systems. We immediately recover and extend a
large number of computational results in the literature, and further illustrate
the computational potential by calculating the group in other sample new cases,
e.g., for the Monster at all primes.
