Executing thermald daemon but status remains as disabled

Just running thermald as root yields no apparent results other than it executed

[root@A515-54 bin]# thermald
[root@A515-54 bin]#

Ran it with daemon disabled. Received lines that resembled this post

[root@A515-54 bin]# thermald --no-daemon
[WARN]13 CPUID levels; family:model:stepping 0x6:3a:9 (6:58:9)
[WARN]Polling mode is enabled: 4
[WARN]sensor id 5 : No temp sysfs for reading raw temp
[WARN]sensor id 5 : No temp sysfs for reading raw temp
[WARN]sensor id 5 : No temp sysfs for reading raw temp
I/O warning : failed to load external entity "/etc/thermald/thermal-conf.xml"
[WARN]error: could not parse file /etc/thermald/thermal-conf.xml
I/O warning : failed to load external entity "/etc/thermald/thermal-conf.xml"
[WARN]error: could not parse file /etc/thermald/thermal-conf.xml
I/O warning : failed to load external entity "/etc/thermald/thermal-conf.xml"
[WARN]error: could not parse file /etc/thermald/thermal-conf.xml

Ran it again and it says it started

[root@A515-54 bin]# thermald --no-daemon
[1681682773][ERR]Couldn't get lock file 205095
[1681682773][ERR]An instance of thermald is already running, exiting ...
[root@A515-54 bin]# 

[root@A515-54 bin]# systemctl status thermald
β—‹ thermald.service - Thermal Daemon Service
     Loaded: loaded (/usr/lib/systemd/system/thermald.service; disabled; preset: disabled)
     Active: inactive (dead)

Thank you!

Enable and start the service in one go:

sudo systemctl enable --now thermald.service

Check the status:

systemctl status thermald.service

