Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU_MAX_PERF_ON_BAT and CPU_BOOST_ON_BAT not respected during hardware accelerated video playback #122

Closed
sos-michael opened this issue Feb 5, 2015 · 12 comments

Comments

@sos-michael
Copy link

TLP version from the PPA: tlp 0.7-1~trusty

relavent tlp conf:
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave

CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=25

CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0

System details:
Ubuntu 14.04.1 x64
"mainline" kernel 3.18.5
Dell XPS 13 L322x
Intel Core i7-3537U

os ondemand gov disabled by the following:
sudo update-rc.d -f ondemand remove

So if you're on battery and do something CPU intensive like say sunspider, things seem to be behaving correctly and lscpu output looks like this the entire time; performance is clearly reduced:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Stepping: 9
CPU MHz: 800.000
BogoMIPS: 4988.58
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3

But when running a hardware accelerated youtube video(Firefox 35.0.01,1080p, Flash ...using this method http://www.webupd8.org/2013/09/adobe-flash-player-hardware.html if it matters)
results in lscpu bouncing all over the place and actually reaching turbo states:

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Stepping: 9
CPU MHz: 2948.144
BogoMIPS: 4988.58
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3

Let me know if you need anything else.

@sos-michael
Copy link
Author

Interestingly enough adding:

CPU_SCALING_MAX_FREQ_ON_AC=3100000
CPU_SCALING_MAX_FREQ_ON_BAT=1200000

Does not change the behavoir.

@linrunner
Copy link
Owner

I always need the whole output please

sudo tlp-stat

@sos-michael
Copy link
Author

/usr/sbin/tlp: 1: /etc/default/tlp: ------------------------------------------------------------------------------: not found
/usr/bin/tlp-stat: 1: /etc/default/tlp: ------------------------------------------------------------------------------: not found
--- TLP 0.7 --------------------------------------------

+++ Configured Settings: /etc/default/tlp


TLP_ENABLE=1
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=3
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=25
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
DISK_DEVICES="sda"
DISK_APM_LEVEL_ON_AC="254"
DISK_APM_LEVEL_ON_BAT="1"
DISK_SPINDOWN_TIMEOUT_ON_BAT="1"
DISK_IOSCHED="noop"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
WOL_DISABLE=Y
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=1
USB_AUTOSUSPEND=1
RESTORE_DEVICE_STATE_ON_STARTUP=1
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=powersave

+++ System Info
System = Dell Inc. XPS L322X
BIOS = A10
Release = Ubuntu 14.04.2 LTS
Kernel = 3.18.5-031805-generic x86_64
/proc/cmdline = BOOT_IMAGE=/vmlinuz-3.18.5-031805-generic root=UUID=d1910d10-6445-4303-91d8-c2de735e82d7 ro intel_pstate=enable i915.enable_rc6=7 i915.enable_fbc=1 i915.semaphores=1 i915.fastboot=1 i915.disable_pch_pwm=0 i915.lvds_downclock=1 drm.vblankoffdelay=1 ath9k.ps_enable=1 pcie_aspm=force quiet splash vt.handoff=7
Init system = upstart

+++ System Status
TLP power save = enabled
power source = battery

+++ Processor
CPU Model = Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/intel_pstate/min_perf_pct = 25
/sys/devices/system/cpu/intel_pstate/max_perf_pct = 25
/sys/devices/system/cpu/intel_pstate/no_turbo = 1

x86_energy_perf_policy: program for your kernel not installed.

/proc/sys/kernel/nmi_watchdog = 0

+++ Undervolting
PHC kernel not available.

+++ Temperatures
CPU temp = 38 [°C]
Fan speed = (not available)

+++ File System
/proc/sys/vm/laptop_mode = 3
/proc/sys/vm/dirty_writeback_centisecs = 6000
/proc/sys/vm/dirty_expire_centisecs = 6000
/proc/sys/vm/dirty_ratio = 20
/proc/sys/vm/dirty_background_ratio = 10
/proc/sys/fs/xfs/age_buffer_centisecs = (not available)
/proc/sys/fs/xfs/xfssyncd_centisecs = (not available)
/proc/sys/fs/xfs/xfsbufd_centisecs = (not available)

+++ Storage Devices
/dev/sda:
Model = LITEONIT LMT-256M6M mSATA 256GB
Firmware = DM8110D
APM Level = none/disabled
Status = active/idle
TRIM = supported
Scheduler = noop

    SMART info:
        5 Reallocated_Sector_Ct     =        0 
      177 Wear_Leveling_Count       =      100 [%]
      178 Used_Rsvd_Blk_Cnt_Chip    =        0 
      179 Used_Rsvd_Blk_Cnt_Tot     =        0 
      241 Total_LBAs_Written        =    0.000 [TB]

+++ SATA Aggressive Link Power Management
/sys/class/scsi_host/host0/link_power_management_policy = min_power
/sys/class/scsi_host/host1/link_power_management_policy = min_power
/sys/class/scsi_host/host2/link_power_management_policy = min_power
/sys/class/scsi_host/host3/link_power_management_policy = min_power
/sys/class/scsi_host/host4/link_power_management_policy = min_power
/sys/class/scsi_host/host5/link_power_management_policy = min_power

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = powersave

+++ Intel Graphics
/sys/module/i915/parameters/powersave = 1 (enabled)
/sys/module/i915/parameters/enable_rc6 = 7 (enabled + deep + deepest)
/sys/module/i915/parameters/enable_fbc = 1 (enabled)
/sys/module/i915/parameters/lvds_downclock = 1 (enabled)
/sys/module/i915/parameters/semaphores = 1 (enabled)

+++ Wireless
bluetooth = off (software)
wifi = on
wwan = none (no device)

hci0(btusb) : not connected
wlan0(ath9k) : connected, power management = on

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save = 1
/sys/module/snd_hda_intel/parameters/power_save_controller = Y

+++ Runtime Power Management
device classes = all
device blacklist = (not configured)
driver blacklist = (not configured)

/sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, ivb_uncore)
/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:14.0/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:00:16.0/power/control = auto (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:1a.0/power/control = auto (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1b.0/power/control = auto (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1c.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = auto (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1f.0/power/control = auto (0x060100, ISA bridge, lpc_ich)
/sys/bus/pci/devices/0000:00:1f.2/power/control = auto (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1f.3/power/control = auto (0x0c0500, SMBus, no driver)
/sys/bus/pci/devices/0000:01:00.0/power/control = auto (0x028000, Network controller, ath9k)

+++ USB
autosuspend = enabled
device whitelist = (not configured)
device blacklist = (not configured)
driver blacklist = (not configured)
wwan blacklist = disabled

Bus 004 Device 004 ID 0cf3:3004 control = auto, autosuspend_delay_ms = 2000 -- Atheros Communications, Inc. (btusb)
Bus 004 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms = 0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 004 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 003 Device 003 ID 0c45:644d control = auto, autosuspend_delay_ms = 2000 -- Microdia (uvcvideo)
Bus 003 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms = 0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 3.0 root hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)

+++ Battery Status
/sys/class/power_supply/BAT0/manufacturer = SIMPLO
/sys/class/power_supply/BAT0/model_name = Dell
/sys/class/power_supply/BAT0/cycle_count = (not supported)
/sys/class/power_supply/BAT0/charge_full_design = 6390 [mAh]
/sys/class/power_supply/BAT0/charge_full = 3692 [mAh]
/sys/class/power_supply/BAT0/charge_now = 2340 [mAh]
/sys/class/power_supply/BAT0/current_now = 919 [mA]
/sys/class/power_supply/BAT0/status = Discharging

@linrunner
Copy link
Owner

TLP apparently applies the settings

/sys/devices/system/cpu/intel_pstate/min_perf_pct = 25
/sys/devices/system/cpu/intel_pstate/max_perf_pct = 25

(as for the min_perf_pct = 25 i reckon you changed the settings without tlp start).

This leaves us with two possibilities i think:

  1. Hardware video acceleration is a GPU feature and intel_pstate is responsible for the CPU only
  2. intel_pstate doesn't work as expected and you have to file a kernel bug report

None of these may be solved by TLP though. Sorry.

@linrunner
Copy link
Owner

ps. did you monitor (and compare) the effective power consumption with

watch -n 5 cat /sys/class/power_supply/BAT0/current_now

?

@sos-michael
Copy link
Author

Actually *perf_pct values less than 25 are ignored (perhaps a kernel related change and 25 corresponds to the lowest multiplier/voltage state on this machine)

I too think its a kernel issue actually, I was just looking for incidental insight on the matter.

power draw spike from 5-8W to upwards of 25W

@sos-michael
Copy link
Author

oddly enough, if i change them both to zero notice what happens!

/usr/sbin/tlp: 1: /etc/default/tlp: ------------------------------------------------------------------------------: not found
/usr/bin/tlp-stat: 1: /etc/default/tlp: ------------------------------------------------------------------------------: not found
--- TLP 0.7 --------------------------------------------

+++ Configured Settings: /etc/default/tlp


TLP_ENABLE=1
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=3
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
CPU_MIN_PERF_ON_AC=0
CPU_MAX_PERF_ON_AC=100
CPU_MIN_PERF_ON_BAT=0
CPU_MAX_PERF_ON_BAT=0
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
DISK_DEVICES="sda"
DISK_APM_LEVEL_ON_AC="254"
DISK_APM_LEVEL_ON_BAT="1"
DISK_SPINDOWN_TIMEOUT_ON_BAT="1"
DISK_IOSCHED="noop"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
WOL_DISABLE=Y
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=1
USB_AUTOSUSPEND=1
RESTORE_DEVICE_STATE_ON_STARTUP=1
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=powersave

+++ System Info
System = Dell Inc. XPS L322X
BIOS = A10
Release = Ubuntu 14.04.2 LTS
Kernel = 3.18.5-031805-generic x86_64
/proc/cmdline = BOOT_IMAGE=/vmlinuz-3.18.5-031805-generic root=UUID=d1910d10-6445-4303-91d8-c2de735e82d7 ro intel_pstate=enable i915.enable_rc6=7 i915.enable_fbc=1 i915.semaphores=1 i915.fastboot=1 i915.disable_pch_pwm=0 i915.lvds_downclock=1 drm.vblankoffdelay=1 ath9k.ps_enable=1 pcie_aspm=force quiet splash vt.handoff=7
Init system = upstart

+++ System Status
TLP power save = enabled
power source = battery

+++ Processor
CPU Model = Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver = intel_pstate
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq = 3100000 [kHz]

/sys/devices/system/cpu/intel_pstate/min_perf_pct = 25
/sys/devices/system/cpu/intel_pstate/max_perf_pct = 0
/sys/devices/system/cpu/intel_pstate/no_turbo = 1

x86_energy_perf_policy: program for your kernel not installed.

/proc/sys/kernel/nmi_watchdog = 0

+++ Undervolting
PHC kernel not available.

+++ Temperatures
CPU temp = 55 [°C]
Fan speed = (not available)

+++ File System
/proc/sys/vm/laptop_mode = 3
/proc/sys/vm/dirty_writeback_centisecs = 6000
/proc/sys/vm/dirty_expire_centisecs = 6000
/proc/sys/vm/dirty_ratio = 20
/proc/sys/vm/dirty_background_ratio = 10
/proc/sys/fs/xfs/age_buffer_centisecs = (not available)
/proc/sys/fs/xfs/xfssyncd_centisecs = (not available)
/proc/sys/fs/xfs/xfsbufd_centisecs = (not available)

+++ Storage Devices
/dev/sda:
Model = LITEONIT LMT-256M6M mSATA 256GB
Firmware = DM8110D
APM Level = none/disabled
Status = active/idle
TRIM = supported
Scheduler = noop

    SMART info:
        5 Reallocated_Sector_Ct     =        0 
      177 Wear_Leveling_Count       =      100 [%]
      178 Used_Rsvd_Blk_Cnt_Chip    =        0 
      179 Used_Rsvd_Blk_Cnt_Tot     =        0 
      241 Total_LBAs_Written        =    0.000 [TB]

+++ SATA Aggressive Link Power Management
/sys/class/scsi_host/host0/link_power_management_policy = min_power
/sys/class/scsi_host/host1/link_power_management_policy = min_power
/sys/class/scsi_host/host2/link_power_management_policy = min_power
/sys/class/scsi_host/host3/link_power_management_policy = min_power
/sys/class/scsi_host/host4/link_power_management_policy = min_power
/sys/class/scsi_host/host5/link_power_management_policy = min_power

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = powersave

+++ Intel Graphics
/sys/module/i915/parameters/powersave = 1 (enabled)
/sys/module/i915/parameters/enable_rc6 = 7 (enabled + deep + deepest)
/sys/module/i915/parameters/enable_fbc = 1 (enabled)
/sys/module/i915/parameters/lvds_downclock = 1 (enabled)
/sys/module/i915/parameters/semaphores = 1 (enabled)

+++ Wireless
bluetooth = off (software)
wifi = on
wwan = none (no device)

hci0(btusb) : not connected
wlan0(ath9k) : connected, power management = on

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save = 1
/sys/module/snd_hda_intel/parameters/power_save_controller = Y

+++ Runtime Power Management
device classes = all
device blacklist = (not configured)
driver blacklist = (not configured)

/sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, ivb_uncore)
/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:14.0/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:00:16.0/power/control = auto (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:1a.0/power/control = auto (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1b.0/power/control = auto (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1c.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = auto (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1f.0/power/control = auto (0x060100, ISA bridge, lpc_ich)
/sys/bus/pci/devices/0000:00:1f.2/power/control = auto (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1f.3/power/control = auto (0x0c0500, SMBus, no driver)
/sys/bus/pci/devices/0000:01:00.0/power/control = auto (0x028000, Network controller, ath9k)

+++ USB
autosuspend = enabled
device whitelist = (not configured)
device blacklist = (not configured)
driver blacklist = (not configured)
wwan blacklist = disabled

Bus 004 Device 012 ID 0cf3:3004 control = auto, autosuspend_delay_ms = 2000 -- Atheros Communications, Inc. (btusb)
Bus 004 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms = 0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 004 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 003 Device 003 ID 0c45:644d control = auto, autosuspend_delay_ms = 2000 -- Microdia (uvcvideo)
Bus 003 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms = 0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 3.0 root hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)

+++ Battery Status
/sys/class/power_supply/BAT0/manufacturer = SIMPLO
/sys/class/power_supply/BAT0/model_name = Dell
/sys/class/power_supply/BAT0/cycle_count = (not supported)
/sys/class/power_supply/BAT0/charge_full_design = 6390 [mAh]
/sys/class/power_supply/BAT0/charge_full = 3692 [mAh]
/sys/class/power_supply/BAT0/charge_now = 2451 [mAh]
/sys/class/power_supply/BAT0/current_now = 1151 [mA]
/sys/class/power_supply/BAT0/status = Discharging

@linrunner
Copy link
Owner

Doesn't happen here (with 3.19rc7):

+++ System Info
System         = LENOVO ThinkPad X220 42914CG
Release        = Ubuntu 14.04.1 LTS
Kernel         = 3.19.0-031900rc7-generic #201502020035 SMP Mon Feb 2 05:36:49 UTC 2015 x86_64

+++ Processor
CPU Model      = Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  3500000 [kHz]    

/sys/devices/system/cpu/intel_pstate/min_perf_pct      = 5
/sys/devices/system/cpu/intel_pstate/max_perf_pct      = 24
/sys/devices/system/cpu/intel_pstate/no_turbo          = 0

I think you should file a kernel bug report.

@dywisor
Copy link
Contributor

dywisor commented Feb 7, 2015

Unrelated to the issue at hand, but it seems that you've removed the # in the first line of /etc/default/tlp. As a result, TLP tries to run this line as command and you get these warnings:

/usr/sbin/tlp: 1: /etc/default/tlp: ------------------------------------------------------------------------------: not found
/usr/bin/tlp-stat: 1: /etc/default/tlp: ------------------------------------------------------------------------------: not found

=> Change it back to

# ------------------------------------------------------------------------------

@linrunner
Copy link
Owner

I now remember that this is not the first issue about difficulties in writing to intel_pstate sysfs --> #115

@pyamsoft
Copy link

pyamsoft commented Apr 7, 2015

Apologies for bumping a rather old issue.

Please note that the ability for the intel_pstate driver to control CPU frequencies has significantly improved in kernel versions 3.19

Also note from the kernel documentation about the intel_pstate driver:

For contemporary Intel processors, the frequency is controlled by the
processor itself and the P-states exposed to software are related to
performance levels. The idea that frequency can be set to a single
frequency is fiction for Intel Core processors. Even if the scaling
driver selects a single P state the actual frequency the processor
will run at is selected by the processor itself.

Any values stated in the configuration file which are then read by intel_pstate will NOT be exactly used. pstate will try its best to hover around those values, but if the driver decides that more CPU power is needed it will scale as it sees fit.

Please also note that scaling_max_freq is reported as the Turbo frequency when using the intel_pstate driver, which may be the reason that even when no_turbo is set to 1, turbo frequencies are achieved.

This may explain why the output of lscpu is giving back weird values even when you have requested through TLP for lower frequencies. This appears to be, according to the intel_pstate documentation, by design.

@linrunner
Copy link
Owner

Thanks for your hints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants