Share your experience!
When I start a call, the screen goes off, but it doesn't turn back on when I take the phone away from my ear. The screen remains off and I can't hung up or use any touch screen function
Hi @Mello1182, sorry to hear about this. 
Is this something that you have started to experience very recently? There is a sensor at the top of the display that controls this function and it's called proximity sensor. On the link below you can see where the sensor is placed (number 6).
https://support.sonymobile.com/global-en/xperiaxz1/userguide/overview---ki/
Is this sensor covered by anything, for example, a screen protector? If it is, it won't work correctly. You can also wipe this area of the display with a dry cloth to remove any dirt or moisture.
When you have done the above and made sure the sensor is not covered, make a phone call or test the sensor in the inbuilt test that you can find in Settings > Support > Xperia tests > Ear proximity.
Let me know if that helps! 