  Blue energy relies on the chemical potential difference generated between
solutions of high and low ionic strength and would provide a sun-and-wind
independent energy source at estuaries around the world. Converting this
osmotic energy through reverse-electrodialysis relies on ion-selective
membranes. A novel generation of these membranes is based on atomically thin
MoS$_2$ membranes to decrease the resistance to current flow to increase power
output. By modulating the surface charge by light we are able to raise the ion
selectivity of the membrane by a factor of 5 while staying at a neutral pH.
Furthermore, we find that the behavior of small nanopores is dominated by
surface conductance. We introduce a formalism based on the Dukhin number to
quantify these effects in the case of a concentration gradient system. As a
consequence, the charges created by light illumination provoke two important
changes. Increased surface charge at the pore rim enhances the ion selectivity
and therefore larger osmotic voltage (dominating in small pores), while the
increased surface charge of the overall membrane enhances the surface
conductance and therefore the osmotic current (dominating in larger pores). The
combination of these effects might be able to efficiently boost the energy
generation with arrays of nanopores with varying pore sizes.
