Sync from SUSE:ALP:Source:Standard:1.0 thermald revision a982fd0469c5292504cf7996ef59ddd6

This commit is contained in:
Adrian Schröter 2023-12-22 10:29:41 +01:00
commit 152a58e463
14 changed files with 613 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

16
_service Normal file
View File

@ -0,0 +1,16 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/intel/thermal_daemon.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="revision">master</param>
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@.git+%h</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/intel/thermal_daemon.git</param>
<param name="changesrevision">63b290f20da115f62f5bbd39a28fa5afe0f6efc2</param></service></servicedata>

14
fix-systemd-service.patch Normal file
View File

@ -0,0 +1,14 @@
--- a/data/thermald.service.in.orig 2021-07-15 09:25:50.933468593 +0200
+++ b/data/thermald.service.in 2021-07-15 09:26:52.193713129 +0200
@@ -6,7 +6,10 @@
Type=dbus
SuccessExitStatus=2
BusName=org.freedesktop.thermald
-ExecStart=@sbindir@/thermald --systemd --dbus-enable --adaptive
+Environment=THERMALD_CONFIG="/etc/thermald/thermal-conf.xml"
+Environment=THERMALD_POLL="4"
+EnvironmentFile=-/etc/sysconfig/thermald
+ExecStart=@sbindir@/thermald --systemd --dbus-enable --adaptive --config-file ${THERMALD_CONFIG} --poll-interval $THERMALD_POLL $THERMALD_OPTS
Restart=on-failure
[Install]

View File

@ -0,0 +1,13 @@
Index: thermal_daemon-2.5.4.0.git+63b290f/tools/thermal_monitor/ThermalMonitor.pro
===================================================================
--- thermal_daemon-2.5.4.0.git+63b290f.orig/tools/thermal_monitor/ThermalMonitor.pro
+++ thermal_daemon-2.5.4.0.git+63b290f/tools/thermal_monitor/ThermalMonitor.pro
@@ -14,7 +14,7 @@ CONFIG(release): DEFINES += QT_NO_DEBUG_
TARGET = ThermalMonitor
TEMPLATE = app
-LIBS += -lQCustomPlot
+LIBS += -lqcustomplot
SOURCES += main.cpp\
mainwindow.cpp \

38
sysconfig.thermald Normal file
View File

@ -0,0 +1,38 @@
## Path: Hardware/Thermald
## Description: Thermald settings
## Type: string
## Default: ""
## ServiceRestart: thermald
#
# Options for thermald
#
# For the active power limits adjustment (since 1.9) see
# - /usr/share/doc/packages/thermald/README.txt
# - /usr/share/doc/packages/thermald/thermald_optimization_with_dptfxtract
# - https://github.com/intel/dptfxtract
# - thermald(8)
#
# eg.
# --workaround-enabled
# Enable special workarounds. This is currently used for /dev/mem based power control.
#
# --disable-active-power
# Disable active power management. This will not set active power limits.
#
THERMALD_OPTS=""
## Type: string
## Default: "/etc/thermald/thermal-conf.xml"
#
# The config file.
#
THERMALD_CONFIG="/etc/thermald/thermal-conf.xml"
## Type: integer
## Default: 4
#
# Poll interval in seconds: Poll for zone temperature changes.
# To disable polling, set to zero. Polling can only be disabled,
# if available temperature sensors can notify temperature change asynchronously.
#
THERMALD_POLL="4"

11
thermal-monitor.desktop Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=Thermal Monitor
GenericName=Monitoring of temperature
GenericName[de]=Überwachung der Temperatur
Comment=Displays current temperature readings on a graph
Comment[de]=Zeigt die aktuellen Temperaturmesswerte in einer Grafik an
Exec=/usr/bin/ThermalMonitor
Terminal=false
Icon=thermal-monitor
Type=Application
Categories=Qt;System;Monitor;

BIN
thermal-monitor.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
thermal_daemon-2.5.4.0.git+63b290f.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

4
thermal_daemon.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: thermal_daemon
version: 2.5.4.0.git+63b290f
mtime: 1691885707
commit: 63b290f20da115f62f5bbd39a28fa5afe0f6efc2

