Description of problem: The kernel-tools rpm is missing /usr/bin/intel-speed-select. The sources have been available upstream since kernel 5.3, and the Fedora kernel.spec file has the code to build it, but for some reason it's missing in the final rpm. $ rpm -q kernel-tools kernel-tools-5.8.8-200.fc32.x86_64 $ rpm -ql kernel-tools | grep intel-speed-select $ $ cd ~/fedpkg/kernel $ nl -ba kernel.spec | grep -C5 intel-speed-select 2277 %{tools_make} 2278 popd 2279 pushd tools/power/x86/turbostat 2280 %{tools_make} 2281 popd 2282 pushd tools/power/x86/intel-speed-select 2283 %{make} 2284 popd 2285 %endif 2286 %endif 2287 pushd tools/thermal/tmon/ -- 2509 %{tools_make} DESTDIR=%{buildroot} install 2510 popd 2511 pushd tools/power/x86/turbostat 2512 %{tools_make} DESTDIR=%{buildroot} install 2513 popd 2514 pushd tools/power/x86/intel-speed-select 2515 %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install 2516 popd 2517 %endif 2518 pushd tools/thermal/tmon 2519 %{tools_make} INSTALL_ROOT=%{buildroot} install -- 2819 %ifarch x86_64 2820 %{_bindir}/x86_energy_perf_policy 2821 %{_mandir}/man8/x86_energy_perf_policy* 2822 %{_bindir}/turbostat 2823 %{_mandir}/man8/turbostat* 2824 %{_bindir}/intel-speed-select 2825 %endif 2826 # cpupowerarchs 2827 %endif 2828 %{_bindir}/tmon 2829 %{_bindir}/iio_event_monitor $ git --no-pager blame -L 2282,+1 -L 2514,+1 -L 2824,+1 kernel.spec a41e34af278cd (Jeremy Cline 2020-02-25 10:35:59 -0500 2282) pushd tools/power/x86/intel-speed-select a41e34af278cd (Jeremy Cline 2020-02-25 10:35:59 -0500 2514) pushd tools/power/x86/intel-speed-select a41e34af278cd (Jeremy Cline 2020-02-25 10:35:59 -0500 2824) %{_bindir}/intel-speed-select https://src.fedoraproject.org/rpms/kernel/c/a41e34af278cd Version-Release number of selected component (if applicable): kernel-tools-5.8.8-200.fc32.x86_64 How reproducible: always Steps to Reproduce: 1. rpm -ql kernel-tools | grep intel-speed-select Actual results: intel-speed-select is missing Expected results: intel-speed-select is present Additional info:
I'm guessing the problem is the use of the %{make} macro instead of %{tools_make} on line 2283. I'll try a scratch build with %{tools_make} and see what happens.
Ok, I just learned kernel-tools is NOT built from the kernel src rpm in Fedora. It's a separate package: https://src.fedoraproject.org/rpms/kernel-tools https://koji.fedoraproject.org/koji/packageinfo?packageID=26062 Back to the drawing board...
A first attempt: diff --git a/kernel-tools.spec b/kernel-tools.spec index debafa2d534f..9e3e1361a5f2 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -264,6 +265,9 @@ chmod +x tools/power/cpupower/utils/version-gen.sh pushd tools/power/x86/turbostat %{tools_make} popd + pushd tools/power/x86/intel-speed-select + %{tools_make} + popd %endif #turbostat/x86_energy_perf_policy pushd tools/thermal/tmon/ %{tools_make} @@ -354,6 +358,9 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysc> pushd tools/power/x86/turbostat %{tools_make} DESTDIR=%{buildroot} install popd + pushd tools/power/x86/intel-speed-select + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + popd %endif #turbostat/x86_energy_perf_policy pushd tools/thermal/tmon %{tools_make} INSTALL_ROOT=%{buildroot} install @@ -426,6 +433,7 @@ popd %{_mandir}/man8/x86_energy_perf_policy* %{_bindir}/turbostat %{_mandir}/man8/turbostat* +%{_bindir}/intel-speed-select %endif %{_bindir}/tmon %{_bindir}/iio_event_monitor Unfortunately it failed to compile due to an undefined macro: make[1]: Entering directory '/builddir/build/BUILD/kernel-5.8.fc32/linux-5.8/tools/power/x86/intel-speed-select' gcc -Wp,-MD,./.isst-config.o.d -Wp,-MT,isst-config.o -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fcommon -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D"BUILD_STR(s)=#s" -c -o isst-config.o isst-config.c isst-config.c: In function 'for_each_online_package_in_set': isst-config.c:389:8: warning: implicit declaration of function 'CPU_ISSET_S' [-Wimplicit-function-declaration] 389 | if (!CPU_ISSET_S(i, present_cpumask_size, present_cpumask)) | ^~~~~~~~~~~ https://koji.fedoraproject.org/koji/taskinfo?taskID=52166494 I must be missing a header file. I'll keep working on it.
The problem was simple: CFLAGS needs to set -D_GNU_SOURCE both during build and install phases. This patch works: diff --git a/kernel-tools.spec b/kernel-tools.spec index debafa2d534f..50d1d9e6937c 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -264,6 +265,9 @@ chmod +x tools/power/cpupower/utils/version-gen.sh pushd tools/power/x86/turbostat %{tools_make} popd + pushd tools/power/x86/intel-speed-select + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" + popd %endif #turbostat/x86_energy_perf_policy pushd tools/thermal/tmon/ %{tools_make} @@ -354,6 +358,9 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower pushd tools/power/x86/turbostat %{tools_make} DESTDIR=%{buildroot} install popd + pushd tools/power/x86/intel-speed-select + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + popd %endif #turbostat/x86_energy_perf_policy pushd tools/thermal/tmon %{tools_make} INSTALL_ROOT=%{buildroot} install @@ -426,6 +433,7 @@ popd %{_mandir}/man8/x86_energy_perf_policy* %{_bindir}/turbostat %{_mandir}/man8/turbostat* +%{_bindir}/intel-speed-select %endif %{_bindir}/tmon %{_bindir}/iio_event_monitor Successful Koji scratch-build: https://koji.fedoraproject.org/koji/taskinfo?taskID=52545487 ~]# curl -s -O https://kojipkgs.fedoraproject.org//work/tasks/5487/52545487/kernel-tools-5.8.11-200.bz1882427.fc32.x86_64.rpm ~]# rpm -qlp kernel-tools-5.8.11-200.bz1882427.fc32.x86_64.rpm | grep intel-speed-select /usr/bin/intel-speed-select
Hello Justin, What do you think about making the above changes to kernel-tools.spec so intel-speed-select is included in the rpm?
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This is still an issue in F34 with kernel-tools-5.11.16-300.fc34.x86_64
Ugh, sorry. Not sure how I missed this, my bugzilla filters are not moving kernel-tools bugs where I expected them. I will get it added.
Added to all Fedora kernel-tools packages. It should show up in 5.11.19 builds tomorrow and 5.13-rc1 builds in rawhide.
Looks good! Thanks Justin! My laptop doesn't appear to support Speed Select, but the binary is present and runs. $ sudo dnf update -y \ https://kojipkgs.fedoraproject.org//packages/kernel-tools/5.11.19/300.fc34/x86_64/kernel-tools-5.11.19-300.fc34.x86_64.rpm \ https://kojipkgs.fedoraproject.org//packages/kernel-tools/5.11.19/300.fc34/x86_64/kernel-tools-libs-5.11.19-300.fc34.x86_64.rpm ... $ rpm -ql kernel-tools | grep intel-speed-select /usr/bin/intel-speed-select $ sudo modprobe isst_if_common $ sudo modprobe isst_if_mbox_pci $ sudo modprobe isst_if_mbox_msr modprobe: ERROR: could not insert 'isst_if_mbox_msr': No such device $ sudo modprobe isst_if_mmio $ sudo intel-speed-select Intel(R) Speed Select Technology Executing on CPU model:142[0x8e] Intel speed select drivers are not loaded on this system. Verify that kernel config includes CONFIG_INTEL_SPEED_SELECT_INTERFACE. If the config is included then this is not a supported platform.
FEDORA-2021-5ad5249c43 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5ad5249c43
FEDORA-2021-7c085ca697 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-7c085ca697
FEDORA-2021-9c0276e935 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-9c0276e935
FEDORA-2021-7c085ca697 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-7c085ca697` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7c085ca697 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-5ad5249c43 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-5ad5249c43` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5ad5249c43 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-9c0276e935 has been pushed to the Fedora 32 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9c0276e935` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-9c0276e935 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-5ad5249c43 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-7c085ca697 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-9c0276e935 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.