“write error: Invalid argument” when changing governor setting

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'm running benchmarks on a Intel Sylake. The numbers are skewed on occasion and I am trying to move the processor out of powersave mode to ondemand mode. The script I am using is located at governor.sh.



Running the script on the Skylake results in:



# ./governor.sh ondemand
Current CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
New CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave


Line 44 is the echo and it performs (for example) echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.



if [ "x$governor" != "x" ]; then
for cpu in $cpus; do
echo $governor > $cpu
done
fi


Running the same script on the same machine with performance is OK. And running the same script on different machines, like an old VIA or Core2, with ondemand is OK. The issue appears to be limited to the Skylake machine.



@Giles explains part of the reason for the failure at cat: write error: Invalid argument, but it does not explain the Skylake failure since ondemand is not an invalid setting. There's some additional reading at CPU frequency and voltage scaling code in the Linux kernel and the CPU Governors wiki.



What is the problem and how do I fix it?




# uname -a
Linux skylake 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 26 (Twenty Six)
Release: 26
Codename: TwentySix



Dmeg shows the following errors related to ACPI. They may or may not be relevant.



$ dmesg
...

[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
...


And all ACPI entries:



$ dmesg | grep -i acpi
[ 0.000000] BIOS-e820: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] efi: ESRT=0xc51daf18 ACPI=0xbd41b000 ACPI 2.0=0xbd41b000 SMBIOS=0xf05e0 SMBIOS 3.0=0xf0600 MPS=0xfc9f0
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000BD41B000 000024 (v02 ALASKA)
[ 0.000000] ACPI: XSDT 0x00000000BD41B0A0 0000BC (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FACP 0x00000000BD43E6D8 00010C (v05 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: DSDT 0x00000000BD41B1F8 0234D9 (v02 ALASKA A M I 01072009 INTL 20120913)
[ 0.000000] ACPI: FACS 0x00000000C4D38F80 000040
[ 0.000000] ACPI: APIC 0x00000000BD43E7E8 000084 (v03 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FPDT 0x00000000BD43E870 000044 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FIDT 0x00000000BD43E8B8 00009C (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: MCFG 0x00000000BD43E958 00003C (v01 ALASKA A M I 01072009 MSFT 00000097)
[ 0.000000] ACPI: HPET 0x00000000BD43E998 000038 (v01 ALASKA A M I 01072009 AMI. 0005000B)
[ 0.000000] ACPI: SSDT 0x00000000BD43E9D0 00036D (v01 SataRe SataTabl 00001000 INTL 20120913)
[ 0.000000] ACPI: LPIT 0x00000000BD43ED40 000094 (v01 INTEL SKL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD43EDD8 000248 (v02 INTEL sensrhub 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD43F020 002BAE (v02 INTEL PtidDevc 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD441BD0 000BE3 (v02 INTEL Ther_Rvp 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4427B8 0004A3 (v02 INTEL zpodd 00001000 INTL 20120913)
[ 0.000000] ACPI: DBGP 0x00000000BD442C60 000034 (v01 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: DBG2 0x00000000BD442C98 000054 (v00 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD442CF0 000705 (v02 INTEL xh_rvp08 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4433F8 005359 (v02 SaSsdt SaSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: UEFI 0x00000000BD448758 000042 (v01 00000000 00000000)
[ 0.000000] ACPI: SSDT 0x00000000BD4487A0 000E73 (v02 CpuRef CpuSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: BGRT 0x00000000BD449670 000038 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: PM-Timer IO Port: 0x1808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xbf07a000-0xbf07afff] (4096 bytes)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xc4600000-0xc4d38fff] (7573504 bytes)
[ 0.237170] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[ 0.237170] ACPI: bus type PCI registered
[ 0.237170] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.238041] ACPI: Added _OSI(Module Device)
[ 0.238042] ACPI: Added _OSI(Processor Device)
[ 0.238043] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.238043] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.239249] ACPI: Executed 25 blocks of module-level executable AML code
[ 0.248092] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[ 0.251167] ACPI: Dynamic OEM Table Load:
[ 0.251172] ACPI: SSDT 0xFFFF911FACC02000 0005FD (v02 PmRef Cpu0Ist 00003000 INTL 20120913)
[ 0.251349] ACPI: _PR_.CPU0: _OSC native thermal LVT Acked
[ 0.251744] ACPI: Dynamic OEM Table Load:
[ 0.251748] ACPI: SSDT 0xFFFF911FACE23C00 00037F (v02 PmRef Cpu0Cst 00003001 INTL 20120913)
[ 0.253424] ACPI: Dynamic OEM Table Load:
[ 0.253429] ACPI: SSDT 0xFFFF911FACD51000 0005AA (v02 PmRef ApIst 00003000 INTL 20120913)
[ 0.253710] ACPI: Dynamic OEM Table Load:
[ 0.253710] ACPI: SSDT 0xFFFF911FACD9A600 000119 (v02 PmRef ApCst 00003000 INTL 20120913)
[ 0.255591] ACPI: Interpreter enabled
[ 0.255626] ACPI: (supports S0 S3 S4 S5)
[ 0.255627] ACPI: Using IOAPIC for interrupt routing
[ 0.255657] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.258543] ACPI: Power Resource [PG00] (on)
[ 0.258879] ACPI: Power Resource [PG01] (on)
[ 0.259185] ACPI: Power Resource [PG02] (on)
[ 0.262056] ACPI: Power Resource [WRST] (on)
[ 0.262373] ACPI: Power Resource [WRST] (on)
[ 0.262687] ACPI: Power Resource [WRST] (on)
[ 0.262999] ACPI: Power Resource [WRST] (on)
[ 0.263312] ACPI: Power Resource [WRST] (on)
[ 0.263618] ACPI: Power Resource [WRST] (on)
[ 0.263931] ACPI: Power Resource [WRST] (on)
[ 0.264257] ACPI: Power Resource [WRST] (on)
[ 0.264589] ACPI: Power Resource [WRST] (on)
[ 0.264922] ACPI: Power Resource [WRST] (on)
[ 0.266245] ACPI: Power Resource [WRST] (on)
[ 0.266563] ACPI: Power Resource [WRST] (on)
[ 0.266876] ACPI: Power Resource [WRST] (on)
[ 0.267193] ACPI: Power Resource [WRST] (on)
[ 0.267505] ACPI: Power Resource [WRST] (on)
[ 0.267816] ACPI: Power Resource [WRST] (on)
[ 0.268131] ACPI: Power Resource [WRST] (on)
[ 0.268444] ACPI: Power Resource [WRST] (on)
[ 0.268755] ACPI: Power Resource [WRST] (on)
[ 0.269069] ACPI: Power Resource [WRST] (on)
[ 0.279205] ACPI: Power Resource [FN00] (off)
[ 0.279269] ACPI: Power Resource [FN01] (off)
[ 0.279331] ACPI: Power Resource [FN02] (off)
[ 0.279391] ACPI: Power Resource [FN03] (off)
[ 0.279450] ACPI: Power Resource [FN04] (off)
[ 0.280453] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[ 0.280458] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 0.280485] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 0.284121] acpiphp: Slot [1] registered
[ 0.284170] acpiphp: Slot [1-1] registered
[ 0.284869] acpiphp: Slot [1-2] registered
[ 0.286849] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 0.286890] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.286930] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *10 11 12 14 15)
[ 0.286969] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 11 12 14 *15)
[ 0.287006] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287045] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287085] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287123] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287530] ACPI: Enabled 5 GPEs in block 00 to 7F
[ 0.287586] ACPI: bus type USB registered
[ 0.292064] PCI: Using ACPI for IRQ routing
[ 0.308474] pnp: PnP ACPI init
[ 0.308654] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309134] pnp 00:01: Plug and Play ACPI device, IDs PNP0400 (active)
[ 0.309421] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.309604] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309678] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309689] pnp 00:05: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.309713] system 00:06: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[ 0.309921] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309953] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.310228] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311191] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311911] pnp: PnP ACPI: found 11 devices
[ 0.319103] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.716964] ACPI: Sleep Button [SLPB]
[ 0.716991] ACPI: Power Button [PWRB]
[ 0.717061] ACPI: Power Button [PWRF]
[ 0.777234] ACPI: Thermal Zone [TZ00] (28 C)
[ 0.777342] ACPI: Thermal Zone [TZ01] (30 C)
[ 1.648278] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 3.270903] parport_pc 00:01: reported by Plug and Play ACPI









