Unable to activate USB debugging after upgrading to Android 5.1.1 After upgrading my Huawei phone (which is rooted) to Android 5.1.1 (CM 12.1) the 'USB debugging' option is greyed out with message:


  'Device is in charging mode, USB debugging is disabled'.


The message is present even when the cable is not connected.

I have already tried following solutions (but the USB debugging is still greyed out):


  Restarting the phone
  Disabling developer mode and enabling again
  Disabling developer mode, restarting the phone and enabling it again
  Removing the cable and trying all above solutions
Open settings and go to storage
Press menu and go to USB Storage Mode
Change to USB or MTP (NOT Charge only)
Disable and re enable Development options with the 7 clicks on Build Number


 
Screenshots (click images for larger variants)