TL;DR – if you’re going to customise your phone, always ensure that the firmware version matches the Android version in the ROM. A mismatch can cause very slight and subtle bugs!

I noticed that my HTC One, customised with the Android Revolution HD ROM (Android 4.3) and the Team7even kernel, had a problem whereby the screen would switch off as soon as I started a phone call (even if I did not bring the phone close to my head) and would not switch back on even after the call completed; I would have to wake it up with the button.

Using a phone tester app from Play Store I worked out that the proximity sensor had stopped responding. I furthermore worked out that it was fine immediately after turning on the phone, but after the first time it entered deep sleep then the problem would express itself.

A lot of digging and testing later I have worked out that it was caused by a mismatch of the phone firmware (Android 4.1-based – v1.29.631.17) and the ROM Android version (4.3). Non-trivial to fix; I had to go back to stock everything (good thing I kept a Nandroid of my stock ROM from when I first got the phone) so as to be able to pick up the OTA upgrade to Android 4.3 (3.22.631.1). This cleanly upgraded the phone firmware, from which I’m now free to install any ROM (just so long as it is based on Android 4.3!).