Heavy and poorly working programs like TEAMS can take too much CPU time, but one way to limit CPU usage is to use cpulimit. I found a very good script from https://aweirdimagination.net/2020/08/02/limit-web-browser-processor-usage/ and
https://aweirdimagination.net/2020/08/09/limit-processor-usage-of-multiple-processes/
10 % persent may be too little, so 30% limit may be better. Add or remove programs from the list (firefox firefox-esr chromium chrome)
#/bin/bash
LIMIT=30 # Hard-code a limit of 10% CPU as an example.
# Kill child processes (stop limiting CPU) on script exit.
for sig in INT QUIT HUP TERM; do
trap "
pkill -P $$
trap - $sig EXIT
kill -s $sig "'"$$"' "$sig"
done
trap cleanup EXIT
# Find and limit all child processes of all browsers and zoom.
for name in firefox firefox-esr chromium chrome zoom
do
for ppid in $(pgrep "$name")
do
cpulimit --pid="$ppid" --limit="$LIMIT" &
for pid in "$ppid" $(pgrep --parent "$ppid")
do
cpulimit --pid="$pid" --limit="$LIMIT" &
done
done
done