gnome-shell-system-monitor-applet
gnome-shell-system-monitor-applet copied to clipboard
Thermal sensor changing every boot
I think this is related to the fact that newer kernels the hwmonXX links are not fixed and subject to change on every boot.
A temporary workaround is I put the following in my script that runs after each reboot.
dconf write /org/gnome/shell/extensions/system-monitor/thermal-sensor-file "['/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input']"
note that this works since I change directory from /sys/class to /sys/devices and use a wildcard. My computer temperature sensors are below
$ ls /sys/class/hwmon/ -al total 0 drwxr-xr-x 2 root root 0 Jul 11 12:44 . drwxr-xr-x 68 root root 0 Jul 11 12:44 .. lrwxrwxrwx 1 root root 0 Jul 11 12:44 hwmon0 -> ../../devices/virtual/hwmon/hwmon0 lrwxrwxrwx 1 root root 0 Jul 11 12:44 hwmon1 -> ../../devices/virtual/hwmon/hwmon1 lrwxrwxrwx 1 root root 0 Jul 11 12:44 hwmon2 -> ../../devices/platform/thinkpad_hwmon/hwmon/hwmon2 lrwxrwxrwx 1 root root 0 Jul 11 12:44 hwmon3 -> ../../devices/virtual/hwmon/hwmon3 lrwxrwxrwx 1 root root 0 Jul 11 12:44 hwmon4 -> ../../devices/platform/coretemp.0/hwmon/hwmon4
When you say newer kernels, how new do you mean? Is it during the 4.13 merge window?
I hit this issue (hwmon link numbers changing every boot) on the kernels 4.10 (Ubuntu) and 4.11 (openSuse) on my machine. Apparently people experienced before see below link: https://bbs.archlinux.org/viewtopic.php?id=80012.
I have the same problem running on 5.9.3-1-MANJARO
I have the same problem running on 5.15.49-1-MANJARO with gnome-shell 42.2-1
I used this way to solve this problem.
Create ~/.local/share/applications/auto-run-scripts.desktop
:
[Desktop Entry]
Name=AutoRunScript
GenericName=Auto run script
Comment=Just auto run script on gnome loaded
Exec=the-path-to/gnome-auto-start-script
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
NoDisplay=true
Create the gnome-auto-start-script
script:
#!/usr/bin/env bash
dconf write /org/gnome/shell/extensions/system-monitor/thermal-sensor-file "'$(find /sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input)'"
Open the Tweak app of gnome. Add the AutoRunScript
to autostart list.
same here, my thermal sensor is actually always unselected on boot, I have to go to the settings and choose one from the pull-down menu. Can't the app keep an internal mapping of previously used hwmons and then look up the one with the correct name at startup or sth?
Ubuntu 20.04 kernel 5.15.0-69 Gnome 3.36.8
I have the same issue on Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2186601 . Perhaps code could be added to look for descriptive names instead of hwmon*? lm_sensors shows them and one can parse its JSON output to get values consistently:
$ sensors -j | jq '.["f71889a-isa-0290"]["CPU fan"].fan1_input'
1075.000
$ sensors -j | jq '.["coretemp-isa-0000"]["Package id 0"].temp1_input'
42.000