share|improve this question























  • Do you have cpupower command? What cpupower frequency-info gives you?
    – myaut
    Oct 8 '17 at 20:40










  • @myaut - No, its not available. Fedora prompted me to install kernel-tools for it, but the program appears to be missing after the install. After the install which cpupower reports no cpupower in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin).
    – jww
    Oct 8 '17 at 20:42










  • Do you see powersave in cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?
    – Andy Dalton
    Oct 8 '17 at 21:56














up vote
1
down vote

favorite












I'm running benchmarks on a Intel Sylake. The numbers are skewed on occasion and I am trying to move the processor out of powersave mode to ondemand mode. The script I am using is located at governor.sh.



Running the script on the Skylake results in:



# ./governor.sh ondemand
Current CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
New CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave


Line 44 is the echo and it performs (for example) echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.



if [ "x$governor" != "x" ]; then
for cpu in $cpus; do
echo $governor > $cpu
done
fi


Running the same script on the same machine with performance is OK. And running the same script on different machines, like an old VIA or Core2, with ondemand is OK. The issue appears to be limited to the Skylake machine.



@Giles explains part of the reason for the failure at cat: write error: Invalid argument, but it does not explain the Skylake failure since ondemand is not an invalid setting. There's some additional reading at CPU frequency and voltage scaling code in the Linux kernel and the CPU Governors wiki.



