From RODV:
Allowing his lungs to fill with air, he thought: This is not breathing.
Here the med droids had truly failed him.
From a control box he wore strapped to his chest, a thick cable entered his torso, linked to a breathing apparatus and heartbeat regulator. The ventilator was implanted in his hideously scarred chest, along with tubes that ran directly into his damaged lungs, and others that entered his throat, so that should the chest plate or belt control panels develop a glitch, he could breathe unassisted fir a limited time.
So he could breathe erratically, but "glitch" isn't well defined, so it was not nessacarlily Lukes doing.