There were festivities on Dec. 4 to celebrate St. Barbara, the patron saint of miners. The miners wore fancy uniforms with plumed hats. During an interview at his small apartment, Mr. Janiszek insisted on putting on his old black uniform with a white-feathered cap. “Lots of orders were pinned to our chests,” he explained. “We all wore them with pride.”

Then the mines closed.

“We all lost our jobs, thousands of people, just like that, onto the street,” Mr. Janiszek recalled. “There was this idea that the coal mines were not profitable. The decision came from Warsaw; they all did it in haste.”

He hit the road. He picked grapes in Austria, harvested nuts and watermelons in Greece, worked on a pig farm in Switzerland. Eventually, he was deported back to Poland, penniless. He ran into an old apprentice who was working in the illegal rathole mines.

“He says, ‘Well, Roman, come with us and see what it looks like, see how it’s done,’ ” Mr. Janiszek recalled. “And I said to him, ‘O.K., I’ll do it.’ ”

So began a second life as a miner. There were no uniforms this time, and no parades. After a few years, he became an activist who organized protests on behalf of the miners. He wants the local police to stop harassing the miners and has hopes to make the work legitimate again. He was co-founder of an activist group with Grzegorz Walowski, 34, a former rathole miner who is now a doctoral student. Mr. Walowski studies advanced technologies like coal gasification, which can turn coal into gas without even taking it out of the ground.

“I can see a special role for the miners working now,” Mr. Walowski said. “They have an expert knowledge of where the coal is, and this is not so easy.”

It is unclear if such technologies will be cost-effective, but with Poland’s hunger for coal exceeding its production, the central government recently licensed an Australian company, Balamara Resources, to conduct research in Lower Silesia to determine whether mines could be reopened. The project is expected to take another couple of years to complete.