Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #223123 > unrolled thread
| Started by | l0f4r0@tuta.io |
|---|---|
| First post | 2020-06-06 18:00 +0200 |
| Last post | 2020-06-07 10:10 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.debian.user
Issue with disabling Intel turbo boost via systemd l0f4r0@tuta.io - 2020-06-06 18:00 +0200
Re: Issue with disabling Intel turbo boost via systemd Reco <recoverym4n@enotuniq.net> - 2020-06-06 20:20 +0200
Re: Issue with disabling Intel turbo boost via systemd l0f4r0@tuta.io - 2020-06-07 00:20 +0200
Re: Issue with disabling Intel turbo boost via systemd Reco <recoverym4n@enotuniq.net> - 2020-06-07 10:40 +0200
Re: Issue with disabling Intel turbo boost via systemd l0f4r0@tuta.io - 2020-06-07 21:40 +0200
Re: Issue with disabling Intel turbo boost via systemd Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2020-06-07 02:00 +0200
Re: Issue with disabling Intel turbo boost via systemd l0f4r0@tuta.io - 2020-06-07 10:10 +0200
| From | l0f4r0@tuta.io |
|---|---|
| Date | 2020-06-06 18:00 +0200 |
| Subject | Issue with disabling Intel turbo boost via systemd |
| Message-ID | <AeJoJ-4xa-1@gated-at.bofh.it> |
Hi, I have frequent warning/4 entries in my journalctl like this one (dozens/day): kernel: mce: CPU[X]: Package temperature above threshold, cpu clock throttled So I decided some time ago to create the following systemd service (/etc/systemd/system/disable-turbo-boost.service) in order to deactivate my Intel processor turbo boost: [Unit] Description=Disable turbo boost on Intel CPU [Service] ExecStart=/bin/sh -c "/usr/bin/echo 1 >/sys/devices/system/cpu/intel_pstate/no_turbo" ExecStop=/bin/sh -c "/usr/bin/echo 0 >/sys/devices/system/cpu/intel_pstate/no_turbo" RemainAfterExit=yes [Install] WantedBy=sysinit.target I enabled this service: systemctl enable disable-turbo-boost.service After some tests, I thought everything was ok with this service but today I've just discovered that my warning/4 are always triggered. Here are 2 interesting outputs: systemctl status disable-turbo-boost.service disable-turbo-boost.service - Disable turbo boost on Intel CPU Loaded: loaded (/etc/systemd/system/disable-turbo-boost.service; enabled; vendor preset: enabled) Active: active (exited) since Mon 2020-05-25 10:26:20 CEST; 1 weeks 5 days ago Main PID: 5428 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4915) Memory: 0B CGroup: /system.slice/disable-turbo-boost.service <http://system.slice/disable-turbo-boost.service> may 25 10:26:20 systemd[1]: Started Disable turbo boost on Intel CPU. cat /sys/devices/system/cpu/intel_pstate/no_turbo 0 As you can see, turbo boost is still active (no no_turbo) despite disable-turbo-boost.service being active as well! However, if I stop/start/status the same service, I get the following: systemctl stop disable-turbo-boost.service systemctl start disable-turbo-boost.service systemctl status disable-turbo-boost.service disable-turbo-boost.service - Disable turbo boost on Intel CPU Loaded: loaded (/etc/systemd/system/disable-turbo-boost.service; enabled; vendor preset: enabled) Active: active (exited) since Sat 2020-06-06 16:34:08 CEST; 3s ago Process: 23659 ExecStart=/bin/sh -c /usr/bin/echo 1 >/sys/devices/system/cpu/intel_pstate/no_turbo (code=exited, status=0/SUCCESS) Main PID: 23659 (code=exited, status=0/SUCCESS) jun 06 16:34:08 systemd[1]: Started Disable turbo boost on Intel CPU. cat /sys/devices/system/cpu/intel_pstate/no_turbo 1 Now my turbo boost is deactivated as intended while my service is active... Do you have an idea why my turbo boost was not active anymore please? Is it possible that another prcess put the "0" value after my service was launched the last time? If so, how to know which one? Lastly, why don't my 2 systemctl status commands show the exact same kinds of outputs (the first one mentions "Tasks", "Memory" and "CGroup" while the 2nd one tells us about "Process")? NB: I run Debian 10 (kernel 5.4.8-1~bpo10+1) on a Lenovo ThinkPad X390 Quad Core i7-8565U. Thank you in advance :) Best regards, l0f4r0
[toc] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2020-06-06 20:20 +0200 |
| Message-ID | <AeLAe-61e-7@gated-at.bofh.it> |
| In reply to | #223123 |
Hi. On Sat, Jun 06, 2020 at 05:39:00PM +0200, l0f4r0@tuta.io wrote: > Hi, > > I have frequent warning/4 entries in my journalctl like this one (dozens/day): > kernel: mce: CPU[X]: Package temperature above threshold, cpu clock throttled > > So I decided some time ago to create the following systemd service > (/etc/systemd/system/disable-turbo-boost.service) in order to deactivate my > Intel processor turbo boost: *Shrugs*. "apt-get install sysfsutils" is the universal solution to such problems. > Do you have an idea why my turbo boost was not active anymore please? It's possible that you have laptop-mode-tools package installed. Among with the other things, it tries to control this particular sysfs knob. Search for /etc/laptop-mode/conf.d/intel_pstate.conf, ensure that CONTROL_INTEL_PSTATE_NO_TURBO is set to one. Reco
[toc] | [prev] | [next] | [standalone]
| From | l0f4r0@tuta.io |
|---|---|
| Date | 2020-06-07 00:20 +0200 |
| Message-ID | <AePkt-8ju-7@gated-at.bofh.it> |
| In reply to | #223127 |
Hi Reco, Thank you for your feedback. 6 juin 2020 à 19:55 de recoverym4n@enotuniq.net: > On Sat, Jun 06, 2020 at 05:39:00PM +0200, l0f4r0@tuta.io wrote: > >> I have frequent warning/4 entries in my journalctl like this one (dozens/day): >> kernel: mce: CPU[X]: Package temperature above threshold, cpu clock throttled >> >> So I decided some time ago to create the following systemd service >> (/etc/systemd/system/disable-turbo-boost.service) in order to deactivate my >> Intel processor turbo boost: >> > *Shrugs*. "apt-get install sysfsutils" is the universal solution to such problems. > I've just installed this package. Am I supposed to add now "/sys/devices/system/cpu/intel_pstate/no_turbo=1" in /etc/sysfs.conf? Or maybe via a specific file in /etc/sysfs.d/ instead (I presume this directory is setup so changes are not overwritten during an upgrade)? I hope it's going to work because it seems that sysfs is sometimes triggered too late to be taken into account correctly, on Ubuntu 12.04.3 at least (https://bugs.launchpad.net/ubuntu/+source/sysfsutils/+bug/955918). I'm not used at all to systool and I'm very suprised to see there is almost no documentation/tutorial about it on the internet. People probably probe /sys directly to get what they are looking for... >> Do you have an idea why my turbo boost was not active anymore please? >> > It's possible that you have laptop-mode-tools package installed. Among > with the other things, it tries to control this particular sysfs knob. > Search for /etc/laptop-mode/conf.d/intel_pstate.conf, ensure that > CONTROL_INTEL_PSTATE_NO_TURBO is set to one. > You get it right, I had laptop-mode-tools installed indeed! Well done ;)You know what, I've just uninstalled this package. Frankly I was not really happy with the concept anyway. As I don't have motivation/time to understand every kinds of tweaks it operates exactly, I prefer it doesn't modify my system just to save some % of battery. Best regards, l0f4r0
[toc] | [prev] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2020-06-07 10:40 +0200 |
| Message-ID | <AeZ0u-5Jr-17@gated-at.bofh.it> |
| In reply to | #223142 |
Hi. On Sun, Jun 07, 2020 at 12:01:58AM +0200, l0f4r0@tuta.io wrote: > Hi Reco, > > Thank you for your feedback. > > 6 juin 2020 à 19:55 de recoverym4n@enotuniq.net: > > > On Sat, Jun 06, 2020 at 05:39:00PM +0200, l0f4r0@tuta.io wrote: > > > >> I have frequent warning/4 entries in my journalctl like this one (dozens/day): > >> kernel: mce: CPU[X]: Package temperature above threshold, cpu clock throttled > >> > >> So I decided some time ago to create the following systemd service > >> (/etc/systemd/system/disable-turbo-boost.service) in order to deactivate my > >> Intel processor turbo boost: > >> > > *Shrugs*. "apt-get install sysfsutils" is the universal solution to such problems. > > > I've just installed this package. > Am I supposed to add now "/sys/devices/system/cpu/intel_pstate/no_turbo=1" in /etc/sysfs.conf? No, you're supposed to add this line: devices/system/cpu/intel_pstate/no_turbo = 1 Leading "/sys" is always omitted in sysfsutils. > Or maybe via a specific file in /etc/sysfs.d/ instead (I presume this directory is setup so changes are not overwritten during an upgrade)? Whatever suits you. End result will be the same. > I hope it's going to work because it seems that sysfs is sometimes triggered too late to be taken into account correctly, on Ubuntu 12.04.3 at least (https://bugs.launchpad.net/ubuntu/+source/sysfsutils/+bug/955918). > I'm not used at all to systool and I'm very suprised to see there is almost no documentation/tutorial about it on the internet. > People probably probe /sys directly to get what they are looking for... > > >> Do you have an idea why my turbo boost was not active anymore please? > >> > > It's possible that you have laptop-mode-tools package installed. Among > > with the other things, it tries to control this particular sysfs knob. > > Search for /etc/laptop-mode/conf.d/intel_pstate.conf, ensure that > > CONTROL_INTEL_PSTATE_NO_TURBO is set to one. > > > You get it right, I had laptop-mode-tools installed indeed! Well done ;)You know what, I've just uninstalled this package. :) Reco
[toc] | [prev] | [next] | [standalone]
| From | l0f4r0@tuta.io |
|---|---|
| Date | 2020-06-07 21:40 +0200 |
| Message-ID | <Af9jb-3rY-1@gated-at.bofh.it> |
| In reply to | #223157 |
Hi, 7 juin 2020 à 10:21 de recoverym4n@enotuniq.net: > No, you're supposed to add this line: > > devices/system/cpu/intel_pstate/no_turbo = 1 > > Leading "/sys" is always omitted in sysfsutils. > > >> Or maybe via a specific file in /etc/sysfs.d/ instead (I presume this directory is setup so changes are not overwritten during an upgrade)? >> > Whatever suits you. End result will be the same. > Thanks Reco, I've created a (644) /etc/sysfs.d/intel_pstate_no_turbo.conf file with the appropriate command and then did a "systemctl reload-or-restart sysfsutils.service". * Maybe a "systemctl reload-or-restart sysfsconf.service" would have been sufficient? * We'll see now if it's more persistent than the systemd method. Could it be related to suspend mode? I put my laptop multiple times a day in suspend mode, I don't know if it affects /sys... Thanks & Best regards, l0f4r0
[toc] | [prev] | [next] | [standalone]
| From | Joe Pfeiffer <pfeiffer@cs.nmsu.edu> |
|---|---|
| Date | 2020-06-07 02:00 +0200 |
| Message-ID | <AeQTg-Ea-11@gated-at.bofh.it> |
| In reply to | #223123 |
l0f4r0@tuta.io writes: > Hi, > > I have frequent warning/4 entries in my journalctl like this one (dozens/day): > kernel: mce: CPU[X]: Package temperature above threshold, cpu clock throttled Lucky you! My laptop just went ahead and went into thermal shutdown before the system noticed it was getting hot. This doesn't directly address your questions involving controlling turbo boost with the OS, but I was able to disable it in the UEFI.
[toc] | [prev] | [next] | [standalone]
| From | l0f4r0@tuta.io |
|---|---|
| Date | 2020-06-07 10:10 +0200 |
| Message-ID | <AeYxs-5zC-9@gated-at.bofh.it> |
| In reply to | #223146 |
Hi Joe, 7 juin 2020 à 01:31 de pfeiffer@cs.nmsu.edu: > Lucky you! My laptop just went ahead and went into thermal shutdown > before the system noticed it was getting hot. > Ow! Frustrating... Frequently? What computer/model do you have? > This doesn't directly address your questions involving controlling turbo > boost with the OS, but I was able to disable it in the UEFI. > You disabled Turbo boost explicitely in your UEFI? The last time I checked, my UEFI only mentions Hyper Threading, not Turbo boost (deactivating HT didn't help me)... The most confusing part for me is that I haven't managed so far to confirm manually (via sensors) that CPU temperatures are indeed sometimes too high so CPU clock needs to be throttled. Even when I'm stressing my CPU, I don't get these warning/4 systematically... I see 3 situations: * The warnings are not legitimate, my kernel is mistaken about the right temperatures because of a bug/bad setting (it would be unfortunate because it would limit/throttle my CPU for no reason) * CPU temperatures are indeed too high so as you said I'm lucky my kernel detects this so my laptop does not go down. However, I'm very surprised because my laptop is brand new (at least it was 1 year ago when I started receiving these kernel alerts) so cooling features should still be efficient (I don't feel my computer is really hot on my lap) otherwise we could probably say there is a mistake with its conception in Lenovo engineering laboratory... * CPU temperatures are indeed too high but it's perfectly normal, sometimes CPU is too much stressed so the it should be dealt with. It is loggued but I should not pay too much attention to that (I remember an article stating: "Don't start checking the kernel ring buffer, you are looking for problems ahead...") NB: with my previous kernel (stable one, not backported), those CPU issues were considered as crit/2. Now they are warning/4. Maybe later at this pace, they will be demoted to notice/5 or info/6... ^^ Thank you in advance & Best regards, l0f4r0
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web