What is the problem and how do I fix it?




# uname -a
Linux skylake 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 26 (Twenty Six)
Release: 26
Codename: TwentySix



Dmeg shows the following errors related to ACPI. They may or may not be relevant.



$ dmesg
...

[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
...


And all ACPI entries:



$ dmesg | grep -i acpi
[ 0.000000] BIOS-e820: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] efi: ESRT=0xc51daf18 ACPI=0xbd41b000 ACPI 2.0=0xbd41b000 SMBIOS=0xf05e0 SMBIOS 3.0=0xf0600 MPS=0xfc9f0
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000BD41B000 000024 (v02 ALASKA)
[ 0.000000] ACPI: XSDT 0x00000000BD41B0A0 0000BC (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FACP 0x00000000BD43E6D8 00010C (v05 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: DSDT 0x00000000BD41B1F8 0234D9 (v02 ALASKA A M I 01072009 INTL 20120913)
[ 0.000000] ACPI: FACS 0x00000000C4D38F80 000040
[ 0.000000] ACPI: APIC 0x00000000BD43E7E8 000084 (v03 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FPDT 0x00000000BD43E870 000044 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FIDT 0x00000000BD43E8B8 00009C (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: MCFG 0x00000000BD43E958 00003C (v01 ALASKA A M I 01072009 MSFT 00000097)
[ 0.000000] ACPI: HPET 0x00000000BD43E998 000038 (v01 ALASKA A M I 01072009 AMI. 0005000B)
[ 0.000000] ACPI: SSDT 0x00000000BD43E9D0 00036D (v01 SataRe SataTabl 00001000 INTL 20120913)
[ 0.000000] ACPI: LPIT 0x00000000BD43ED40 000094 (v01 INTEL SKL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD43EDD8 000248 (v02 INTEL sensrhub 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD43F020 002BAE (v02 INTEL PtidDevc 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD441BD0 000BE3 (v02 INTEL Ther_Rvp 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4427B8 0004A3 (v02 INTEL zpodd 00001000 INTL 20120913)
[ 0.000000] ACPI: DBGP 0x00000000BD442C60 000034 (v01 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: DBG2 0x00000000BD442C98 000054 (v00 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD442CF0 000705 (v02 INTEL xh_rvp08 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4433F8 005359 (v02 SaSsdt SaSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: UEFI 0x00000000BD448758 000042 (v01 00000000 00000000)
[ 0.000000] ACPI: SSDT 0x00000000BD4487A0 000E73 (v02 CpuRef CpuSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: BGRT 0x00000000BD449670 000038 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: PM-Timer IO Port: 0x1808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xbf07a000-0xbf07afff] (4096 bytes)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xc4600000-0xc4d38fff] (7573504 bytes)
[ 0.237170] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[ 0.237170] ACPI: bus type PCI registered
[ 0.237170] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.238041] ACPI: Added _OSI(Module Device)
[ 0.238042] ACPI: Added _OSI(Processor Device)
[ 0.238043] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.238043] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.239249] ACPI: Executed 25 blocks of module-level executable AML code
[ 0.248092] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[ 0.251167] ACPI: Dynamic OEM Table Load:
[ 0.251172] ACPI: SSDT 0xFFFF911FACC02000 0005FD (v02 PmRef Cpu0Ist 00003000 INTL 20120913)
[ 0.251349] ACPI: _PR_.CPU0: _OSC native thermal LVT Acked
[ 0.251744] ACPI: Dynamic OEM Table Load:
[ 0.251748] ACPI: SSDT 0xFFFF911FACE23C00 00037F (v02 PmRef Cpu0Cst 00003001 INTL 20120913)
[ 0.253424] ACPI: Dynamic OEM Table Load:
[ 0.253429] ACPI: SSDT 0xFFFF911FACD51000 0005AA (v02 PmRef ApIst 00003000 INTL 20120913)
[ 0.253710] ACPI: Dynamic OEM Table Load:
[ 0.253710] ACPI: SSDT 0xFFFF911FACD9A600 000119 (v02 PmRef ApCst 00003000 INTL 20120913)
[ 0.255591] ACPI: Interpreter enabled
[ 0.255626] ACPI: (supports S0 S3 S4 S5)
[ 0.255627] ACPI: Using IOAPIC for interrupt routing
[ 0.255657] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.258543] ACPI: Power Resource [PG00] (on)
[ 0.258879] ACPI: Power Resource [PG01] (on)
[ 0.259185] ACPI: Power Resource [PG02] (on)
[ 0.262056] ACPI: Power Resource [WRST] (on)
[ 0.262373] ACPI: Power Resource [WRST] (on)
[ 0.262687] ACPI: Power Resource [WRST] (on)
[ 0.262999] ACPI: Power Resource [WRST] (on)
[ 0.263312] ACPI: Power Resource [WRST] (on)
[ 0.263618] ACPI: Power Resource [WRST] (on)
[ 0.263931] ACPI: Power Resource [WRST] (on)
[ 0.264257] ACPI: Power Resource [WRST] (on)
[ 0.264589] ACPI: Power Resource [WRST] (on)
[ 0.264922] ACPI: Power Resource [WRST] (on)
[ 0.266245] ACPI: Power Resource [WRST] (on)
[ 0.266563] ACPI: Power Resource [WRST] (on)
[ 0.266876] ACPI: Power Resource [WRST] (on)
[ 0.267193] ACPI: Power Resource [WRST] (on)
[ 0.267505] ACPI: Power Resource [WRST] (on)
[ 0.267816] ACPI: Power Resource [WRST] (on)
[ 0.268131] ACPI: Power Resource [WRST] (on)
[ 0.268444] ACPI: Power Resource [WRST] (on)
[ 0.268755] ACPI: Power Resource [WRST] (on)
[ 0.269069] ACPI: Power Resource [WRST] (on)
[ 0.279205] ACPI: Power Resource [FN00] (off)
[ 0.279269] ACPI: Power Resource [FN01] (off)
[ 0.279331] ACPI: Power Resource [FN02] (off)
[ 0.279391] ACPI: Power Resource [FN03] (off)
[ 0.279450] ACPI: Power Resource [FN04] (off)
[ 0.280453] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[ 0.280458] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 0.280485] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 0.284121] acpiphp: Slot [1] registered
[ 0.284170] acpiphp: Slot [1-1] registered
[ 0.284869] acpiphp: Slot [1-2] registered
[ 0.286849] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 0.286890] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.286930] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *10 11 12 14 15)
[ 0.286969] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 11 12 14 *15)
[ 0.287006] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287045] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287085] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287123] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287530] ACPI: Enabled 5 GPEs in block 00 to 7F
[ 0.287586] ACPI: bus type USB registered
[ 0.292064] PCI: Using ACPI for IRQ routing
[ 0.308474] pnp: PnP ACPI init
[ 0.308654] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309134] pnp 00:01: Plug and Play ACPI device, IDs PNP0400 (active)
[ 0.309421] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.309604] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309678] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309689] pnp 00:05: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.309713] system 00:06: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[ 0.309921] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309953] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.310228] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311191] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311911] pnp: PnP ACPI: found 11 devices
[ 0.319103] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.716964] ACPI: Sleep Button [SLPB]
[ 0.716991] ACPI: Power Button [PWRB]
[ 0.717061] ACPI: Power Button [PWRF]
[ 0.777234] ACPI: Thermal Zone [TZ00] (28 C)
[ 0.777342] ACPI: Thermal Zone [TZ01] (30 C)
[ 1.648278] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 3.270903] parport_pc 00:01: reported by Plug and Play ACPI









