I have a Nexus 6 that I've been using now for almost a year.
Very recently, it started this odd behaviour of turning the screen black as soon as I swipe up to unlock it.
The screen works fine otherwise - it boots fine, it behaves in bootstrap and recovery mode, etc. The rest of the phone also seems to operate 'correctly' and I can see notifications occuring in the lock screen. There is no PIN or other unlock pattern - just the swipe upwards.
However, the moment that I try to unlock it, it goes black.
Apparently, there is a sensor for magnetic covers that can become biased and cause this issue. Some have noticed this occuring after prolonged use of a cover with a magnetic clasp - and sure enough, the phone has been used with one of these since when it was new.
Any ideas on how to fix this? Both a cache wipe AND a factory reset didn't solve the issue - which would be consistent with the cause above.
Some have suggested swiping a magnet to 'unbias' the sensor, but I am not sure about what kind of magnet and how to do this. Experiments with a fridge magnet have yielded no effect.