As some of you may know, there is a common problem in some old notebooks, between battery and adapter, which is when charger plugged in, computer restarts itself, and this is a real pain in the neck.
There are one or two different solutions for this problem, for example, the one can disable the second CPU via Device Manager in Windows' safe mode and by this way restarting would be prevented. But you know, things work different in Ubuntu, there isn't any chance to disable the second CPU via "Device Manager" since there is not any "Device Manager". So I was looking for a appropriate solution and I found one. There is a terminal code that let me disable the second CPU, which is:
echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online
When I enter this command, it works like a charm and there is no problem, but the problem is, after shutting down the computer and reopening it, CPU enables itself automatically.
So that's the problem. Sometimes I forget to enter this command and thus my laptop repeats itself and my whole work goes into trouble.
Is there any way to make this command "permanent" ? Or is there any other way to disable the second CPU?