At one point, I bought myself VR glasses (Meta Quest 2) to work on a giant
monitor.
I use the Immersed application for this purpose.
Periodically, the
application starts to lag and loses the ability to function properly.
I suspected and it initially worked that the agent installed on the machine was to blame.
Executing the command fixed the problem:
$ sudo pkill -9 -i immersed
However, after some time even this stopped helping and I had to reboot the MacBook.
I also noticed that the MacBook sometimes experiences an inexplicable load and the system processes show the activity of the replayd process, which manages screen recording.
It turned out that if I stop its activity and restart the Immersed agent, everything starts working as good as new.
$ sudo pkill -9 -i replayd