System Info
- Fresh Proxmox 9.1 installation
- Motherboard: ASUS H97M PLUS (on latest BIOS)
- s-tui version: 1.1.6 (from repo)
- psutil version: 5.9.4 (I think; from repo)
Problem
s-tui fails randomly with the following error. Sometimes it opens fine, sometimes it crashes - completely unpredictable with the same configuration:
Code:
root@midgard:~# s-tui
Traceback (most recent call last):
File "/usr/bin/s-tui", line 33, in <module>
sys.exit(load_entry_point('s-tui==1.1.6', 'console_scripts', 's-tui')())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/s_tui/s_tui.py", line 958, in main
graph_controller = GraphController(args)
File "/usr/lib/python3/dist-packages/s_tui/s_tui.py", line 758, in __init__
possible_sources = self._load_config(args.t_thresh)
File "/usr/lib/python3/dist-packages/s_tui/s_tui.py", line 691, in _load_config
FanSource(),
~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/s_tui/sources/fan_source.py", line 48, in __init__
sensors_dict = psutil.sensors_fans()
File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 2326, in sensors_fans
return _psplatform.sensors_fans()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 1440, in sensors_fans
current = int(bcat(base + '_input'))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Steps I've Tried
- Ran sensors-detect - suggested loading coretemp module
- Researched motherboard - found that ASUS H97 PLUS requires nct6775 module (sensors-detect doesn't suggest it even with aggressive probing)
- Loaded nct6775 module - s-tui opened successfully... but then subsequent runs still failed randomly
- Monitored hwmon sysfs - ran
watch -n 0.2 "cat /sys/class/hwmon/hwmon*/fan*_input 2>/dev/null"andwatch -n 0.2 "ls -l /sys/class/hwmon"to check for intermittent missing files/values, but everything appears stable
Possible Solutions I Haven't Tried Yet
Based on research, I've found these potential fixes but haven't implemented them (because I had to leave for work):- ACPI kernel parameter - Add acpi_enforce_resources=lax to avoid ACPI locking hardware monitoring registers:
Bash:# In /etc/default/grub: GRUB_CMDLINE_LINUX="acpi_enforce_resources=lax" # Then: update-grub; reboot - Test psutil directly - Run something like this (might be wrong; I've only had two coffees so far today) to catch the actual failure:
Python:python3 - << 'EOF' import psutil, pprint for i in range(50): try: pprint.pp(psutil.sensors_fans()) except Exception as e: print("ERROR:", e) EOF - Upgrade psutil via pip - Debian's s-tui (1.1.6) and psutil (5.9.4) are quite old. Newer versions apparently fixed fan parsing bugs, according to github Releases pages. Could try:
I'm wary of actually doing this, for the obvious reason stated in the pip3 flags.Bash:apt install python3-pip pip3 install --upgrade psutil --break-system-packages
Questions
- Has anyone else experienced intermittent s-tui failures on Proxmox 9.x?
- Is the
acpi_enforce_resources=laxparameter safe/recommended for ASUS boards with nct6775? - Would upgrading psutil via pip cause any issues with Proxmox's system packages?
Last edited: