Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package thermald for openSUSE:Factory 
checked in at 2023-04-17 17:41:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/thermald (Old)
 and      /work/SRC/openSUSE:Factory/.thermald.new.2023 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "thermald"

Mon Apr 17 17:41:24 2023 rev:14 rq:1079843 version:2.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/thermald/thermald.changes        2022-11-18 
15:44:31.158822047 +0100
+++ /work/SRC/openSUSE:Factory/.thermald.new.2023/thermald.changes      
2023-04-17 17:41:29.306287866 +0200
@@ -1,0 +2,8 @@
+Sun Apr 16 17:45:34 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.5.2:
+  * Support Alder Lake N
+  * Support ITMT version 2, which is used in some Raptor Lake
+    systems
+
+-------------------------------------------------------------------

Old:
----
  thermal_daemon-2.5.1.tar.gz

New:
----
  thermal_daemon-2.5.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ thermald.spec ++++++
--- /var/tmp/diff_new_pack.Wyxfcl/_old  2023-04-17 17:41:30.674295861 +0200
+++ /var/tmp/diff_new_pack.Wyxfcl/_new  2023-04-17 17:41:30.682295908 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package thermald
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
   %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
 Name:           thermald
-Version:        2.5.1
+Version:        2.5.2
 Release:        0
 Summary:        The Linux Thermal Daemon program from 01.org
 License:        GPL-2.0-or-later


++++++ thermal_daemon-2.5.1.tar.gz -> thermal_daemon-2.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/README.txt 
new/thermal_daemon-2.5.2/README.txt
--- old/thermal_daemon-2.5.1/README.txt 2022-09-20 05:30:33.000000000 +0200
+++ new/thermal_daemon-2.5.2/README.txt 2023-01-30 23:55:28.000000000 +0100
@@ -116,6 +116,10 @@
 
 Releases
 
+Release 2.5.2
+- Support Alder Lake N
+- Support ITMT version 2, which is used in some Raptor Lake systems
+
 Release 2.5.1
 - Static analysis fixes
 - Missing init, which causes skipping of conditions in a Dell system
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/configure.ac 
new/thermal_daemon-2.5.2/configure.ac
--- old/thermal_daemon-2.5.1/configure.ac       2022-09-20 05:30:33.000000000 
+0200
+++ new/thermal_daemon-2.5.2/configure.ac       2023-01-30 23:55:28.000000000 
+0100
@@ -1,7 +1,7 @@
 AC_PREREQ(1.0)
 
 m4_define([td_major_version], [2])
-m4_define([td_minor_version], [5.1])
+m4_define([td_minor_version], [5.2])
 m4_define([td_version],
           [td_major_version.td_minor_version])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/src/thd_engine.cpp 
new/thermal_daemon-2.5.2/src/thd_engine.cpp
--- old/thermal_daemon-2.5.1/src/thd_engine.cpp 2022-09-20 05:30:33.000000000 
+0200
+++ new/thermal_daemon-2.5.2/src/thd_engine.cpp 2023-01-30 23:55:28.000000000 
+0100
@@ -713,6 +713,7 @@
                { 6, 0x9a }, // Alderlake
                { 6, 0xb7 }, // Raptorlake
                { 6, 0xba }, // Raptorlake
+               { 6, 0xbe }, // Alderlake N
                { 6, 0xbf }, // Raptorlake S
                { 0, 0 } // Last Invalid entry
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/src/thd_engine_adaptive.cpp 
new/thermal_daemon-2.5.2/src/thd_engine_adaptive.cpp
--- old/thermal_daemon-2.5.1/src/thd_engine_adaptive.cpp        2022-09-20 
05:30:33.000000000 +0200
+++ new/thermal_daemon-2.5.2/src/thd_engine_adaptive.cpp        2023-01-30 
23:55:28.000000000 +0100
@@ -307,7 +307,7 @@
         * Thermald min_state is where no cooling is active
         * Thermald max_state is where max cooling is applied
         *
