There's a few posts like this on the Gentoo forums - what graphics card & driver are you using?
Code:
edit: not sure the solution I posted here is reliable /edit
Have a read
here and
here (the solution in the 2nd thread looks nice and simple, I haven't actually tried it)