share|improve this question























  • Do you have cpupower command? What cpupower frequency-info gives you?
    – myaut
    Oct 8 '17 at 20:40










  • @myaut - No, its not available. Fedora prompted me to install kernel-tools for it, but the program appears to be missing after the install. After the install which cpupower reports no cpupower in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin).
    – jww
    Oct 8 '17 at 20:42










  • Do you see powersave in cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?
    – Andy Dalton
    Oct 8 '17 at 21:56












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm running benchmarks on a Intel Sylake. The numbers are skewed on occasion and I am trying to move the processor out of powersave mode to ondemand mode. The script I am using is located at governor.sh.



Running the script on the Skylake results in:



# ./governor.sh ondemand
Current CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
New CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave


Line 44 is the echo and it performs (for example) echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.



if [ "x$governor" != "x" ]; then
for cpu in $cpus; do
echo $governor > $cpu
done
fi


Running the same script on the same machine with performance is OK. And running the same script on different machines, like an old VIA or Core2, with ondemand is OK. The issue appears to be limited to the Skylake machine.



@Giles explains part of the reason for the failure at cat: write error: Invalid argument, but it does not explain the Skylake failure since ondemand is not an invalid setting. There's some additional reading at CPU frequency and voltage scaling code in the Linux kernel and the CPU Governors wiki.



What is the problem and how do I fix it?




# uname -a
Linux skylake 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 26 (Twenty Six)
Release: 26
Codename: TwentySix



Dmeg shows the following errors related to ACPI. They may or may not be relevant.



$ dmesg
...

