I posted this a few days ago for someone else, and as it's ignition related you may as well read it and try it too, it'll be something else to cross off the list, and you never know, it may even help!
"...I was having trouble starting my bike for ages, maybe even up to two years, and some days it would be fine but other days it would cause all sorts of pain. The main thing was backfiring in colder climates. The problem with that was that i used to park my bike right next to our glass fronted reception at work, and it used to scare the crap out of the receptionists with a massive bang before it turned over, then it would run sweet as a nut.
Over time i replaced electrical parts, plugs, clipped HT leads, bypassed the side stand switch, etc, but it still quite randomly misbehaved.
One evening i had the same shit happen again but after starting it i rode off but it then conked out after about a minute. After eventually getting it started again and getting home the way the engine had just died immediately as if the key was turned off led me down a new search on the internet, and it was suggested that the ignition switch could be the fault.
Over a long time i had used WD40, graphite powder, and even oil to try and lube the ignition, but also learned that it wasn't just a simple on/off switch, it consisted of several contacts in the barrel that got connected.
So i already had a can of electrical contact cleaner at home and decided to saturate the hell out of the ignition barrel, also using the key to move things about a bit as well while still using the spray.
It TOTALLY sorted it out. As simple as that, it was dirty contacts in the barrel caused by many different things i'd tried over the years, presumably causing a paste or congealing inside, which got worse in colder weather or could be unpredictable if rain got down there, it obviously moved things about a bit then just dried up again, which was why it was so hit and miss.
Worth knowing for future reference anyway, reading your post earlier brought it all back to me.
Just drench it in proper Electrical Contact Cleaner Spray, but NOT a degreaser spray which will dry it out too much and will likely leave a powdery residue, and not WD40 which is a bit too oily and will eventually attract dust..."