In Wildpoldsried, a village of 2,600 a short drive from the farm, around €40 million has been invested over the years — much of it by residents — into an array of renewable power sources and improvements in energy efficiency. The brightly painted, wood-trimmed houses are heated cheaply by generators fueled by methane gas from cow manure, and wind turbines nearly 500 feet tall provide electricity from the hillsides.

Günter Mögele, Wildpoldsried’s deputy mayor and energy coordinator, said that the village’s decision in the late 1990s to focus on renewable energy had paid off.

Overall, the village generates about seven times as much energy as it consumes, and the surplus is sold to the grid. The income from solar panels on public buildings is fed back into the public purse. It is often doled out to subsidize residents’ shifts to green power, and to reduce fees for the local music club and sports facility.

But renewable energy subsidies are financed through electric bills, meaning that Energiewende is a big part of the reason prices for consumers have doubled since 2000.

These big increases “are absolutely not O.K.,” said Thomas Engelke, team leader for construction and energy at the Federation of German Consumer Organizations, an umbrella organization of consumer groups.

The higher prices have had political consequences.

The far-right party Alternative for Germany, which won enough support in the recent elections to enter Parliament, has called for an “immediate exit” from Energiewende. The party, known by its German initials AfD, sees the program as a “burden” on German households, and many supporters have come into its fold in part because of the program’s mounting costs.