This sensor seems to be enabled by CM. Every device I've owned, from every manufacturer has worked fine until I flash CM (Samsung, HTC, LG). When I put the phone on my magnetic dock on a stock ROM, the screen works fine. On a CM rom, it will turn my screen off.
I guess until this module is updated for 5.1 I'm SOL. I wish CM would bake in a option to disable this from the settings.