[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
...


And all ACPI entries:



$ dmesg | grep -i acpi
[ 0.000000] BIOS-e820: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] efi: ESRT=0xc51daf18 ACPI=0xbd41b000 ACPI 2.0=0xbd41b000 SMBIOS=0xf05e0 SMBIOS 3.0=0xf0600 MPS=0xfc9f0
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000BD41B000 000024 (v02 ALASKA)
[ 0.000000] ACPI: XSDT 0x00000000BD41B0A0 0000BC (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FACP 0x00000000BD43E6D8 00010C (v05 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: DSDT 0x00000000BD41B1F8 0234D9 (v02 ALASKA A M I 01072009 INTL 20120913)
[ 0.000000] ACPI: FACS 0x00000000C4D38F80 000040
[ 0.000000] ACPI: APIC 0x00000000BD43E7E8 000084 (v03 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FPDT 0x00000000BD43E870 000044 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FIDT 0x00000000BD43E8B8 00009C (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: MCFG 0x00000000BD43E958 00003C (v01 ALASKA A M I 01072009 MSFT 00000097)
[ 0.000000] ACPI: HPET 0x00000000BD43E998 000038 (v01 ALASKA A M I 01072009 AMI. 0005000B)
[ 0.000000] ACPI: SSDT 0x00000000BD43E9D0 00036D (v01 SataRe SataTabl 00001000 INTL 20120913)
[ 0.000000] ACPI: LPIT 0x00000000BD43ED40 000094 (v01 INTEL SKL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD43EDD8 000248 (v02 INTEL sensrhub 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD43F020 002BAE (v02 INTEL PtidDevc 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD441BD0 000BE3 (v02 INTEL Ther_Rvp 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4427B8 0004A3 (v02 INTEL zpodd 00001000 INTL 20120913)
[ 0.000000] ACPI: DBGP 0x00000000BD442C60 000034 (v01 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: DBG2 0x00000000BD442C98 000054 (v00 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD442CF0 000705 (v02 INTEL xh_rvp08 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4433F8 005359 (v02 SaSsdt SaSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: UEFI 0x00000000BD448758 000042 (v01 00000000 00000000)
[ 0.000000] ACPI: SSDT 0x00000000BD4487A0 000E73 (v02 CpuRef CpuSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: BGRT 0x00000000BD449670 000038 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: PM-Timer IO Port: 0x1808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xbf07a000-0xbf07afff] (4096 bytes)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xc4600000-0xc4d38fff] (7573504 bytes)
[ 0.237170] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[ 0.237170] ACPI: bus type PCI registered
[ 0.237170] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.238041] ACPI: Added _OSI(Module Device)
[ 0.238042] ACPI: Added _OSI(Processor Device)
[ 0.238043] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.238043] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.239249] ACPI: Executed 25 blocks of module-level executable AML code
[ 0.248092] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[ 0.251167] ACPI: Dynamic OEM Table Load:
[ 0.251172] ACPI: SSDT 0xFFFF911FACC02000 0005FD (v02 PmRef Cpu0Ist 00003000 INTL 20120913)
[ 0.251349] ACPI: _PR_.CPU0: _OSC native thermal LVT Acked
[ 0.251744] ACPI: Dynamic OEM Table Load:
[ 0.251748] ACPI: SSDT 0xFFFF911FACE23C00 00037F (v02 PmRef Cpu0Cst 00003001 INTL 20120913)
[ 0.253424] ACPI: Dynamic OEM Table Load:
[ 0.253429] ACPI: SSDT 0xFFFF911FACD51000 0005AA (v02 PmRef ApIst 00003000 INTL 20120913)
[ 0.253710] ACPI: Dynamic OEM Table Load:
[ 0.253710] ACPI: SSDT 0xFFFF911FACD9A600 000119 (v02 PmRef ApCst 00003000 INTL 20120913)
[ 0.255591] ACPI: Interpreter enabled
[ 0.255626] ACPI: (supports S0 S3 S4 S5)
[ 0.255627] ACPI: Using IOAPIC for interrupt routing
[ 0.255657] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.258543] ACPI: Power Resource [PG00] (on)
[ 0.258879] ACPI: Power Resource [PG01] (on)
[ 0.259185] ACPI: Power Resource [PG02] (on)
[ 0.262056] ACPI: Power Resource [WRST] (on)
[ 0.262373] ACPI: Power Resource [WRST] (on)
[ 0.262687] ACPI: Power Resource [WRST] (on)
[ 0.262999] ACPI: Power Resource [WRST] (on)
[ 0.263312] ACPI: Power Resource [WRST] (on)
[ 0.263618] ACPI: Power Resource [WRST] (on)
[ 0.263931] ACPI: Power Resource [WRST] (on)
[ 0.264257] ACPI: Power Resource [WRST] (on)
[ 0.264589] ACPI: Power Resource [WRST] (on)
[ 0.264922] ACPI: Power Resource [WRST] (on)
[ 0.266245] ACPI: Power Resource [WRST] (on)
[ 0.266563] ACPI: Power Resource [WRST] (on)
[ 0.266876] ACPI: Power Resource [WRST] (on)
[ 0.267193] ACPI: Power Resource [WRST] (on)
[ 0.267505] ACPI: Power Resource [WRST] (on)
[ 0.267816] ACPI: Power Resource [WRST] (on)
[ 0.268131] ACPI: Power Resource [WRST] (on)
[ 0.268444] ACPI: Power Resource [WRST] (on)
[ 0.268755] ACPI: Power Resource [WRST] (on)
[ 0.269069] ACPI: Power Resource [WRST] (on)
[ 0.279205] ACPI: Power Resource [FN00] (off)
[ 0.279269] ACPI: Power Resource [FN01] (off)
[ 0.279331] ACPI: Power Resource [FN02] (off)
[ 0.279391] ACPI: Power Resource [FN03] (off)
[ 0.279450] ACPI: Power Resource [FN04] (off)
[ 0.280453] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[ 0.280458] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 0.280485] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 0.284121] acpiphp: Slot [1] registered
[ 0.284170] acpiphp: Slot [1-1] registered
[ 0.284869] acpiphp: Slot [1-2] registered
[ 0.286849] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 0.286890] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.286930] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *10 11 12 14 15)
[ 0.286969] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 11 12 14 *15)
[ 0.287006] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287045] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287085] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287123] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287530] ACPI: Enabled 5 GPEs in block 00 to 7F
[ 0.287586] ACPI: bus type USB registered
[ 0.292064] PCI: Using ACPI for IRQ routing
[ 0.308474] pnp: PnP ACPI init
[ 0.308654] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309134] pnp 00:01: Plug and Play ACPI device, IDs PNP0400 (active)
[ 0.309421] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.309604] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309678] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309689] pnp 00:05: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.309713] system 00:06: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[ 0.309921] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309953] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.310228] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311191] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311911] pnp: PnP ACPI: found 11 devices
[ 0.319103] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.716964] ACPI: Sleep Button [SLPB]
[ 0.716991] ACPI: Power Button [PWRB]
[ 0.717061] ACPI: Power Button [PWRF]
[ 0.777234] ACPI: Thermal Zone [TZ00] (28 C)
[ 0.777342] ACPI: Thermal Zone [TZ01] (30 C)
[ 1.648278] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 3.270903] parport_pc 00:01: reported by Plug and Play ACPI









