I've been studying the effects of surface states in semiconductors (in the absence of interfaces, so just semiconductor-vacuum), and am struggling with the concept of depletion/accumulation layers. I've read quite a few texts on the subject, and each of them always deals with n-type or p-type semiconductors. But I don't know what would happen in the case of the undoped semiconductor.
Take for example the case of an n-type semiconductor with acceptor surface states as depicted in the figure below, not so graciously taken from Solid Surfaces, Interfaces and Thin Films by Lüth. One has acceptor states around the middle of bandgap that are partially filled, resulting in a negative surface charge. This negative charge is then compensated by the depletion layer, consisting of ionized donors.
Conversely, one could take partially filled donor like states near the bandgap middle and a p-type semiconductor; this results in a positively charged surface and a negative depletion layer due to occupied bulk acceptors.
But now my question comes: how do these scenario's work for undoped semiconductors? Surface charges will still form, and they still need to be compensated by space charge layers, but in the absence of donor/acceptor dopants to be depleted/occupied, how does this happen?