2 Likes
[admin@A515-54 ~]$ sudo systemctl enable --now thermald.service
Created symlink /etc/systemd/system/dbus-org.freedesktop.thermald.service β†’ /usr/lib/systemd/system/thermald.service.
Created symlink /etc/systemd/system/multi-user.target.wants/thermald.service β†’ /usr/lib/systemd/system/thermald.service.
Job for thermald.service failed because the control process exited with error code.
See "systemctl status thermald.service" and "journalctl -xeu thermald.service" for details.
[admin@A515-54 ~]$ systemctl status thermald.service
Γ— thermald.service - Thermal Daemon Service
     Loaded: loaded (/usr/lib/systemd/system/thermald.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sun 2023-04-16 15:16:13 PDT; 44s ago
    Process: 209556 ExecStart=/usr/bin/thermald --systemd --dbus-enable --adaptive (code=exited, status=1/FAI>
   Main PID: 209556 (code=exited, status=1/FAILURE)
        CPU: 23ms

Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Scheduled restart job, restart counter is at 5.
Apr 16 15:16:13 A515-54 systemd[1]: Stopped Thermal Daemon Service.
Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Start request repeated too quickly.
Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Failed with result 'exit-code'.
Apr 16 15:16:13 A515-54 systemd[1]: Failed to start Thermal Daemon Service.
...skipping...
Γ— thermald.service - Thermal Daemon Service
     Loaded: loaded (/usr/lib/systemd/system/thermald.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sun 2023-04-16 15:16:13 PDT; 44s ago
    Process: 209556 ExecStart=/usr/bin/thermald --systemd --dbus-enable --adaptive (code=exited, status=1/FAI>
   Main PID: 209556 (code=exited, status=1/FAILURE)
        CPU: 23ms

Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Scheduled restart job, restart counter is at 5.
Apr 16 15:16:13 A515-54 systemd[1]: Stopped Thermal Daemon Service.
Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Start request repeated too quickly.
Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Failed with result 'exit-code'.
Apr 16 15:16:13 A515-54 systemd[1]: Failed to start Thermal Daemon Service.
~
~
~

[admin@A515-54 ~]$ journalctl -xeu thermald.service
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ Automatic restarting of the unit thermald.service has been scheduled, as the result for
β–‘β–‘ the configured Restart= setting for the unit.
Apr 16 15:16:13 A515-54 systemd[1]: Stopped Thermal Daemon Service.
β–‘β–‘ Subject: A stop job for unit thermald.service has finished
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A stop job for unit thermald.service has finished.
β–‘β–‘ 
β–‘β–‘ The job identifier is 22186 and the job result is done.
Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Start request repeated too quickly.
Apr 16 15:16:13 A515-54 systemd[1]: thermald.service: Failed with result 'exit-code'.
β–‘β–‘ Subject: Unit failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ The unit thermald.service has entered the 'failed' state with result 'exit-code'.
Apr 16 15:16:13 A515-54 systemd[1]: Failed to start Thermal Daemon Service.
β–‘β–‘ Subject: A start job for unit thermald.service has failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A start job for unit thermald.service has finished with a failure.
β–‘β–‘ 
β–‘β–‘ The job identifier is 22186 and the job result is failed.
lines 224-250/250 (END)

Reboot and check the status again.

Looks like it’s good to go. Does the preset being disabled mean anything in this case?

[admin@A515-54 ~]$ systemctl status thermald.service
● thermald.service - Thermal Daemon Service
     Loaded: loaded (/usr/lib/systemd/system/thermald.service; enabled; preset: disabled)
     Active: active (running) since Sun 2023-04-16 15:25:02 PDT; 1min 36s ago
   Main PID: 461 (thermald)
      Tasks: 3 (limit: 23787)
     Memory: 7.2M
        CPU: 34ms
     CGroup: /system.slice/thermald.service
             └─461 /usr/bin/thermald --systemd --dbus-enable --adaptive

Apr 16 15:25:02 A515-54 thermald[461]: 22 CPUID levels; family:model:stepping 0x6:8e:b (6:142:11)
Apr 16 15:25:02 A515-54 thermald[461]: 22 CPUID levels; family:model:stepping 0x6:8e:b (6:142:11)
Apr 16 15:25:02 A515-54 thermald[461]: sensor id 7 : No temp sysfs for reading raw temp
Apr 16 15:25:02 A515-54 thermald[461]: sensor id 7 : No temp sysfs for reading raw temp
Apr 16 15:25:02 A515-54 thermald[461]: sensor id 7 : No temp sysfs for reading raw temp
Apr 16 15:25:02 A515-54 thermald[461]: Config file /etc/thermald/thermal-conf.xml does not exist
Apr 16 15:25:02 A515-54 thermald[461]: Config file /etc/thermald/thermal-conf.xml does not exist
Apr 16 15:25:02 A515-54 thermald[461]: Config file /etc/thermald/thermal-conf.xml does not exist
Apr 16 15:25:02 A515-54 thermald[461]: Polling mode is enabled: 4
Apr 16 15:25:02 A515-54 systemd[1]: Started Thermal Daemon Service.

Then i tried the same command with cpufreq, says service is enabled but under active it says failed. I restarted and tried again, says failed again

[admin@A515-54 ~]$ sudo systemctl enable --now auto-cpufreq.service
[sudo] password for admin: 
[admin@A515-54 ~]$ systemctl status auto-cpufreq.service
Γ— auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
     Loaded: loaded (/usr/lib/systemd/system/auto-cpufreq.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sun 2023-04-16 15:37:18 PDT; 49s ago
   Duration: 87ms
    Process: 3228 ExecStart=/usr/bin/auto-cpufreq --daemon (code=exited, status=1/FAILURE)
   Main PID: 3228 (code=exited, status=1/FAILURE)
        CPU: 78ms

Apr 16 15:37:18 A515-54 systemd[1]: Started auto-cpufreq - Automatic CPU speed & power optimizer for Linux.
Apr 16 15:37:18 A515-54 auto-cpufreq[3228]: Traceback (most recent call last):
Apr 16 15:37:18 A515-54 auto-cpufreq[3228]:   File "/usr/bin/auto-cpufreq", line 14, in <module>
Apr 16 15:37:18 A515-54 auto-cpufreq[3228]:     from auto_cpufreq.core import *
Apr 16 15:37:18 A515-54 auto-cpufreq[3228]:   File "/usr/lib/python3.10/site-packages/auto_cpufreq/core.py", >
Apr 16 15:37:18 A515-54 auto-cpufreq[3228]:     import pkg_resources
Apr 16 15:37:18 A515-54 auto-cpufreq[3228]: ModuleNotFoundError: No module named 'pkg_resources'
Apr 16 15:37:18 A515-54 systemd[1]: auto-cpufreq.service: Main process exited, code=exited, status=1/FAILURE
Apr 16 15:37:18 A515-54 systemd[1]: auto-cpufreq.service: Failed with result 'exit-code'.
lines 1-17/17 (END)

Restarted again and just did the status check and got this

[admin@A515-54 ~]$ systemctl status auto-cpufreq.service
β—‹ auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
     Loaded: loaded (/usr/lib/systemd/system/auto-cpufreq.service; enabled; preset: disabled)
     Active: inactive (dead)

It just means that the service is disabled by default when the package is installed.

Install: python-setuptools

Then:

sudo systemctl enable --now auto-cpufreq

1 Like

Thank you!!!

Strange it didnt install or removed that dependency? I don’t need to add these to autostart right, they boot independently by default?

You mean the services?
Yes. Once enabled, they will start at boot every time.

1 Like

Yes, I meant that it didn’t add the python-setuptools along with the install. Of all my installs, all have installed the dependencies correctly.

Yes. That was strange. It should have installed it as dependency of auto-cpufreq.
Can’t tell why it didn’t get installed :thinking:

1 Like

Out of curiosity, I know with the default power profile daemon on KDE and these other services i put in, there’s still no option to force a charge limit on a laptop battery. I dont want to replace the daemon with tlp… but i found this thread that explains you can just edit the threshold files to stop charging at 80% when plugged in.

There are direct files you can write to that will change the thresholds. It’s what tlp uses. It should be /sys/class/power_supply/BAT0/charge_start_threshold and /sys/class/power_supply/BAT0/charge_stop_threshold. You can write a systemd service to set these on boot (you may be able to just set it once and forget a script)

This must be from a different OS because i can’t find those files. Could we go this route with native files, or is there any other way to stop batteries at 80%? I know my laptop doesn’t offer those settings, nor does my bios.

I am afraid I am not well suited to assist you on this.

Perhaps other forum members with experience in this subject might be able to help you.

I would suggest opening a new thread with an appropriate title, something like: How to set thresholds for battery charge (or similar) to get adequate response.

1 Like

Thank you as always pebcak!!

1 Like

No probs! :wave:t5:

1 Like

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