I use VMware Workstation on my Zorin OS 16 Pro machine.
(Please don't suggest another hypervisor. I need the virtual TPM in VMware to run the vm for work. None of the other hypervisors will work.)
Is there a way to implement a fix in Zorin going forward for the following issue: kcompacd0 using 100% CPU with VMware Workstation 16 - Unix & Linux Stack Exchange
This is the solution for me on Zorin 16 Pro:
Shut down the VM
Open the <vm_name>.vmx file for the VM using a text editor
Add the following lines to the end of the vmx file:
# Fix problem where vmware battles with kcompactd0.
Save file and restart VM
If you upgrade to VMware Workstation Pro 16.2.1, make sure you upgrade your VMs to 16.2 and reboot your machine before testing. I did not reboot after upgrading and the issue persisted until the reboot.
Another user posted: From this link - Fixing khugepaged CPU usage VMware Workstation · GitHub - I found that editing /etc/sysctl.conf (different on Arch-based, but the same principle) worked for me:
---End of notes---
Kernel: 5.13.0-39-generic x86_64 bits: 64 compiler: N/A
root=/dev/mapper/vgzorin-root ro quiet splash vt.handoff=7
Desktop: Gnome 3.38.4 wm: gnome-shell dm: GDM3 184.108.40.206
Distro: Zorin OS 16.1 base: Ubuntu 20.04 LTS Focal