share|improve this question















I'm running benchmarks on a Intel Sylake. The numbers are skewed on occasion and I am trying to move the processor out of powersave mode to ondemand mode. The script I am using is located at governor.sh.



Running the script on the Skylake results in:



# ./governor.sh ondemand
Current CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
./governor.sh: line 44: echo: write error: Invalid argument
New CPU governor scaling settings:
CPU 0: powersave
CPU 1: powersave
CPU 2: powersave
CPU 3: powersave


Line 44 is the echo and it performs (for example) echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.



if [ "x$governor" != "x" ]; then
for cpu in $cpus; do
echo $governor > $cpu
done
fi


Running the same script on the same machine with performance is OK. And running the same script on different machines, like an old VIA or Core2, with ondemand is OK. The issue appears to be limited to the Skylake machine.



@Giles explains part of the reason for the failure at cat: write error: Invalid argument, but it does not explain the Skylake failure since ondemand is not an invalid setting. There's some additional reading at CPU frequency and voltage scaling code in the Linux kernel and the CPU Governors wiki.



What is the problem and how do I fix it?




# uname -a
Linux skylake 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 26 (Twenty Six)
Release: 26
Codename: TwentySix



Dmeg shows the following errors related to ACPI. They may or may not be relevant.



$ dmesg
...

