endso may be on to something. Take the phone out of all protective cases and use it as the manufacturer intended. Does the function work? If so, you have your answer. If not, look in the settings or check if your sensors work. I believe there are apps in Openrepos to check the device hardware but I cannot tell you the names because my N9 is currently not working.