I remember reading some time ago that after the Sun runs out there's only enough energy in a state fit for fusion for like one or two more generations of stars in the universe, and after that the universe will go dark forever.
That may be true, but it's worth noting that the length of a "generation" of stars varies wildly depending on the type of star. Stars like our Sun might only live 10 billion years or so, but red dwarfs live 100 billion years or more so we could presumably live around them long after all the Sun-like stars have burned out.
If you have a bunch of matter (dead stars, planets, interstellar dust) is there some fundamental reason this can't be dumped into accretion disks, etc. in an energy-positive way?