4 ms·
I have no solution for the web turning to complete shit but I do have a solution for the "laptop on fire" / fans going crazy and my solution even helps the plan
by TacticalCoder 3y ago
I have no solution for the web turning to complete shit but I do have a solution for the "laptop on fire" / fans going crazy and my solution even helps the planet a tiny little bit.
I do simply throttle my entire CPU when I'm on a virtual dekstop / workspace where there's a "surf the Web" browser opened (as opposed to, say, a workspace where I have a browser I use to test stuff in dev).
It's all automated from my window manager: everytime I switch workspace the maximum CPU speed allowed is modified. I go to workspace 3, where my editor/IDE is, the CPU governor is set to "ondemand" (i.e. the CPU can boost to 5.5 Ghz if it wants to). I go to other workspaces: the CPU governor is set to "powersave".
It's brutally efficient. No more noisy fans because this and that websites are busy executing oh-so-important JavaScript code to track me.
I don't bother modifying the max TDP of the GPU when I switch workspaces but I could (the reason I don't bother is that I'm using fanless GPUs in my two main machines).
It just works.
In the past I used to put CPU and RAM quota on processes/group running browsers but I find it much easier to just modify the CPU's power settings upon switching workspaces.
It's trivial to do and there's really not much websites can do about it. They can basically suck it.
- Conscat 3y agoThat's an interesting idea I might have to try out!
- thunderbong 3y agoThis is very interesting. Can you elaborate on this a bit more? I'm assuming this is Linux? How could this be achieved? Are there done special scripts or programs?
- zh3 3y agoJust write the desired governor to /sys/devices/system/cpu/cpu${X}/cpufreq/scaling_governor, e.g. powersave, performance etc. Poke about in there to see what governors are available, and do it in a loop to set all cores (you can get the number from /proc/cpuinfo).
- hammyhavoc 3y agoThis should be standard on every OS. What a beautiful use of workspaces.