Running hot? cgroups!
My #notebook contains a #fan. It's one of the compromises I made when I selected it. I do not want it to run.
To keep it quiet I limited the #cpu #frequency to about 70% and disabled frequency boost. No fan running. Downside: UI can't just demand more CPU if something makes me wait. Demanding a lot of CPU over a short time doesn't make the fan run and makes the whole UI more snappy.
Today I had the fan running constantly when I started working: One of two #Thunderbird instances I use started background activity and it kept running and running and the fan blowing and blowing.
I rarely use Thunderbird, but I need it opened to look at my email once in a while and get notified if there's something new. I know, I could do it differently, but at least at work thunderbird is the officially supported way to work with email.
#cgroups allow to control the ressources used by the tasks running in a cgroup. After stopping thunderbird running wild, I did the following (#Debian #Bookworm / #PureOS #Crimson):
someuser@pureos:~$ cat .config/systemd/user/thunderbird.slice [Slice] CPUQuota=30% someuser@pureos:~$ systemctl --user daemon-reload someuser@pureos:~$ systemd-run --user --slice=thunderbird.slice thunderbird Running as unit: run-r671b7cde254945c597a409b9a96cdaf5.service
Thunderbird resumed whatever it wanted to do and didn't use more than 30% CPU, no fan running. The UI of Thunderbird became slow, but that is a compromise I can live with since I do not use it much.