Its not Dock or display or enything else.I have nexus 4 and 5,it's just a proximity sensor issue.In nexus 4 it was dirty place on proximity sensor,nexus 4 have external proximity u can change it,but nexus 5 have integrated proximity sensor.So you have only 3 chances.1)Clean a proximity sensor place from dust with alcool.2)Replace faulty proximity sensor.3)Stop working proximity sensor with any app(if u do this you need to have rooted device).Don't try anything else,belive me.
+
+
=== Update (02/12/2017) ===
+
Its not Dock or display or enything else.I have nexus 4 and 5,it's just a proximity sensor issue.In nexus 4 it was dirty place on proximity sensor,nexus 4 have external proximity u can change it,but nexus 5 have integrated proximity sensor.So you have only 3 chances.1)Clean a proximity sensor place from dust with alcool.2)Replace faulty proximity sensor.3)Stop working proximity sensor with any app(if u do this you need to have rooted device).Don't try anything else,belive me.
Its not Dock or display or enything else.I have nexus 4 and 5,it's just a proximity sensor issue.In nexus 4 it was dirty place on proximity sensor,nexus 4 have external proximity u can change it,but nexus 5 have integrated proximity sensor.So you have only 3 chances.1)Clean a proximity sensor place from dust with alcool.2)Replace faulty proximity sensor.3)Stop working proximity sensor with any app(if u do this you need to have rooted device).Don't try anything else,belive me.