1
thermald-group.conf Normal file
View File

@ -0,0 +1 @@
g power - -

320
thermald.changes Normal file
View File

@ -0,0 +1,320 @@
-------------------------------------------------------------------
Mon Dec 11 13:43:22 UTC 2023 - Fabian Vogt <fvogt@suse.com>
- Remove use of %with_thermalmonitor where not necessary
- Check for %is_opensuse instead of %suse_version
- Remove wrong %config from a data file
- Package the ThermalMonitor license file
-------------------------------------------------------------------
Thu Nov 30 08:16:46 CET 2023 - aschnell@suse.com
- build ThermalMonitor only if qcustomplot is available
-------------------------------------------------------------------
Mon Sep 25 13:52:53 UTC 2023 - trenn@suse.de
- jsc#PED-5716 Enable support for Thermal Controls on platform
- Move of dbus config files from /etc to /usr/share
- Fix wrongly written library name
A fix_qcustomplot_name.patch
- Make use of _service (git scm) service file:
A _service
A _servicedata
A thermal_daemon-2.5.4.0.git+63b290f.obscpio
A thermal_daemon.obsinfo
- Update to version 2.5.4.0.git+63b290f:
* Release 2.5.4
* Change the sorting order when min_max_valid
* Process case when target matches after init
* Remove memset for pid_param_t to 0
* Remove check for new_passive < critical
* domain_name not set and used in thd_cdev_rapl
* build warning, ret is assigned for sysfs write
* Remove duplicate type_type == HOT comparison
-------------------------------------------------------------------
Wed Jul 12 13:48:25 UTC 2023 - Andrea Manzini <andrea.manzini@suse.com>
- update to 2.5.3:
* Support for Meteor Lake
-------------------------------------------------------------------
Sun Apr 16 17:45:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.5.2:
* Support Alder Lake N
* Support ITMT version 2, which is used in some Raptor Lake
systems
-------------------------------------------------------------------
Fri Nov 18 11:38:56 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 2.5.1:
+ Always match motion = 0.
+ Add RaptorLake S CPU models.
+ Manual: thermal-conf.xml - clean up lintian warnings and .IP
formatting.
-------------------------------------------------------------------
Tue Oct 4 08:12:40 UTC 2022 - Timo Jyrinki <tjyrinki@suse.com>
- Remove --disable-active-power from the service file and sysconfig (boo#1203991)
-------------------------------------------------------------------
Thu Jul 21 08:10:23 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
- Update to 2.5:
* Support of new thermal table for Alder Lake
* Add Raptor Lake in the list
-------------------------------------------------------------------
Tue Mar 29 07:27:03 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Update to 2.4.9:
* Fix performance issues for Dell Latitude 5421
* Fix performance issues for Dell Latitude 7320/7420
(Depend on kernel patch "thermal: int340x: Update OS policy capability handshake")
* Adaptive improvements from Benzea
* Thermal Monitor fixes and cosmetic updates
* Documentation updates from Colin King
* Static analysis fixes from Benzea
(includes power-profiles-daemon integration and
removal of deprecated UPower API use)
* Fix test for compressed data vaults
- Update to 2.4.8
* Fix Ideapad thermal shutdown issue #328
- Update to 2.4.7:
* Fix AC/DC power limit issue in some HP TigerLake systems
* Regression fix for RAPL MSR usage in xml config file
* Added Japer Lake and Alder Lake CPU models
* Debug scripts for log collection to upload
- Drop patches, now upstream:
* fix-man-thermald_8.patch
- Don't build with -Werror
-------------------------------------------------------------------
Thu Jul 15 07:31:17 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>
- Update to 2.4.6:
* Support for Rocket Lake and Commet Lake CPU model
* Tiger Lake DPTF tables support
* CPU stuck at low frequency on two models (issue 280)
* Changes related to PID and exit codes
* Minor change for Dell XPS 13 with Tiger Lake.
* Issue with Dell Latitude 7400.
* Allow --ingore-cpuid-check to use with --adaptive option
* Address low performance with Dell Latitude 5420 with the latest BIOS
* Fix for Ubuntu bug 1930422
- Rebase fix-man-thermald_8.patch
- Rebase fix-systemd-service.patch
- Drop fix-32bit-build.patch
-------------------------------------------------------------------
Wed Oct 21 09:43:37 UTC 2020 - Libor Pechacek <lpechacek@gmx.com>
- Update to "Release 2.3"
* Merged changes from mjg59 for adaptive
* Requires Linux kernel version 5.8 or later
* By default tries --adaptive and fallback to old style
* Atleast some level of success to use adaptive option on:
(not expected to be on par with Windows DPTF)
Dell XPS 13 9360
Dell XPS 13 9370
Dell XPS 13 9380
Dell XPS 13 7390 2-in-1
Dell Insperion_7386
HP Spectre x360 Convertible 15-ch0xx
HP ZBook 15 G5
Lenovo Thinkpad T480
* thermald will not run on Lenovo platforms with lap mode sysfs entry
- Update to "Release 2.2"
* Ignore PPCC power limits when max and min power is same
* Regression in cpufreq cooling device causing min state to get stuck
- Update to "Release 2.1"
* Workaround for invalid PPCC power limits
* Reduce polling for power when PPCC is not present
- Update to "Release 2.0"
* Tiger Lake support
* PL1 limit setting from PPCC as is
* Optimize multi step, multi zone control
* Add new tag for product identification "product_sku"
- Align build procedure with upstream recommendations
- Fix build on 32bit platforms
Added patch fix-32bit-build.patch
-------------------------------------------------------------------
Tue Aug 18 15:32:20 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix invalid usage of %{_libexecdir} for systemd owned paths below
%{_prefix}/lib.
-------------------------------------------------------------------
Wed Jan 1 16:12:40 UTC 2020 - munix9@googlemail.com
- Update to "Release 1.9.1"
* Remove default CPU temperature compensation for auto generated
configuration from dptfxtract
* Minor Android build warnings
- Update to "Release 1.9"
* The major change in this version is the active power limits
adjustment. This will be useful to improve performance on some
newer platform. But this will will lead to increase in CPU and
other temperatures. Hence this is important to run dptfxtract
version 1.4.1 tool to get performance sensitive thermal limits
(https://github.com/intel/dptfxtract/commits/v1.4.1).
If the default configuration picked up by thermald is not
optimal, user can select other less aggressive configuration.
Refer to the README here
https://github.com/intel/dptfxtract/blob/master/README.txt
This power limit adjustment depends on some kernel changes
released with kernel version v5.3-rc1. For older kernel
release run thermald with --workaround-enabled
But this will depend on /dev/mem access, which means that
platforms with secure boot must update to newer kernels.
* TCC offset limits
As reported in some forums that some platforms have issue with
high TCC offset settings. Under some special condition this
offset is adjusted. But currently needs msr module loaded to
get MSR access from user space. I have submitted a patch to
have this exported via sysfs for v5.4+ kernel.
* To disable all the above performance optimization, use
--disable-active-power. Since Linux Thermal Daemon
implementation doesn't have capability to match Intel® Dynamic
Platform and Thermal Framework (DPTF) implementation on other
Operating systems, this option is very important if the user
is experiencing thermal issues. If there is some
OEM/manufactures have issue with this implementation, please
get back to me for blacklist of platforms.
* Added support for Ice Lake platform
* ThermalMonitor
Cleaned up the plots, so that only active sensors and trips
gets plotted.
- removed fix_long_int_i586_issue.patch and
fix_missing_include.patch (solved upstream)
- added fix-man-thermald_8.patch and fix-systemd-service.patch
- added "power" system group
- added fillup-templates/sysconfig.thermald
- added thermal-monitor package
-------------------------------------------------------------------
Fri Nov 2 17:28:31 UTC 2018 - trenn@suse.de
- Fix build for Leap 42.3 (include missing header file)
A fix_missing_include.patch
- Fix build for i586
A fix_long_int_i586_issue.patch
- Remove thermal-conf.xml as done mainline and add it to the docs
directory. This is an example only.
-------------------------------------------------------------------
Mon Oct 1 08:13:40 UTC 2018 - egotthold@suse.com
- Update to "Release 1.8"
* Support of KBL-G with discrete GPU
* Fast removal of any cooling action which was applied once
temperature is normal
* Android support
* Add Hot trip point, which when reached just calls "suspend"
* Adding new tag "DependsOn" which enable/disable trip based on some other trip
* Polling interval can be configured via thermal xml config
* Per trip PID control
* Simplify RAPL cooling device
- Update to "Release 1.7.2"
* Workwround for platform with invalid thermal table
* Error printing for RAPL constraint sysfs read on failure
* thermal-conf.xml.auto can be read from /etc/thermald, which allows user to
modify generated thermal-conf.xml from /var/run/thermald and copy to
/etc/termald
-------------------------------------------------------------------
Wed Dec 13 14:55:43 UTC 2017 - mpluskal@suse.com
- Update to version 1.7.1:
* Removed dptfxtract binary as there is an issue in packaging
this with GPL source for distributions
- Changes for version 1.7.0:
* Add GeminiLake
* Add dptfxtract tool, which converts DPTF tables to thermald
tables using best effort
* Changes to accommodate dptfxtract tool conversions
* Better facility to configure fan controls
* PID control optimization
* Fix powerlimit write errors because of bad FW settings of power
limits
* More restrictive compile options and warnings as errors
* Improve logging
* Android build fixes
-------------------------------------------------------------------
Mon Mar 27 14:00:09 UTC 2017 - fvogt@suse.com
- Use the correct file for installation as module list (boo#1028596)
- Update to version 1.6:
* Add Kabylake and missing Broadwell CPU model
* Removed deprecated modules
* Added passive trip between critical and max, to allow fan to take control first
* Fixed clash when multiple zones and trips controlling same cdev
-------------------------------------------------------------------
Wed Jan 11 08:18:17 UTC 2017 - mpluskal@suse.com
- Update to version 1.5.4:
* Use Processor thermal device in lieu of CPU zone when present
* Haswell/Skylake PCH sensor
* Fix regression in LCD/Backlight path
- Packaging cleanup:
- Run spec-cleaner
- Use pretty name for downloaded archive
- Drop not needed service
- Remove fedora conditionals
-------------------------------------------------------------------
Tue Mar 29 11:17:35 UTC 2016 - dvaleev@suse.com
- Set exclusivearch to intel architectures
-------------------------------------------------------------------
Tue Mar 8 13:26:49 UTC 2016 - fvogt@suse.com
- Disable installation of upstart file
-------------------------------------------------------------------
Mon Mar 7 09:53:57 UTC 2016 - fvogt@suse.com
- Remove implicit %configure parameters
-------------------------------------------------------------------
Mon Mar 7 08:17:11 UTC 2016 - fvogt@suse.com
- Change URL from GitHub to the official page
-------------------------------------------------------------------
Sun Mar 6 21:31:00 CET 2016 - bosim@opensuse.org
- Upgraded to upstream version 1.5.3
-------------------------------------------------------------------
Fri Nov 6 10:27:55 UTC 2015 - fvogt@suse.com
- Disable _service and run manually
-------------------------------------------------------------------
Tue Nov 3 10:19:29 UTC 2015 - fvogt@suse.com
- Initial commit
- Branch from home:assmannst, fix various small issues

2
thermald.conf Normal file
View File

@ -0,0 +1,2 @@
msr
coretemp

161
thermald.spec Normal file
View File

@ -0,0 +1,161 @@
#
# spec file for package thermald
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
%global with_thermalmonitor 0%{?is_opensuse}
Name: thermald
Version: 2.5.4.0.git+63b290f
Release: 0
Summary: The Linux Thermal Daemon program from 01.org
License: GPL-2.0-or-later
Group: System/Daemons
URL: https://01.org/linux-thermal-daemon
Source0: thermal_daemon-%{version}.tar.xz
Source1: %{name}.conf
Source2: %{name}-group.conf
Source3: sysconfig.%{name}
Source10: thermal-monitor.desktop
Source11: thermal-monitor.png
Patch0: fix-systemd-service.patch
Patch1: fix_qcustomplot_name.patch
BuildRequires: autoconf-archive
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: sysuser-shadow
BuildRequires: sysuser-tools
BuildRequires: update-desktop-files
%if %{with_thermalmonitor}
BuildRequires: qcustomplot-devel
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Widgets)
%endif
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk-doc)
BuildRequires: pkgconfig(libevdev)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(upower-glib)
Requires(post): %fillup_prereq
Suggests: acpica
Suggests: dptfxtract
Suggests: thermal-monitor
ExclusiveArch: %{ix86} x86_64
%sysusers_requires
%description
Thermald is a Linux daemon used to prevent the overheating of platforms.
This daemon monitors temperature and applies compensation using available cooling methods.
%package -n thermal-monitor
Summary: Displays current temperature readings
License: GPL-3.0-or-later
Group: Hardware/Other
Requires: %{name} >= 1.4.3
Requires: group(power)
%description -n thermal-monitor
Thermal Monitor displays current temperature readings on a graph.
To communicate with thermald via dbus, the user has to be member of "power" group.
%prep
%autosetup -n thermal_daemon-%{version} -p1
%build
NO_CONFIGURE=1 ./autogen.sh
%configure --disable-werror
%make_build CFLAGS="%{optflags}"
%sysusers_generate_pre %{SOURCE2} power
%if %{with_thermalmonitor}
pushd tools/thermal_monitor
%qmake5 ThermalMonitor.pro
%make_build
popd
%endif
%install
%make_install
ln -s service %{buildroot}%{_sbindir}/rcthermald
install -D -m 0755 -t %{buildroot}%{_sbindir}/ tools/thermald_set_pref.sh
install -D -m 0644 -t %{buildroot}%{_prefix}/lib/modules-load.d/ %{SOURCE1}
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
install -D -m 0644 -t %{buildroot}%{_fillupdir}/ %{SOURCE3}
%if %{with_thermalmonitor}
install -D -m 0755 -t %{buildroot}%{_bindir}/ tools/thermal_monitor/ThermalMonitor
install -D -m 0644 -t %{buildroot}%{_datadir}/applications/ %{SOURCE10}
install -D -m 0644 -t %{buildroot}%{_datadir}/pixmaps/ %{SOURCE11}
%suse_update_desktop_file thermal-monitor
%endif
%pre -f power.pre
%service_add_pre thermald.service
%post
%fillup_only
%service_add_post thermald.service
%preun
%service_del_preun thermald.service
%postun
%service_del_postun thermald.service
%files
%license COPYING
%doc README.txt data/thermal-conf.xml
%doc test/thermald_optimization_with_dptfxtract
%dir %{_datadir}/dbus-1/system.d
%{_datadir}/dbus-1/system.d/org.freedesktop.thermald.conf
%dir %{_sysconfdir}/thermald
%config(noreplace) %{_sysconfdir}/thermald/thermal-cpu-cdev-order.xml
%dir %{_datadir}/dbus-1/system-services
%{_datadir}/dbus-1/system-services/org.freedesktop.thermald.service
%{_fillupdir}/sysconfig.%{name}
%{_mandir}/man5/thermal-conf.xml.5%{?ext_man}
%{_mandir}/man8/thermald.8%{?ext_man}
%dir %{_prefix}/lib/modules-load.d
%{_prefix}/lib/modules-load.d/thermald.conf
%{_sbindir}/rcthermald
%{_sbindir}/thermald
%{_sbindir}/thermald_set_pref.sh
%{_sysusersdir}/%{name}.conf
%{_unitdir}/thermald.service
%if %{with_thermalmonitor}
%files -n thermal-monitor
%license tools/thermal_monitor/COPYING
%{_bindir}/ThermalMonitor
%{_datadir}/applications/thermal-monitor.desktop
%{_datadir}/pixmaps/thermal-monitor.png
%endif
%changelog