Hi,
The problem seems to be in the power source and not in your CPU.
May be the wires inside the switch board are tangled or have some sort of issues. Or there is a possibility that the switch might be connected to the same neutral line. In such cases also your problem might occur, but it a very rare case.
Actually it is strange. Or may be your CPU wants your presence always in the vicinity, to work consistently.
There is a chance that your CPU is getting overheated, due to heat sink failure and is switching OFF automatically. But since, you realized it only after switching the other room lights, you might have mistaken it.
The problem seems to be in the power source and not in your CPU.
May be the wires inside the switch board are tangled or have some sort of issues. Or there is a possibility that the switch might be connected to the same neutral line. In such cases also your problem might occur, but it a very rare case.
Actually it is strange. Or may be your CPU wants your presence always in the vicinity, to work consistently.
There is a chance that your CPU is getting overheated, due to heat sink failure and is switching OFF automatically. But since, you realized it only after switching the other room lights, you might have mistaken it.