What leads to increase in opacity in kappa mechanism? I understand that the kappa mechanism (that leads to star variability) causes an increase of opacity with increasing temperature in partial ionization zones.  However, I'm not sure I understand what causes the increasing opacity with temperature.

Until recently, I thought that the increasing opacity was due to increasing Thompson opacity due to the increasing ionization fraction with temperature in partial ionization zones.  However, some things I read suggested that that was not the cause.  So I wanted to ask, what is the cause of increasing opacity with temperature in partial ionization zones?
It's a bit subtle, the key thing the partial ionization does is to keep the temperature from changing much.  What you really want is an increase in density, not temperature.  The reason the kappa mechanism is important is that it allows heat to be added to the gas when it is compressed, and removed when the gas is expanded, that's what allows for the pulsation to have energy added to it.  Heat is added when the opacity is high, and removed when low, so you need the opacity to go up when the gas is compressed, and go down when the gas is expanded.

Now, normally opacity goes down when gas is compressed, because the rise in temperature causes ionization, which actually hurts metal opacity by reducing the number of bound electrons (metal electrons have higher opacity in general when bound, due to resonances, than when free, though the hydrogen and helium we had in the Big Bang are an exception that works the other way-- in a star, it is usually metal opacity that is important and variable).  But increases in density also tend to produce more bound metal electrons, so there's a competition there that temperature usually wins and stars are pulsationally stable.  But in partial ionization zones, temperature changes are reduced by the phase changes eating up the excess energy, and that gives the density increase the edge that allows opacity to rise when the gas is compressed.