I'm using Arch Linux, which has a rolling update system. For some time (probably since the last update, but I'm not sure), when I close my laptop lid, the fan starts to make a lot of noise. I checked what program loads the processor so. I executed such a command:
sleep 12 && echo q | htop | aha --black --line-fix > htop.html
I closed my laptop, which started buzzing after about 10 seconds, and after 12 seconds I opened it. Here is a screenshot from the htop command made with the above command:
As you can see, buzzing is caused by systemd-logind program. My laptop is buzzing only with the closed lid. When the laptop lid is open, I don't hear the buzzing (even after screen is locked with WINDOWS + L). If that's important, I use the GNOME desktop environment.
How to fix it and why this program makes such noise?