What causes wet slate (and other rocks) to smell?

I have had surprisingly little luck finding anything with a Google search for this, so I thought this would be a good place to ask: what causes that “mineral/earthy/alkaline/clay” smell that certain rocks emit when they get wet?

I ask as I just moved in to a place with a fair bit of slate (kitchen/bathroom floors and parts of some walls). I noticed a strange smell sometimes when showering, and discovered that it was linked to when the slate pieces above the shower got wet (I confirmed this by spraying some water one of of the other slate walls in my house and smelling it).

Thinking back, I realize that I’ve smelled something similar around certain creek beds. Does anyone know how getting rocks wet can actually cause them to smell? It seems weird to me that the simple act of wetting a rock causes particles that you can smell to become airborne.

On a related note, would anyone recommend any slate treatment methods for reducing this phenomenon?

There is a word for this called Petrichor.
The smell is from a substance called geosmin in the oils of the rock. Someone told me that it smells like dried cyanobacteria - can’t vouch for this though.