In his opening speech on Wednesday to the congress, Mr. Xi warned that the party had to improve its performance at addressing social grievances.

“The principal contradiction facing society in the new era is that between unbalanced and inadequate development and the people’s ever-growing need for a better life,” Mr. Xi told delegates in the Great Hall of the People in Beijing.

But in Datong, a broad area of 3.4 million people that includes an urban center and surrounding coal fields and countryside, locals say that the official fixes often create their own new problems. They said the directives from the capital were enacted in a heavy-handed manner that could hurt locals. And even with the anticorruption crackdown, local officials benefit the most from the changes, not regular people.

“I don’t have a home anymore,” said a woman in Xiaoyaotou, a village near an abandoned coal mine in Datong. She would not give her name, fearing that speaking out would get her in trouble. She made a little money scavenging and selling bricks from her demolished village, where she said her home had been torn down in April.

“There are still houses left in my village,” she said. “They are for the government officials to stay in. We are not allowed to stay in those houses.”

In Datong, the sense of dislocation is especially acute.

Famed for its ancient Buddhist rock carvings, the city became China’s coal capital as demand for the energy resources that lay beneath its surface took off along with Chinese manufacturing in the 1980s. A decade later, at peak production, Datong provided 7.5 percent of China’s coal. The result was an extended boom that created a wealthy class of mine barons and officials.