Late in the reign of Emperor Wen (some time between 601 and 604), Yang Gongren became the governor of Gan Province (甘州, roughly modern Zhangye, Gansu). It was said that he had a good grasp on general governance and intentionally refused to dwell on details, and that in doing so comforted the non-Han residents of the province. It was said that Emperor Wen told his father Yang Xiong, "Gongren governs the province well. It is not only that I selected the right person, but because you have taught him in the ways of righteousness."