-        * If you check one ITMT table entriy:
+        * If you check one ITMT table entry:
         *  target:\_SB_.PC00.LPCB.ECDV.CHRG  trip_temp:45 pl1_min:28000 
pl1.max:MAX
         *
         * This means that when exceeding 45 set the PL1 to 28W,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/src/thd_gddv.cpp 
new/thermal_daemon-2.5.2/src/thd_gddv.cpp
--- old/thermal_daemon-2.5.1/src/thd_gddv.cpp   2022-09-20 05:30:33.000000000 
+0200
+++ new/thermal_daemon-2.5.2/src/thd_gddv.cpp   2023-01-30 23:55:28.000000000 
+0100
@@ -613,6 +613,11 @@
 
        thd_log_debug(" ITMT version %d %s\n", (int) version, name);
 
+       if (version > 2) {
+               thd_log_info("Unsupported ITMT version\n");
+               return THD_ERROR;
+       }
+
        if (name == NULL)
                itmt.name = "Default";
        else
@@ -626,7 +631,20 @@
                itmt_entry.pl1_min = get_string(buf, &offset);
                itmt_entry.pl1_max = get_string(buf, &offset);
                itmt_entry.unused = get_string(buf, &offset);
-               offset += 12;
+               if (version == 2) {
+                       // Ref DPTF/Sources/Manager/DataManager.cpp 
DataManager::loadItmtTableObject()
+                       std::string dummy_str;
+                       unsigned long long dummy1,dummy2, dummy3;
+
+                       // There are three additional fields
+                       dummy1 = get_uint64(buf, &offset);
+                       dummy_str = get_string(buf, &offset);
+                       dummy2 = get_uint64(buf, &offset);
+                       dummy3 = get_uint64(buf, &offset);
+                       thd_log_debug("ignore dummy_str:%s %llu %llu %llu\n", 
dummy_str.c_str(), dummy1, dummy2, dummy3);
+               } else {
+                       offset += 12;
+               }
 
                itmt.itmt_entries.push_back(itmt_entry);
        }
@@ -660,7 +678,7 @@
                char idsp[64];
                std::string idsp_str;
 
-               // The minimum length for a IDSP should be atleast 28
+               // The minimum length for a IDSP should be at least 28
                // including headers and values
                if ((length - i) < 28)
                        return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/src/thd_parse.cpp 
