From bf35fe38f09be8c541d9face64d825371aa3c7b2 Mon Sep 17 00:00:00 2001 From: bymoz089 <15787117+bymoz089@users.noreply.github.com> Date: Wed, 21 Sep 2022 00:08:39 +0200 Subject: [PATCH] run systemd service with realtime priority Run systemd service with realtime priority, to ensure that thinkfan's execution is not delayed in case of sudden rise of CPU load. Deactivated fans on heavy CPU load could otherwise lead to a system freeze. --- rcscripts/systemd/thinkfan.service.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rcscripts/systemd/thinkfan.service.cmake b/rcscripts/systemd/thinkfan.service.cmake index 5ebd530..0e0c522 100644 --- a/rcscripts/systemd/thinkfan.service.cmake +++ b/rcscripts/systemd/thinkfan.service.cmake @@ -8,6 +8,8 @@ Type=forking ExecStart=@CMAKE_INSTALL_PREFIX@/sbin/thinkfan $THINKFAN_ARGS PIDFile=/run/thinkfan.pid ExecReload=/bin/kill -HUP $MAINPID +CPUSchedulingPolicy=fifo +CPUSchedulingPriority=20 [Install] WantedBy=multi-user.target