Galaxy Nexus does not charge when turned on
Do you happen to be using a 3rd party charger? 

500mAh chargers cannot charge the Nexus while on, 1Ah chargers can but might struggle. I recommend chargers with 1.5Ah for charging high-end devices

Alternatively, the problem might lie with the power management of your ROM. Have you also installed an app recently before this happened?