throttled.spec 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. %global _hardened_build 1
  2. %define debug_package %{nil}
  3. Name: throttled
  4. Version: 0.8
  5. Release: 2
  6. Summary: Workaround for Intel throttling issues in Linux
  7. License: MIT
  8. URL: https://github.com/erpalma/throttled
  9. Source0: https://github.com/erpalma/throttled/archive/v%{version}.tar.gz
  10. BuildRequires: python3-devel
  11. BuildRequires: systemd-units
  12. Requires: python3
  13. Requires: python3-gobject
  14. # Requires: python3-configparser # Not available in F33, install using pip instead
  15. Requires: systemd
  16. Conflicts: thermald
  17. %description
  18. This tool was originally developed to fix Linux CPU throttling issues affecting
  19. Lenovo T480 / T480s / X1C6.
  20. The CPU package power limit (PL1/2) is forced to a value of 44 W (29 W on
  21. battery) and the temperature trip point to 95 'C (85 'C on battery) by
  22. overriding default values in MSR and MCHBAR every 5 seconds (30 on battery) to
  23. block the Embedded Controller from resetting these values to default.
  24. %prep
  25. %autosetup
  26. %build
  27. %install
  28. install -D lenovo_fix.py %{buildroot}/%{_bindir}/%{name}
  29. install -D mmio.py %{buildroot}/%{python3_sitelib}/mmio.py
  30. install -D etc/lenovo_fix.conf %{buildroot}/%{_sysconfdir}/%{name}.conf
  31. install -D systemd/lenovo_fix.service %{buildroot}/%{_unitdir}/%{name}.service
  32. %post
  33. %systemd_post %{name}.service
  34. %preun
  35. %systemd_preun %{name}.service
  36. %postun
  37. %systemd_postun_with_restart %{name}.service
  38. %files
  39. %defattr(-,root,root,-)
  40. %attr(755, root, root) %{_bindir}/%{name}
  41. %attr(644, root, root) %{python3_sitelib}/mmio.py
  42. %attr(644, root, root) %{python3_sitelib}/__pycache__/*
  43. %config(noreplace) %attr(640, %{name}, %{name}) %{_sysconfdir}/%{name}.conf
  44. %attr(644, root, root) %{_unitdir}/%{name}.service
  45. %changelog
  46. * Thu May 02 2019 Arun Babu Neelicattu <arun.neelicattu@twyla.ai> - 0.6-1
  47. - Upgrade to 0.6
  48. * Mon Mar 11 2019 Arun Babu Neelicattu <arun.neelicattu@gmail.com> - 0.5-4
  49. - Add conflict for thermald
  50. * Mon Mar 11 2019 Arun Babu Neelicattu <arun.neelicattu@gmail.com> - 0.5-3
  51. - Fix unit file to use configuration
  52. * Mon Mar 11 2019 Arun Babu Neelicattu <arun.neelicattu@gmail.com> - 0.5-2
  53. - Add default configuration file
  54. - Fix file permissions
  55. * Mon Mar 11 2019 Arun Babu Neelicattu <arun.neelicattu@gmail.com> - 0.5-1
  56. - Initial release of version 0.5