GaN-based ultraviolet (UV) photodetectors (PDs) separately prepared with a conventional single low-temperature (LT) GaN buffer layer and a 12-pair MgxNy-GaN buffer layer were both fabricated. It was found that we could reduce threading dislocation (TD) de