Ah, more speculation on dwarven biology. Excellent. Before getting into complex physiologies, I think we should look at applying some simpler concepts, like basic physics.
Okay. Consider that a dwarf locked in a chamber deep underground needs only some plump helmet spawn, a barrel, some moisture, and a rock to make a still out of. If his food was given to him, he wouldn't even need these to survive until the end of his natural lifespan, and if he had an exceptional gold statue or something he'd be deliriously happy about his decades of isolation and loneliness too.
Now, a dwarf does not produce excrement. Hence, this sort of closed ecosystem would seem to be impossible: where do the plump helmets go after being eaten? Where does the spawn get enough matter to mature? One ridiculous explanation that just came to me was this: the plump helmets are turned directly into energy. Booze is required for this process, though water can be used as a less efficient stand-in. Now, when dwarves do stuff, they don't produce waste heat of any sort: the kinetic energy could therefore be turned into some other form of energy, which disperses across the planet. When plump helmets grow, they turn this energy directly into matter. This would require some tinkering with the energy-to-matter conversion ratio, however.
That's ridiculous, but perhaps the matter gets there some other way. Dwarves reproduce using spores or possibly telepathy, right? What if matter is transmitted to crops in a similar way? The latter would require teleportation, and the former would mean clouds of stuff floating around that dwarves would probably breathe in (hey, reason why dwarves die when their lungs are damaged: the lungs are their method of expelling waste and reproductive spores, and without them, their body gets all clogged up). The clouds of waste might work, but perhaps they get there another way. Remember purring maggots? Dwarves could live in symbiosis with them: the things live in their intestines or whatever, and when they're full, they crawl away to the farms. The matter is stored in the form of dwarven milk. I don't see what the maggots get out of it, however, so maybe it's more like commensalism than mutualism. I don't know, maybe the maggots are created by dwarves, like little waste delivery drones?
As for how the plants give the dwarves energy when no energy comes to them, this has been worked out by wise men already. When the matter gets to the plant, it is combined with water (that's why irrigation or soil is necessary to grow subteranean crops) to make perpetual motion machines. As the plant matures, the energy produced is used to convert the machines into some molecule that contains chemical potential energy. When the potential energy is converted into kinetic energy by dwarves, it dissipates because friction doesn't generate heat.
All of that relied on conservation of mass and energy, even though I completely ignored it in the last paragraph. Oh well. So yeah, I guess I ignored the question of respiration and how the chemical potential energy is released, but I'm not going to think about that. I refuse to.