The Yamaha YPG-225 has 4 ribbon cables attached to the keyboard. The keyboard is in two separate sections: The lower 33 keys (E to C) with a 6-wire ribbon cable going to the main board, and the upper 43 keys (C# to D) with an 8-wire ribbon cable going to the main board. These two ribbon cables carry octave sensing for groups of 6 keys, at most, across the keyboard. So if a group of 6 contiguous keys are not working, it will mostly likely be a problem with one of the wires in these ribbon connectors not making the connection to the main board.
There are also two ribbon connectors with 12 wires. There is one short jumper ribbon connector between the two keyboard sections and one long one to the main board. These ribbon connectors carry key note information, all the keyboard "C" keys on one wire, all the C# keys on another wire, etc. So, if all the "C" keys are not sounding, it is probably a broken connection in one of the wires in the two 12-wire ribbon connectors.
I was able to fix a problem on the upper part of the keyboard. All the "E" keys and "A#" keys were intermittently not sounding. If the 12-wire jumper cable socket on the upper keyboard side was rocked, the problem either went away or got worse with more keys not sounding.
First I tried disconnecting the jumper ribbon cable at its two sockets, cleaning the wires, and then reconnecting. Do this by using your fingernails to push up the two ends of the socket to unlock it. Pull out the ribbon cable, clean it, then reinsert the ribbon cable wires all the way and then push down the two ends of the socket to lock it back in. The sockets are on the bottom of the keyboard circuit boards, so yes, you do have to remove all the keys, and all those circuit board screws.
This didn't work. I assume there must have been cracked connections around the ribbon cable socket, or the socket was no longer holding the cable wires tightly. The plastic on one edge of the keyboard case was cracked open so, at one point, the keyboard must have been dropped.
I finally ended up overriding the jumper ribbon cable with soldered connections between the two sockets using single strand wire-wrapping wire. Make sure you get the connections right. There is one 12-pin socket on the upper key circuit board. Another one on the lower key circuit board for the jumper - these pins are in reverse order. And finally there is a third 12-pin socket on the lower key circuit board for the main long ribbon cable to the main board - these pins are reversed again. All the 12 pins in these 3 sockets should be connected. I soldered the first and third socket connections together with 12 wires.
A couple extra thoughts: First, the keys come off in octave or less sections. The sections are locked into place with two plastic clips at the top of the keys. Push in one clip at a time and gently lift at the top corner of the key section to remove it. If you are gentle, the black and white keys can stay together as one unit. Second, I don't believe the black carbon cylinders inside the rubber gaskets need cleaning as much as the circuit board traces that they contact. The traces are easy to clean. Remove the rubber gaskets, spray some isopropyl alcohol or Cramolin on a cloth and then wipe along the traces.