You are not logged in.

#1 2019-01-23 07:42:49

logansdaddy
Member
Registered: 2019-01-23
Posts: 7

intel_pstate no_turbo issue

I have a Lenovo Yoga 730 15kib laptop running arch +dwm. I'm using kernel 4.20.3-arch1-1-ARCH and the intel microcode. My system is up to date.

98% of the time my laptop works fine when running on battery power. The /sys/devices/system/cpu/intel_pstate/no_turbo is set to 0 until my battery level goes below 10%. Then it gets set to 1 automatically which makes sense to save power. Once I plug back in and battery level rises above 10% the no_turbo gets set back to 0 magically I'm assuming by the intel_pstate driver.

Every once in a while when I unplug ( like right now ), even if my battery level is at 100% or close to it the no_turbo gets set to 1 and I can't set it back to 0. I've tried sudo and even su as root but nano gives me the error:  [ Error writing no_turbo: Operation not permitted ]. When this happens it seems the only way to fix it is to reboot and then all is working again, until the next time it happens.


Here are the logs with regards to intel_pstate:


Jan 22 13:35:46 <hostname> kernel: intel_pstate: Intel P-state driver initializing
Jan 22 13:35:46 <hostname> kernel: intel_pstate: HWP enabled
Jan 22 22:32:10 <hostname> sudo[10143]: <user> : TTY=pts/1 ; PWD=/home/<user> ; USER=root ; COMMAND=/usr/bin/nano /sys/devices/system/cpu/intel_pstate/no_turbo
Jan 22 22:32:47 <hostname> sudo[12346]: <user> : TTY=pts/1 ; PWD=/sys/devices/system/cpu/intel_pstate ; USER=root ; COMMAND=/usr/bin/nano no_turbo
Jan 22 22:32:58 <hostname> kernel: intel_pstate: Turbo disabled by BIOS or unavailable on processor
Jan 22 22:36:08 <hostname> kernel: intel_pstate: Turbo disabled by BIOS or unavailable on processor
Jan 22 22:39:07 <hostname> sudo[28590]: <user> : TTY=pts/1 ; PWD=/sys/devices/system/cpu/intel_pstate ; USER=root ; COMMAND=/usr/bin/bash -c echo -n 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
Jan 22 22:39:07 <hostname> kernel: intel_pstate: Turbo disabled by BIOS or unavailable on processor
Jan 22 22:44:09 <hostname> kernel: intel_pstate: Turbo disabled by BIOS or unavailable on processor
Jan 22 22:46:08 <hostname> kernel: intel_pstate: Turbo disabled by BIOS or unavailable on processor


How do I prevent this from happening? Or how do I set the no_turbo back to 0 without rebooting?

Thanks.

Offline

#2 2019-01-29 02:29:06

logansdaddy
Member
Registered: 2019-01-23
Posts: 7

Re: intel_pstate no_turbo issue

I think I figured out how to re-create the problem. As I said earlier when on battery power if the charge drops below 10% the no_turbo gets set to 1 automatically. When that happens if I close my laptop first and then plug it in to start charging.  Later, when I'm ready to use the laptop again I unplug it before I open the lid. The no_turbo stays at 1 and does not get set back to 0. Doesn't this seem like a bug with the intel_pstate driver? It seems like whatever event that tells it to set the no_turbo back to 0 is not firing.

If I were to plug it in after it drops below 10% and keep the lid open and let it charge above 10% the no_turbo gets set back to 0 automatically. I know this because I have a script running that shows me the status of the /sys/devices/system/cpu/intel_pstate/no_turbo every second in my dwm status bar.

Once my laptop is in this state where it doesn't know to set the no_turbo back to 0 then only rebooting will fix it. I tried using cpupower frequency-set -g to set the governor from powersave to performance and back and it doesn't help.

Can someone with a Lenovo Yoga 730 see if they can re-create it? Or maybe any laptop that uses the intel_pstate driver for frequency scaling. Should this be moved to the laptop section?

Steps to re-create. Keep a eye on the no_turbo file

$ cat /sys/devices/system/cpu/intel_pstate/no_turbo

It should be set to 0 while on battery power. When battery power drops below 10% it should change to 1.
When it goes to 1, close the lid first then plug it in to charge the laptop.
After it charges for a while unplug the laptop from charger before opening the lid.
Open the lid and see what the value of the no_turbo file is. If its still 1 then you've re-created the issue.
Once you've recreate try setting it back to 0 manually to see if it allows it.

Thanks!

Offline

#3 2019-01-29 04:05:02

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: intel_pstate no_turbo issue

What kind of power management did you set up? IOW, What did you set up in order for this happen?

As I said earlier when on battery power if the charge drops below 10% the no_turbo gets set to 1 automatically.

TLP? LMT? PowerTop? Does the issue persist when you disable whichever you're running (if any)? Is this a setting in your UEFI? or BIOS?

Are you trying to write to the file as root correctly? i.e.

sudo echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo

versus

echo 0 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

"the wind-blown way, wanna win? don't play"

Offline

#4 2019-01-29 04:18:43

logansdaddy
Member
Registered: 2019-01-23
Posts: 7

Re: intel_pstate no_turbo issue

CarbonChauvinist wrote:

What kind of power management did you set up? IOW, What did you set up in order for this happen?

As I said earlier when on battery power if the charge drops below 10% the no_turbo gets set to 1 automatically.

TLP? LMT? PowerTop? Does the issue persist when you disable whichever you're running (if any)? Is this a setting in your UEFI? or BIOS?

Are you trying to write to the file as root correctly? i.e.

sudo echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo

versus

echo 0 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

I was using TLP but I uninstalled it. I use powertop only to view the settings. I did manually set some devices auto powermanagement using the Arch Linux Power Management page so that PowerTOP shows everything as GOOD except the VMWRITEBACK which I did not bother to change.

I will try your suggestion below, next time I go below 10%. I'm at 86% right now and I confirmed I can set to 1 and back to 0 using your command below.

echo 0 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

I'll let you know. Thanks.

Offline

#5 2019-01-29 08:16:05

logansdaddy
Member
Registered: 2019-01-23
Posts: 7

Re: intel_pstate no_turbo issue

I tried it and it doesn't work.

$ echo 0 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
[sudo] password for <username>: 
0
tee: /sys/devices/system/cpu/intel_pstate/no_turbo: Operation not permitted

I guess the next thing I will try is disable all the power management items I added to /etc/udev/rules.d/ to see if that helps. At least I know how to re-create the problem now.

Offline

#6 2019-01-29 11:51:25

loqs
Member
Registered: 2014-03-06
Posts: 18,448

Offline

Board footer

Powered by FluxBB