amanusk / s-tui

Terminal-based CPU stress and monitoring utility
https://amanusk.github.io/s-tui/
GNU General Public License v2.0
4.06k stars 140 forks source link

Monitor/stress mode checkboxes are both unchecked after changing temperature sensor #94

Closed christopher-dG closed 4 years ago

christopher-dG commented 5 years ago

Step 1: Describe your environment

Step 2: Describe the problem:

When you change the temperature sensor, the checkboxes that indicate whether we're in monitor or stress mode are both cleared, regardless of which one you were in before.

Observed Results:

scrot

Debug Results, output of s-tui -d created in a file _s-tui.log:

2018-10-08 12:33:19,545 [main()] [INFO ]  Started without root permissions
2018-10-08 12:33:19,545 [__init__()] [DEBUG]  Config file not found
2018-10-08 12:33:19,545 [__init__()] [DEBUG]  No refresh rate configed
2018-10-08 12:33:19,545 [__init__()] [DEBUG]  No user config for utf8
2018-10-08 12:33:19,545 [__init__()] [DEBUG]  No user config for temp sensor
2018-10-08 12:33:19,545 [__init__()] [DEBUG]  No user config for temp threshold
2018-10-08 12:33:19,547 [__init__()] [DEBUG]  stress-ng is not installed
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Package id 0
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Core 0
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Core 1
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Core 2
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Core 3
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:19,551 [__init__()] [DEBUG]  
2018-10-08 12:33:19,552 [__init__()] [INFO ]  num cpus 8
2018-10-08 12:33:19,696 [update()] [INFO ]  Utilization recorded 9.5
2018-10-08 12:33:19,696 [__init__()] [DEBUG]  arg temp  None
2018-10-08 12:33:19,696 [init_update()] [DEBUG]  custom temp is None
2018-10-08 12:33:19,703 [init_update()] [DEBUG]  Temperature sensor is set to coretemp
2018-10-08 12:33:19,708 [set_threshold()] [DEBUG]  Temperature threshold set to 80.0
2018-10-08 12:33:19,715 [__init__()] [DEBUG]  Update is updated to <function TemperatureSource.init_update.<locals>.update at 0x7f50e74f7ea0>
2018-10-08 12:33:19,716 [get_power_usage()] [INFO ]  current 131436500313.0 last 131436500313.0
2018-10-08 12:33:19,716 [get_power_usage()] [INFO ]  Joule_Used 0.0 seconds_passed 0.0005950927734375
2018-10-08 12:33:19,719 [update()] [DEBUG]  Fan Speend Not Available
2018-10-08 12:33:19,719 [update()] [INFO ]  Fan speed recorded0.0
2018-10-08 12:33:19,752 [on_unicode_checkbox()] [DEBUG]  unicode State is False
2018-10-08 12:33:19,760 [update()] [INFO ]  Utilization recorded 16.3
2018-10-08 12:33:19,766 [get_power_usage()] [INFO ]  current 131436945625.0 last 131436500313.0
2018-10-08 12:33:19,766 [get_power_usage()] [INFO ]  Joule_Used 0.445312 seconds_passed 0.04976630210876465
2018-10-08 12:33:19,766 [get_power_usage()] [INFO ]  Power reading elapsed
2018-10-08 12:33:19,766 [get_power_usage()] [INFO ]  Max power updated 9
2018-10-08 12:33:19,766 [update_displayed_graph_data()] [INFO ]  Reading 800
2018-10-08 12:33:19,767 [update_displayed_graph_data()] [INFO ]  Reading 16.3
2018-10-08 12:33:19,767 [update_displayed_graph_data()] [INFO ]  Reading 36.0
2018-10-08 12:33:19,768 [update_displayed_graph_data()] [INFO ]  Reading 8.948062868460008
2018-10-08 12:33:19,771 [update()] [INFO ]  Utilization recorded 11.1
2018-10-08 12:33:19,775 [get_power_usage()] [INFO ]  current 131437039374.0 last 131436945625.0
2018-10-08 12:33:19,775 [get_power_usage()] [INFO ]  Joule_Used 0.093749 seconds_passed 0.008836030960083008
2018-10-08 12:33:19,775 [get_power_usage()] [INFO ]  Power reading elapsed
2018-10-08 12:33:19,775 [get_power_usage()] [INFO ]  Max power updated 11
2018-10-08 12:33:19,775 [update_displayed_graph_data()] [INFO ]  Reading 1023
2018-10-08 12:33:19,775 [update_displayed_graph_data()] [INFO ]  Reading 11.1
2018-10-08 12:33:19,776 [update_displayed_graph_data()] [INFO ]  Reading 36.0
2018-10-08 12:33:19,776 [update_displayed_graph_data()] [INFO ]  Reading 10.609854178138745
2018-10-08 12:33:21,919 [update()] [INFO ]  Utilization recorded 7.1
2018-10-08 12:33:21,926 [get_power_usage()] [INFO ]  current 131455018271.0 last 131437039374.0
2018-10-08 12:33:21,926 [get_power_usage()] [INFO ]  Joule_Used 17.978897 seconds_passed 2.1511292457580566
2018-10-08 12:33:21,926 [get_power_usage()] [INFO ]  Power reading elapsed
2018-10-08 12:33:21,927 [update_displayed_graph_data()] [INFO ]  Reading 800
2018-10-08 12:33:21,928 [update_displayed_graph_data()] [INFO ]  Reading 7.1
2018-10-08 12:33:21,929 [update_displayed_graph_data()] [INFO ]  Reading 25.0
2018-10-08 12:33:21,930 [update_displayed_graph_data()] [INFO ]  Reading 8.357887856089395
2018-10-08 12:33:24,073 [update()] [INFO ]  Utilization recorded 9.6
2018-10-08 12:33:24,079 [get_power_usage()] [INFO ]  current 131473293310.0 last 131455018271.0
2018-10-08 12:33:24,079 [get_power_usage()] [INFO ]  Joule_Used 18.275039 seconds_passed 2.153045177459717
2018-10-08 12:33:24,079 [get_power_usage()] [INFO ]  Power reading elapsed
2018-10-08 12:33:24,080 [update_displayed_graph_data()] [INFO ]  Reading 880
2018-10-08 12:33:24,081 [update_displayed_graph_data()] [INFO ]  Reading 9.6
2018-10-08 12:33:24,082 [update_displayed_graph_data()] [INFO ]  Reading 25.0
2018-10-08 12:33:24,083 [update_displayed_graph_data()] [INFO ]  Reading 8.487996067765708
2018-10-08 12:33:26,226 [update()] [INFO ]  Utilization recorded 7.5
2018-10-08 12:33:26,233 [get_power_usage()] [INFO ]  current 131491186575.0 last 131473293310.0
2018-10-08 12:33:26,233 [get_power_usage()] [INFO ]  Joule_Used 17.893265 seconds_passed 2.1536316871643066
2018-10-08 12:33:26,233 [get_power_usage()] [INFO ]  Power reading elapsed
2018-10-08 12:33:26,233 [update_displayed_graph_data()] [INFO ]  Reading 800
2018-10-08 12:33:26,235 [update_displayed_graph_data()] [INFO ]  Reading 7.5
2018-10-08 12:33:26,236 [update_displayed_graph_data()] [INFO ]  Reading 25.0
2018-10-08 12:33:26,237 [update_displayed_graph_data()] [INFO ]  Reading 8.308414621982143
2018-10-08 12:33:26,273 [on_sensors_menu_close()] [INFO ]  State is not None
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  Package id 0
2018-10-08 12:33:26,277 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Core 0
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Core 1
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Core 2
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Core 3
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  Sensor Label
2018-10-08 12:33:26,278 [__init__()] [DEBUG]  
2018-10-08 12:33:26,279 [__init__()] [INFO ]  num cpus 8
2018-10-08 12:33:26,280 [update()] [INFO ]  Utilization recorded 14.3
2018-10-08 12:33:26,280 [__init__()] [DEBUG]  arg temp  acpitz,1,
2018-10-08 12:33:26,281 [init_update()] [DEBUG]  custom temp is acpitz,1,
2018-10-08 12:33:26,281 [init_update()] [DEBUG]  Selected custom temp
2018-10-08 12:33:26,281 [init_update()] [DEBUG]  Major acpitz Minor 1
2018-10-08 12:33:26,283 [set_threshold()] [DEBUG]  Temperature threshold set to 119.0
2018-10-08 12:33:26,285 [__init__()] [DEBUG]  Update is updated to <function TemperatureSource.init_update.<locals>.update at 0x7f50e72a77b8>
2018-10-08 12:33:26,286 [get_power_usage()] [INFO ]  current 131491748402.0 last 131491748402.0
2018-10-08 12:33:26,286 [get_power_usage()] [INFO ]  Joule_Used 0.0 seconds_passed 0.0003230571746826172
2018-10-08 12:33:26,287 [update()] [DEBUG]  Fan Speend Not Available
2018-10-08 12:33:26,287 [update()] [INFO ]  Fan speed recorded0.0
2018-10-08 12:33:26,291 [on_unicode_checkbox()] [DEBUG]  unicode State is False
2018-10-08 12:33:26,293 [on_sensors_menu_close()] [INFO ]  Temp sensor updated to acpitz,1,
2018-10-08 12:33:27,790 [unhandled_input()] [DEBUG]  Caught q
2018-10-08 12:33:27,790 [unhandled_input()] [DEBUG]  None
2018-10-08 12:33:27,790 [kill_child_processes()] [DEBUG]  Killing stress process
2018-10-08 12:33:27,790 [kill_child_processes()] [DEBUG]  No such process
2018-10-08 12:33:27,790 [kill_child_processes()] [DEBUG]  Could not kill process

Step 3: Reproduce the problem:

Steps to reproduce:

  1. start s-tui
  2. change temperature sensor
  3. observe unfilled checkboxes
amanusk commented 5 years ago

Thanks @christopher-dG. The sensors menu is planned to be overhauled in the next version, which should also address this. (You can check the progress on the develop branch, it is far from ready)

amanusk commented 5 years ago

@christopher-dG The master branch was updated to a new version, where the issue should be fixed.

Help testing is appreciated :smiley:

amanusk commented 4 years ago

This should now be fixed in v1.0