Hello everyone,
so i got the Idea of disabling some cores on my laptop for increasing the battery lifetime. Which it does, when disabling the cores manually.
So i tried to write a code in C for disabling the cores automatically, but the code fails at the point where i try to open the "online" file with fopen(path,"w") under the "/sys/devices/system/cpu/cpuN/" path with a segmentation fault. Where N is a digit from 1-7 (Since the 0th core does not contain the online file).
Is this behaviour normal? Because i can open it with the "r" parameter..
Or have i did something wrong with opening and closing the file (Which I think I have).
I'll post in following my code.