new/thermal_daemon-2.5.2/src/thd_parse.cpp
--- old/thermal_daemon-2.5.1/src/thd_parse.cpp  2022-09-20 05:30:33.000000000 
+0200
+++ new/thermal_daemon-2.5.2/src/thd_parse.cpp  2023-01-30 23:55:28.000000000 
+0100
@@ -178,6 +178,7 @@
                                } else if(!strcasecmp((const char*) 
cur_node->name,
                                                "PidControl")) {
                                        pid_control_t pid_params;
+
                                        parse_pid_values(cur_node->children, 
doc, &pid_params);
                                        trip_cdev->pid_param.kp = pid_params.Kp;
                                        trip_cdev->pid_param.ki = pid_params.Ki;
@@ -293,6 +294,10 @@
        xmlNode *cur_node = NULL;
        char *tmp_value;
 
+       pid_ptr->Kp = 0.0005;
+       pid_ptr->Ki = 0.0001;
+       pid_ptr->Kd = 0.0001;
+
        for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
                if (cur_node->type == XML_ELEMENT_NODE) {
                        DEBUG_PARSER_PRINT("node type: Element, name: %s value: 
%s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
@@ -810,6 +815,10 @@
                                        
thermal_info_list[i].cooling_devs[l].max_state);
                        thd_log_info("\t\tStep: %d\n",
                                        
thermal_info_list[i].cooling_devs[l].inc_dec_step);
+                       thd_log_info("\t\tReadBack: %d\n",
+                                       
thermal_info_list[i].cooling_devs[l].read_back);
+                       thd_log_info("\t\tDebouncePeriod: %d\n",
+                                       
thermal_info_list[i].cooling_devs[l].debounce_interval);
                        thd_log_info("\t\tAutoDownControl: %d\n",
                                        
thermal_info_list[i].cooling_devs[l].auto_down_control);
                        if (thermal_info_list[i].cooling_devs[l].pid_enable) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/test/thermal_config_dump.py 
new/thermal_daemon-2.5.2/test/thermal_config_dump.py
--- old/thermal_daemon-2.5.1/test/thermal_config_dump.py        1970-01-01 
01:00:00.000000000 +0100
+++ new/thermal_daemon-2.5.2/test/thermal_config_dump.py        2023-01-30 
23:55:28.000000000 +0100
@@ -0,0 +1,122 @@
+# -*- coding: utf-8 -*-
+
+# script to dump thermal config from the running thermald via dbus
+# The caller must be in "power" group
+
+import dbus
+import os
+
+def dump_thermal_config():
+
+    if os.path.exists(file_name):
+        os.remove(file_name)
+
+    f_handle = open(file_name, 'a')
+
+    system_bus = dbus.SystemBus()
+
+    thd = system_bus.get_object('org.freedesktop.thermald',
+                                '/org/freedesktop/thermald')
+    thd_intf = dbus.Interface(thd,
+                              dbus_interface='org.freedesktop.thermald')
+
+    zone_count = thd_intf.GetZoneCount()
+    string_buffer = 'zones count:' + str(zone_count) + '\n'
+    f_handle.write(string_buffer)
+
+    sensor_count = thd_intf.GetSensorCount()
+    string_buffer = 'sensors count:' + str(sensor_count) + '\n'
+    f_handle.write(string_buffer)
+    f_handle.write('\n')
+
+    for i in range(zone_count):
+        zone = thd_intf.GetZoneInformation(i)
+
+        string_buffer = 'zone id' + ': ' + str(i) + '''
+
+'''
+        f_handle.write(string_buffer)
+
+        string_buffer = '\tzone name' + ': ' + zone[0] + '\n'
+        f_handle.write(string_buffer)
+
+        string_buffer = '\tSensor Count' + ': ' + str(zone[1]) + '\n'
+        f_handle.write(string_buffer)
+
+        for j in range(zone[1]):
+            sensor = thd_intf.GetZoneSensorAtIndex(i, j)
+            string_buffer = '\t\t sensor: ' + sensor + '\n'
+            f_handle.write(string_buffer)
+
+        string_buffer = '\tTrip Count' + ': ' + str(zone[2]) + '\n'
+        f_handle.write(string_buffer)
+
+        for j in range(zone[2]):
+            string_buffer = '\tTrip id' + ': ' + str(j) + '\n'
+            f_handle.write(string_buffer)
+
+            trip = thd_intf.GetZoneTripAtIndex(i, j)
+
+            string_buffer = '\t\t\t trip temp' + ': ' + str(trip[0]) \
+                + '\n'
+            f_handle.write(string_buffer)
+
+            string_buffer = '\t\t\t trip type' + ': ' + str(trip[1]) \
+                + '\n'
+            f_handle.write(string_buffer)
+
+            string_buffer = '\t\t\t sensor id' + ': ' + str(trip[2]) \
+                + '\n'
+            f_handle.write(string_buffer)
+
+        string_buffer = '''
+
+'''
+        f_handle.write(string_buffer)
+
+    cdev_count = thd_intf.GetCdevCount()
+    string_buffer = 'cdev count:' + str(cdev_count) + '\n'
+    f_handle.write(string_buffer)
+    f_handle.write('\n')
+
+    for i in range(cdev_count):
+        string_buffer = 'cdev id' + ': ' + str(i) + '\n'
+        f_handle.write(string_buffer)
+
+        cdev = thd_intf.GetCdevInformation(i)
+        string_buffer = '\t\t type' + ': ' + str(cdev[0]) + '\n'
+        f_handle.write(string_buffer)
+
+        string_buffer = '\t\t min_state' + ': ' + str(cdev[1]) + '\n'
+        f_handle.write(string_buffer)
+
+        string_buffer = '\t\t max_state' + ': ' + str(cdev[2]) + '\n'
+        f_handle.write(string_buffer)
+
+        string_buffer = '\t\t current_state' + ': ' + str(cdev[3]) \
+            + '\n'
+        f_handle.write(string_buffer)
+
+    f_handle.close()
+
+
+def remove_space(string):
+    return string.replace(' ', '')
+
+
+if __name__ == '__main__':
+    product_name = '/sys/class/dmi/id/product_name'
+
+    try:
+        file_name = open(product_name, 'r').read()
+    except:
+        print ('Error opening ', file_name)
+        sys.exit(2)
+
+    file_name = '/tmp/' + file_name.strip()
+    file_name = remove_space(file_name) + '.config'
+
+    print ('File Name to dump config:', file_name)
+
+    dump_thermal_config()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thermal_daemon-2.5.1/test/thermal_temp_dump.py 
new/thermal_daemon-2.5.2/test/thermal_temp_dump.py
--- old/thermal_daemon-2.5.1/test/thermal_temp_dump.py  1970-01-01 
01:00:00.000000000 +0100
+++ new/thermal_daemon-2.5.2/test/thermal_temp_dump.py  2023-01-30 
23:55:28.000000000 +0100
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# script to dump temperature samples every 10 seconds
+# The caller must be in "power" group to call the script
+
+import dbus
+import os
+import time
+
+
+def dump_temperature():
+
+    if os.path.exists(file_name):
+        os.remove(file_name)
+
+    f_handle = open(file_name, 'a')
+
+    system_bus = dbus.SystemBus()
+
+    thd = system_bus.get_object('org.freedesktop.thermald',
+                                '/org/freedesktop/thermald')
+    thd_intf = dbus.Interface(thd,
+                              dbus_interface='org.freedesktop.thermald')
+
+    sensor_count = thd_intf.GetSensorCount()
+    string_buffer = 'sensor count:' + str(sensor_count) + '\n'
+    f_handle.write(string_buffer)
+    f_handle.write('\n')
+
+    string_buffer = ''
+    for i in range(sensor_count):
+        sensor_info = thd_intf.GetSensorInformation(i)
+        string_buffer = string_buffer + sensor_info[0] + ','
+
+    f_handle.write(string_buffer)
+    f_handle.write('\n')
+
+    string_buffer = ''
+
+    f_lock = open('/tmp/thermal_temp_dump.lock', 'a')
+    f_lock.close()
+
+    while True:
+        if os.path.exists('/tmp/thermal_temp_dump.lock') == False:
+            break
+        string_buffer = ''
+        for i in range(sensor_count):
+            sensor = thd_intf.GetSensorTemperature(i)
+            string_buffer = string_buffer + str(sensor / 1000) + ','
+        f_handle.write(string_buffer)
+        f_handle.write('\n')
+        time.sleep(10)
+
+    f_handle.close()
+
+
+def remove_spaces(string):
+    return string.replace(' ', '')
+
+
+if __name__ == '__main__':
+    product_name = '/sys/class/dmi/id/product_name'
+
+    try:
+        file_name = open(product_name, 'r').read()
+    except:
+        print ('Error opening ', file_name)
+        sys.exit(2)
+
+    file_name = '/tmp/' + file_name.strip()
+    file_name = remove_spaces(file_name) + '.csv'
+
+    print ('File Name to dump config:', file_name)
+    print ('Before starting this script, do the following steps')
+    print ('sudo touch /var/run/thermald/debug_mode')
+    print ('sudo systemctl restart thermald')
+    print ('This will also dump power data from rapl as samples')
+    print ('This script will loop forever till user deletes file')
+    print ('/tmp/thermal_temp_dump.lock')
+
+    dump_temperature()

Reply via email to