Defect levels of dangling bonds in silicon and germanium are determined within their respective band gaps through the use of hybrid density functionals. To validate our approach, we first considered the dangling bond in silicon finding two well-separated defect levels in excellent correspondence with their experimental location. Application to the dangling bond in germanium then yields two very close defect levels lying just above the valence band, which is consistent with the experimental location of the charge neutrality level. The occurrence of negative-U behavior leads to a reduced fraction of neutral dangling bonds, thereby suppressing the electron-spin-resonance activity.