[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
...


And all ACPI entries:



$ dmesg | grep -i acpi
[ 0.000000] BIOS-e820: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000bd41b000-0x00000000bd449fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000bf07a000-0x00000000bf07afff] ACPI NVS
[ 0.000000] reserve setup_data: [mem 0x00000000c43f6000-0x00000000c4403fff] ACPI data
[ 0.000000] reserve setup_data: [mem 0x00000000c4600000-0x00000000c4d38fff] ACPI NVS
[ 0.000000] efi: ESRT=0xc51daf18 ACPI=0xbd41b000 ACPI 2.0=0xbd41b000 SMBIOS=0xf05e0 SMBIOS 3.0=0xf0600 MPS=0xfc9f0
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000BD41B000 000024 (v02 ALASKA)
[ 0.000000] ACPI: XSDT 0x00000000BD41B0A0 0000BC (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FACP 0x00000000BD43E6D8 00010C (v05 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: DSDT 0x00000000BD41B1F8 0234D9 (v02 ALASKA A M I 01072009 INTL 20120913)
[ 0.000000] ACPI: FACS 0x00000000C4D38F80 000040
[ 0.000000] ACPI: APIC 0x00000000BD43E7E8 000084 (v03 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FPDT 0x00000000BD43E870 000044 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: FIDT 0x00000000BD43E8B8 00009C (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: MCFG 0x00000000BD43E958 00003C (v01 ALASKA A M I 01072009 MSFT 00000097)
[ 0.000000] ACPI: HPET 0x00000000BD43E998 000038 (v01 ALASKA A M I 01072009 AMI. 0005000B)
[ 0.000000] ACPI: SSDT 0x00000000BD43E9D0 00036D (v01 SataRe SataTabl 00001000 INTL 20120913)
[ 0.000000] ACPI: LPIT 0x00000000BD43ED40 000094 (v01 INTEL SKL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD43EDD8 000248 (v02 INTEL sensrhub 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD43F020 002BAE (v02 INTEL PtidDevc 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD441BD0 000BE3 (v02 INTEL Ther_Rvp 00001000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4427B8 0004A3 (v02 INTEL zpodd 00001000 INTL 20120913)
[ 0.000000] ACPI: DBGP 0x00000000BD442C60 000034 (v01 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: DBG2 0x00000000BD442C98 000054 (v00 INTEL 00000000 MSFT 0000005F)
[ 0.000000] ACPI: SSDT 0x00000000BD442CF0 000705 (v02 INTEL xh_rvp08 00000000 INTL 20120913)
[ 0.000000] ACPI: SSDT 0x00000000BD4433F8 005359 (v02 SaSsdt SaSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: UEFI 0x00000000BD448758 000042 (v01 00000000 00000000)
[ 0.000000] ACPI: SSDT 0x00000000BD4487A0 000E73 (v02 CpuRef CpuSsdt 00003000 INTL 20120913)
[ 0.000000] ACPI: BGRT 0x00000000BD449670 000038 (v01 ALASKA A M I 01072009 AMI 00010013)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: PM-Timer IO Port: 0x1808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[ 0.001000] ACPI: Core revision 20170531
[ 0.024598] ACPI Error: [_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
[ 0.024604] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
[ 0.024644] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp08) while loading table (20170531/tbxfload-228)
[ 0.031899] ACPI Error: 1 table load failures, 8 successful (20170531/tbxfload-246)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xbf07a000-0xbf07afff] (4096 bytes)
[ 0.236436] PM: Registering ACPI NVS region [mem 0xc4600000-0xc4d38fff] (7573504 bytes)
[ 0.237170] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[ 0.237170] ACPI: bus type PCI registered
[ 0.237170] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.238041] ACPI: Added _OSI(Module Device)
[ 0.238042] ACPI: Added _OSI(Processor Device)
[ 0.238043] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.238043] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.239249] ACPI: Executed 25 blocks of module-level executable AML code
[ 0.248092] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[ 0.251167] ACPI: Dynamic OEM Table Load:
[ 0.251172] ACPI: SSDT 0xFFFF911FACC02000 0005FD (v02 PmRef Cpu0Ist 00003000 INTL 20120913)
[ 0.251349] ACPI: _PR_.CPU0: _OSC native thermal LVT Acked
[ 0.251744] ACPI: Dynamic OEM Table Load:
[ 0.251748] ACPI: SSDT 0xFFFF911FACE23C00 00037F (v02 PmRef Cpu0Cst 00003001 INTL 20120913)
[ 0.253424] ACPI: Dynamic OEM Table Load:
[ 0.253429] ACPI: SSDT 0xFFFF911FACD51000 0005AA (v02 PmRef ApIst 00003000 INTL 20120913)
[ 0.253710] ACPI: Dynamic OEM Table Load:
[ 0.253710] ACPI: SSDT 0xFFFF911FACD9A600 000119 (v02 PmRef ApCst 00003000 INTL 20120913)
[ 0.255591] ACPI: Interpreter enabled
[ 0.255626] ACPI: (supports S0 S3 S4 S5)
[ 0.255627] ACPI: Using IOAPIC for interrupt routing
[ 0.255657] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.258543] ACPI: Power Resource [PG00] (on)
[ 0.258879] ACPI: Power Resource [PG01] (on)
[ 0.259185] ACPI: Power Resource [PG02] (on)
[ 0.262056] ACPI: Power Resource [WRST] (on)
[ 0.262373] ACPI: Power Resource [WRST] (on)
[ 0.262687] ACPI: Power Resource [WRST] (on)
[ 0.262999] ACPI: Power Resource [WRST] (on)
[ 0.263312] ACPI: Power Resource [WRST] (on)
[ 0.263618] ACPI: Power Resource [WRST] (on)
[ 0.263931] ACPI: Power Resource [WRST] (on)
[ 0.264257] ACPI: Power Resource [WRST] (on)
[ 0.264589] ACPI: Power Resource [WRST] (on)
[ 0.264922] ACPI: Power Resource [WRST] (on)
[ 0.266245] ACPI: Power Resource [WRST] (on)
[ 0.266563] ACPI: Power Resource [WRST] (on)
[ 0.266876] ACPI: Power Resource [WRST] (on)
[ 0.267193] ACPI: Power Resource [WRST] (on)
[ 0.267505] ACPI: Power Resource [WRST] (on)
[ 0.267816] ACPI: Power Resource [WRST] (on)
[ 0.268131] ACPI: Power Resource [WRST] (on)
[ 0.268444] ACPI: Power Resource [WRST] (on)
[ 0.268755] ACPI: Power Resource [WRST] (on)
[ 0.269069] ACPI: Power Resource [WRST] (on)
[ 0.279205] ACPI: Power Resource [FN00] (off)
[ 0.279269] ACPI: Power Resource [FN01] (off)
[ 0.279331] ACPI: Power Resource [FN02] (off)
[ 0.279391] ACPI: Power Resource [FN03] (off)
[ 0.279450] ACPI: Power Resource [FN04] (off)
[ 0.280453] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[ 0.280458] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 0.280485] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 0.284121] acpiphp: Slot [1] registered
[ 0.284170] acpiphp: Slot [1-1] registered
[ 0.284869] acpiphp: Slot [1-2] registered
[ 0.286849] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[ 0.286890] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.286930] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *10 11 12 14 15)
[ 0.286969] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 11 12 14 *15)
[ 0.287006] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287045] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287085] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287123] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 11 12 14 15) *0
[ 0.287530] ACPI: Enabled 5 GPEs in block 00 to 7F
[ 0.287586] ACPI: bus type USB registered
[ 0.292064] PCI: Using ACPI for IRQ routing
[ 0.308474] pnp: PnP ACPI init
[ 0.308654] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309134] pnp 00:01: Plug and Play ACPI device, IDs PNP0400 (active)
[ 0.309421] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.309604] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309678] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309689] pnp 00:05: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.309713] system 00:06: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[ 0.309921] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.309953] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.310228] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311191] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.311911] pnp: PnP ACPI: found 11 devices
[ 0.319103] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.716964] ACPI: Sleep Button [SLPB]
[ 0.716991] ACPI: Power Button [PWRB]
[ 0.717061] ACPI: Power Button [PWRF]
[ 0.777234] ACPI: Thermal Zone [TZ00] (28 C)
[ 0.777342] ACPI: Thermal Zone [TZ01] (30 C)
[ 1.648278] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 3.270903] parport_pc 00:01: reported by Plug and Play ACPI






