Running Zoom hogs up CPU - high fan noise

Hello everyone!

Zoom on Linux is quite resource intensive - I could find multiple links where people have reported high CPU usage when Zoom runs on their systems; but I could not really find any reliable solution to it, apart from tweaking the Zoom settings as mentioned here, and a script to limit the CPU and memory. I have tweaked my settings, but not went ahead with the linked script, as my system anyways has 4 logical CPUs and couldn't find systemd under $HOME/.config/.

Therefore, I am wondering if there are ways to optimize Zoom's CPU usage (thus, lower down the high fan noise) on my Macbook Pro 2015 model running Garuda dragonized? Please let me know if any suggestions!

P.S. I recently freshly applied thermal paste and have cleaned by system internally. garuda-inxi output below:

Kernel: 6.0.10-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=3b9186f6-a3ee-4548-95dc-048a2804b985 rw [email protected]
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=1dc61dfb-3521-41db-b272-be8214602c50 loglevel=3
Desktop: KDE Plasma v: 5.26.3 tk: Qt v: 5.15.7 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: Apple product: MacBookPro12,1 v: 1.0
serial: <superuser required> Chassis: type: 9 v: Mac-E43C1C25D4880AD6
serial: <superuser required>
Mobo: Apple model: Mac-E43C1C25D4880AD6 v: MacBookPro12,1
serial: <superuser required> UEFI: Apple v: 430.140.3.0.0 date: 04/18/2022
Battery:
ID-1: BAT0 charge: 69.8 Wh (100.0%) condition: 69.8/72.3 Wh (96.5%)
volts: 12.5 min: 11.3 model: ifixit bq20z451 type: Li-ion serial: N/A
status: full cycles: 39
CPU:
Info: model: Intel Core i5-5257U bits: 64 type: MT MCP arch: Broadwell
gen: core 5 level: v3 note: check built: 2015-18 process: Intel 14nm
family: 6 model-id: 0x3D (61) stepping: 4 microcode: 0x2F
Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
L3: 3 MiB desc: 1x3 MiB
Speed (MHz): avg: 2730 high: 2769 min/max: 500/3100 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 2769 2: 2702 3: 2700
4: 2750 bogomips: 21598
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: mmio_stale_data status: Unknown: No mitigations
Type: retbleed status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
STIBP: conditional, RSB filling, PBRSB-eIBRS: Not affected
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel Iris Graphics 6100 vendor: Apple driver: i915 v: kernel
arch: Gen-8 process: Intel 14nm built: 2014-15 ports: active: eDP-1
empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:162b
class-ID: 0300
Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.5
compositor: kwin_x11 driver: X: loaded: modesetting
alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 2560x1600 s-dpi: 168 s-size: 387x241mm (15.24x9.49")
s-diag: 456mm (17.95")
Monitor-1: eDP-1 model: Apple Color LCD built: 2013 res: 2560x1600 hz: 60
dpi: 227 gamma: 1.2 size: 286x179mm (11.26x7.05") diag: 337mm (13.3")
ratio: 16:10 modes: 2560x1600
API: OpenGL v: 4.6 Mesa 22.2.3 renderer: Mesa Intel Iris Graphics 6100
(BDW GT3) direct render: Yes
Audio:
Device-1: Intel Broadwell-U Audio vendor: Apple driver: snd_hda_intel
v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c class-ID: 0403
Device-2: Intel Wildcat Point-LP High Definition Audio
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:9ca0
class-ID: 0403
Device-3: Broadcom 720p FaceTime HD Camera driver: N/A pcie: gen: 2
speed: 5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 14e4:1570 class-ID: 0480
Sound API: ALSA v: k6.0.10-zen2-1-zen running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.60 running: yes
Network:
Device-1: Broadcom BCM43602 802.11ac Wireless LAN SoC vendor: Apple
driver: brcmfmac v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
bus-ID: 03:00.0 chip-ID: 14e4:43ba class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Bluetooth:
Device-1: Apple Bluetooth Host Controller type: USB
driver: btusb,hid-generic,usbhid bus-ID: 1-3:2 chip-ID: 05ac:8290
class-ID: fe01
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
Local Storage: total: 233.76 GiB used: 34.59 GiB (14.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Apple model: SSD SM0256G
size: 233.76 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: SA0Q scheme: GPT
Partition:
ID-1: / raw-size: 224.66 GiB size: 224.66 GiB (100.00%)
used: 34.59 GiB (15.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 652 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 224.66 GiB size: 224.66 GiB (100.00%)
used: 34.59 GiB (15.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 224.66 GiB size: 224.66 GiB (100.00%)
used: 34.59 GiB (15.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 224.66 GiB size: 224.66 GiB (100.00%)
used: 34.59 GiB (15.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.67 GiB used: 241.2 MiB (3.1%)
priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/sda3 maj-min: 8:3
Sensors:
System Temperatures: cpu: 70.0 C pch: 65.5 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 240 Uptime: 1h 24m wakeups: 2 Memory: 7.67 GiB
used: 5.54 GiB (72.3%) Init: systemd v: 252 default: graphical
tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman
pkgs: 1275 libs: 314 tools: octopi,paru,yaourt Shell: fish v: 3.5.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.23

I gave the script a quick look, if there isn't a systemd folder in .config just create it

mkdir -p ~/.config/systemd/user/

the script will drop a zoom.slice text file there and systemd will use it. #gistcomment-4015267

Change the max allocations to fit your workstation.

In your case you would tweak the settings there, let's say 2 CPUs and a reasonable amount of RAM leaving enough for the rest of the system (not sure what to advise, the default 6GB may be OK if a bit high). You'd probably have to fiddle with the limits to find out what works best.

Another thing to try is the power-profile-daemon that can be activated in garuda-assistant > "Settings" tab > "Powersave Tweaks".

Other than this, I don't know, I never used Zoom.

3 Likes

Did you try using Zoom on a browser with hardware acceleration enabled?

3 Likes

Thank you @meanruse for looking into it! I did as you suggested for the script (dumb me that I did not look into the Github thread). I see that a zoom.slice file is created with my choice of #CPU = 2 and memory = 4GB. But when I ran Zoom, I could see all the 4 threads peaking close to 100% on htop - I expected only two; memory didn't peak. Throughout the session, I could hear the fan running high.

Next I enabled the Powersave Tweaks, and during another similar Zoom session, the fan was mostly quiet; I could still see the 4 threads peaking on htop. I checked the sensors and they were around 75 to 80 degrees C during the Zoom session.

Note that one or two tabs on FireDragon and one to two Konsole windows were open during both the above scenarios, and the 4 threads were not necessarily at 100% usage all the time, rather between 40% to 85% (visually) most of the time.

So, in a way Powersave Tweaks helped curbing the Fan noise, but at the risk of high CPU temperature, so I guess, my next question is - is having the CPU at more than 75 degrees for long session times fine? will it shorten the span of my system in any way? or should I undo the Powersave Tweaks and keep the fan running during the session?

Thank you @mrvictory for looking into my post! As you would read in my post above, Powersave Tweaks is looking promising. But I will keep in mind about running Zoom through a hardware accelerated browser. I suppose to test out your suggestion, I need to uninstall Zoom app and start the session on browser - as right now it straightaway directs to the app itself.

Upon your suggestion to use a hardware accelerated browser, it brings me to a tangential question which I have been meaning to ask on this forum for some time. I used to notice a high CPU usage as well as high fan noise when running YouTube - both on FireDragon and Opera I installed. After searching a lot around the issue, I zeroed in on this link, and installed the required packages (and I remember enabling the vulkan one somewhere on my laptop). I don't remember exactly what I did next - i.e. did I run YouTube right then and there or updated my system first, but of late I have been noticing that YouTube on FireDragon doesn't increase my laptop's temperature (on Opera it still does but probably less).

What I am trying to get to is... was it the drivers that I installed from the above link that help or was hardware acceleration enabled/optimized on FireDragon during subsequent updates? or both? I am just curious here, looking for a general info.

Sorry it did not work.
My hope was that the "power-saver" mode, by reducing power consumption, would have also lowered the heating.
Next one to try (which I should have advised first, but my head was somewhere else) is adding and enabling thermald , thermald alone, auto-cpufreq + thermald.
Not sure if they will need some configuration, maybe not (they should come with sane defaults).


I could see all the 4 threads peaking

Can you post the zoom.slice contents and the Exec= line from the Zoom.desktop?
Also, I'm not sure if it's cores or threads that are used in AllowCPUs.

Next I enabled the Powersave Tweaks

Which ones exactly, "Powersave tweaks", "Power-profiles-daemon"+"Power-profiles-daemon enabled", all of them? Again, I'm not sure what the best combination is, and actually if there was a "good for all" best configuration there wouldn't be so many options to choose from.

around 75 to 80 degrees C during the Zoom session

How high did it get without powersave?

is having the CPU at more than 75 degrees for long session times fine? will it shorten the span of my system in any way

I'm afraid it's stepping in the danger zone.
I think the CPU itself should tolerate that, but laptops in general don't have proper cooling and there's a risk to damage something.

should I undo the Powersave Tweaks and keep the fan running

If it made the heating worse I'd say yes.


Apologies if my advice is just hand waving, I'm no expert... just trying to become one.

1 Like

NP @meanruse ! We are all learning! Glad that you are looking into my issue. So following are the outputs you wanted.

zoom.slice:

[Slice]
AllowedCPUs=0-2
MemoryHigh=4G

where my script chill_zoom.sh is:

#!/usr/bin/bash -xe

cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-2
MemoryHigh=4G
EOF

cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-ru
n --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications
/Zoom.desktop"

update-desktop-database ~/.local/share/applications

Following is Zoom.desktop output, where you will find your Exec= line:

~❯ cat /usr/share/applications/Zoom.desktop
[Desktop Entry]
Name=Zoom
Comment=Zoom Video Conference
Exec=/usr/bin/zoom %U
Icon=Zoom
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
StartupWMClass=zoom
MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/zoomphonecall;application/x-zoom
X-KDE-Protocols=zoommtg;zoomus;tel;callto;zoomphonecall;
Name[en_US]=Zoom
~❯

For the "Powersave tweaks" , "Power-profiles-daemon" + "Power-profiles-daemon enabled" and "Thermald" + "Thermald enabled" were enabled. In fact, I checked both the boxes for auto-cpufreq later after some Google search. So as of now, the boxes for "auto-cpufreq" and "thermald" are checked (not those of "Power-profiles"). Yet to have a Zoom session on my laptop, but as of now, I have the Zoom slice as above and the above-mentioned powersave tweaks enabled (thermald + auto-cpufreq). Next time I would have a Zoom session, I will keep track of the CPU usage etc. I am changing the Zoom.slice contents to "AllowedCPUs=0-1" now.

WRT the temperatures, I did not keep track of it without powersave. I will check if the Fans run this time with thermald + auto-cpufreq. I understand that there are powersave combinations to choose from... ideally, if Zoom can be limited to 2 threads and temperature of CPU saturated at 65 or less.. I should be all set. Will keep you updated on my observations.

Everything seems in order to me, and I think you're on the right track :crossed_fingers:

I have a little doubt about the .desktop file: the script should have dropped a second one in ~/.local/share/applications/Zoom.desktop, I think it supersedes the original one (the one you posted) but make sure zoom indeed runs with the slice limits, that is, /usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher.

Ohkay.. so a new problem arose.. I was trying to sign-in to Zoom through my organization via the SSO option (in Zoom app) and it directed me to the authentication page on FireDragon - which is expected. However, after successful authentication, when I click on "Launch Zoom" button on the webpage, it doesn't sign me in to the already opened Zoom app; it simply refreshes the page. (I closed the already opened Zoom app clicked on the "Launch Zoom" button - it does nothing). My best guess is that, FireDragon is unable to re-execute the Zoom binary/launcher with authentication info after the changes suggested in above replies were made.

I am able to launch Zoom via the command above (/usr/bin/systemd-run ..<rest command> ..ZoomLauncher), as well as through the Garuda Application Launcher, but unable to sign in through my organization. Please note that the same behavior exists with the Opera browser. Any suggestions?

Just a shot in the dark: I see the original .desktop would run the zoom binary while the modified one calls ZoomLauncher, try see if it works when running the same long command line but with zoom instead. I guess there's a reason if they wrote the "slice script" that way but... who knows.

Meanwhile I read up on the subject of setting process limits, there are a few things that float in my head but I don't want to add confusion with wrong ideas.


edit:

Now that I think of it, the "slice script" also removes the %U at the end.
Does it make a difference if you put it back in the .desktop file?

Didn't check with replacing ZoomLauncher to zoom, but added %U to the end of the Exec= line in Zoom.desktop in ~/.local/... path and it helped! Thanks.., will keep monitoring the Zoom resource usage. Just to confirm, do I need to run Zoom all the time with usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher command? or directly by clicking the icon on Applications Launcher? Both start the Zoom application, but I am wondering which one do you want to monitor if Zoom uses 2 vCPUs only? I suppose through Application Launcher too, it goes through the ~/.local/share... path and starts Zoom with the mentioned zoom.slice meta?

As far as I understand, the new .desktop in user folder should "take over" the default one and use the limits, it shouldn't be necessary to run from the command line.

Other considerations, I'm not sure whether it's better to use AllowedCPUs or CPUQuota which takes a percent (details here).
And I hope limiting CPU is enough, because likely much of the heat comes from the iGPU.
(by the way, that's the only way I can get my laptop to overheat, it can take 100% CPU all I want without trouble, but playing with GPU shaders makes it too hot in just about 30 seconds)

Meanwhile online I also found the counterintuitive advice to disable "hardware acceleration for receiving video" somewhere in the zoom settings. Apparently it doesn't work well on some GPUs.

Thank you @meanruse for the suggestions. I disabled the "hardware acceleration for receiving video" in the Advanced Settings section of the Video setting in Zoom and did pretty exhaustive experiments with various combinations of AllowedCPUs and CPUQuota (in the link you mentioned above 20% CPU quota => 20% of relative CPU timing on 1 CPU).

With various combinations of thermald enabled/disabled, auto-cpufreq enabled/disabled, power-profiles-daemon enabled/disabled, and AllowedCPUs=0-1 (or 0-2), I ran Zoom for quite long sessions for each combination, and noted that the CPU temperature eventually rose to 90 and beyond (auto-cpufreq output where applicable and sensors output). The fan too ran high at more than 4500 RPM; none of settings helped bring down the CPU temperature to a safe zone of < 70.

Next, I experiments the same above power-saving settings with CPUQuota=20%, this too didn't help (although, it appeared first to keep the CPU temperature around 70 or 75, but in the end.. the temperature eventually rose to 90 and beyond). I kept in mind to kill zoom and restart it after every change to the zoom.slice file. All these took enough of my time.. :roll_eyes: and I wish to rest these experiments for now.. I have re-enabled the "hardware acceleration for receiving video" in Zoom, and kept the power saving profiles setting to auto-cpufreq enabled and thermald enabled with CPUQuota=20% in the zoom.slice file. Will keep you updated here if I see any improvements in the lowering the CPU temperature for future scheduled Zoom sessions.

I'm afraid there isn't too much to do about it, last thing that comes to my mind is playing some more with disabling some of the GPU accelerations in zoom, and/or trying to throttle the GPU maximum frequency (likely, at the expense of some lag and dropped frames I guess).

Maybe try the intel_gpu_frequency from intel-gpu-tools, read its man page, use the -g option to find the maximum frequency, then -c max= with some sensible lower value (mind the step, usually 50MHz says the man page).

Beware, let me stress again this is all guesswork from me.

You may find better advice elsewhere, where either zoom, macbooks or intel GPUs is the main topic, starting from the "slice script" github page (where I'd report the missing %U thing by the way).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.