The effects of thermal history and light-soaking are systematically studied on boron-doped a-Si:H and a-SiC:H. Light-soaking increases dark conductivity at a low carbon content but decreases it at a high carbon content. This reaction is reversible, and the dark conductivity recovers to the initial value with thermal annealing. The effect of thermal history is also influenced by carbon content in samples deposited at a relatively low temperature (110°C). The increase in dark conductivity occurs with thermal annealing at a higher temperature than the deposition temperature at a high carbon content. But this effect is not significant at a low carbon content. These phenomena can be explained by the hydrogen passivation of four-fold boron, and the hydrogen motion and trapping in the network. The present model suggests that a microstructure containing deep traps of mobile hydrogen contributes to improvement in the stability of a-Si:H and its alloys.