Unfortunately it is the px 3000 itself. It had been working fine for some time after a factory reset. Tonight I was playing just the keyboard no midi, just onboard piano itself and suddenly the sustain stuck on again. I removed the sustain pedal, that did nothing. I pressed other keys that did nothing but add to the sustain.
I had to turn it off and back on again to cure it.
Casio have said as its under warranty they will collect for repair, but as its an intermittent problem and can go for days or weeks before it happening again, it could be difficult to solve. They may say they cannot find the problem. So I may have to wait until either it happens more often before returning it for repair, or get shot of it and buy another brand to replace it.
My sustain pedal btw is a casio.