linux fedora cpu power-management






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 11 '17 at 18:01

























asked Oct 8 '17 at 20:33









jww

1,43132154




1,43132154











  • Do you have cpupower command? What cpupower frequency-info gives you?
    – myaut
    Oct 8 '17 at 20:40










  • @myaut - No, its not available. Fedora prompted me to install kernel-tools for it, but the program appears to be missing after the install. After the install which cpupower reports no cpupower in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin).
    – jww
    Oct 8 '17 at 20:42










  • Do you see powersave in cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?
    – Andy Dalton
    Oct 8 '17 at 21:56
















  • Do you have cpupower command? What cpupower frequency-info gives you?
    – myaut
    Oct 8 '17 at 20:40










  • @myaut - No, its not available. Fedora prompted me to install kernel-tools for it, but the program appears to be missing after the install. After the install which cpupower reports no cpupower in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin).
    – jww
    Oct 8 '17 at 20:42










  • Do you see powersave in cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?
    – Andy Dalton
    Oct 8 '17 at 21:56















Do you have cpupower command? What cpupower frequency-info gives you?
– myaut
Oct 8 '17 at 20:40




Do you have cpupower command? What cpupower frequency-info gives you?
– myaut
Oct 8 '17 at 20:40












@myaut - No, its not available. Fedora prompted me to install kernel-tools for it, but the program appears to be missing after the install. After the install which cpupower reports no cpupower in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin).
– jww
Oct 8 '17 at 20:42




@myaut - No, its not available. Fedora prompted me to install kernel-tools for it, but the program appears to be missing after the install. After the install which cpupower reports no cpupower in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin).
– jww
Oct 8 '17 at 20:42












Do you see powersave in cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?
– Andy Dalton
Oct 8 '17 at 21:56




Do you see powersave in cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors?
– Andy Dalton
Oct 8 '17 at 21:56















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f396898%2fwrite-error-invalid-argument-when-changing-governor-setting%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f396898%2fwrite-error-invalid-argument-when-changing-governor-setting%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?