diff --git a/build/config/kernel/boot.fragment b/build/config/kernel/boot.fragment index fae33f99..4494b60f 100644 --- a/build/config/kernel/boot.fragment +++ b/build/config/kernel/boot.fragment @@ -230,11 +230,15 @@ CONFIG_AMD_PMC=m # (root, /sys/power), amd_pmc's SMU idle mask and the LPS0 constraints reach the # kernel log, and pm_wakeup_irq names what woke it. Root-only switches, off until set. CONFIG_PM_DEBUG=y -# The processor's clock: amd-pstate in active mode, where the power service sets the energy -# preference, and schedutil for a machine whose processor falls back to acpi-cpufreq, where -# defconfig's userspace governor would hold the clock wherever the firmware left it. +# The processor's clock: intel_pstate from Sandy Bridge on and amd-pstate from Zen 2 on, both +# bool with no Kconfig default and named by no defconfig line. amd-pstate runs in active mode +# with its dynamic EPP off, as the power service sets the energy preference. A machine whose +# processor falls back to acpi-cpufreq gets schedutil, where defconfig's userspace governor +# would hold the clock wherever the firmware left it. +CONFIG_X86_INTEL_PSTATE=y CONFIG_X86_AMD_PSTATE=y CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 +# CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP is not set CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_INTEL_VSEC=m diff --git a/build/lib/kconfig-check.sh b/build/lib/kconfig-check.sh index 67ffa80b..bc840fd3 100644 --- a/build/lib/kconfig-check.sh +++ b/build/lib/kconfig-check.sh @@ -18,7 +18,8 @@ _kconfig_load() { # <.config> # and HID over I2C behind Intel's LPSS or AMD's DesignWare controller, with the pin controllers its # interrupt comes through. SERIO_I8042, I2C_HID_CORE, PINCTRL_INTEL and USB_XHCI_PCI are not # boot.fragment lines: ATKBD, I2C_HID_ACPI and the pin controllers select the first three, and -# xHCI brings the last by default. +# xHCI brings the last by default. The two P-state drivers are bool only and default off: losing +# one leaves that maker's processors at a fixed clock with no energy preference. KCONFIG_CRITICAL="CONFIG_SECURITY_LANDLOCK CONFIG_SECCOMP_FILTER CONFIG_USER_NS CONFIG_NET_NS CONFIG_EFI_STUB CONFIG_CMDLINE_BOOL CONFIG_CMDLINE_OVERRIDE CONFIG_DM_INIT CONFIG_EFIVAR_FS CONFIG_OVERLAY_FS CONFIG_DRM_VIRTIO_GPU @@ -34,7 +35,8 @@ CONFIG_MFD_INTEL_LPSS_PCI=y CONFIG_MFD_INTEL_LPSS_ACPI=y CONFIG_PINCTRL_INTEL=y CONFIG_PINCTRL_SUNRISEPOINT=y CONFIG_PINCTRL_CANNONLAKE=y CONFIG_PINCTRL_ICELAKE=y CONFIG_PINCTRL_JASPERLAKE=y CONFIG_PINCTRL_ELKHARTLAKE=y CONFIG_PINCTRL_LAKEFIELD=y CONFIG_PINCTRL_TIGERLAKE=y CONFIG_PINCTRL_ALDERLAKE=y CONFIG_PINCTRL_METEORLAKE=y -CONFIG_PINCTRL_METEORPOINT=y CONFIG_PINCTRL_INTEL_PLATFORM=y" +CONFIG_PINCTRL_METEORPOINT=y CONFIG_PINCTRL_INTEL_PLATFORM=y +CONFIG_X86_INTEL_PSTATE=y CONFIG_X86_AMD_PSTATE=y" # kconfig_critical_check <.config>: 0 when every bare entry is =y or =m and every OPTION=y one =y. kconfig_critical_check() { diff --git a/docs/design/laptop.md b/docs/design/laptop.md index b478a4f6..d84fa681 100644 --- a/docs/design/laptop.md +++ b/docs/design/laptop.md @@ -511,8 +511,10 @@ and the power key, idle and inhibitors, suspend, and runtime directories rather than the battery's running down, so a machine that outdraws its charger under load does not swing between the two, on each processor policy that offers it (amd-pstate and intel_pstate both do). + Both are built in (`boot.fragment`), amd-pstate in active mode with its + dynamic EPP off, so the kernel does not override what this service sets. A processor neither drives falls back to acpi-cpufreq, which runs - schedutil (`boot.fragment`), so its clock still follows the load. + schedutil, so its clock still follows the load, and offers no preference. PCIe link power and NVMe power states keep the kernel's defaults, and no rule turns on USB autosuspend for input devices, which too often misbehave with it. diff --git a/tools/tests/kconfig-critical.sh b/tools/tests/kconfig-critical.sh index 2d26c7e8..06d8778f 100755 --- a/tools/tests/kconfig-critical.sh +++ b/tools/tests/kconfig-critical.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # kconfig_critical_check against a stand-in .config: a bare entry takes =y or =m, one written # OPTION=y only =y, and either fails an option not set. Then the shipped list against -# boot.fragment: each keyboard link it holds built in is a =y line there, but the four that are +# boot.fragment: each entry it holds built in is a =y line there, but the four that are # not boot.fragment lines (kconfig-check.sh says what brings them). Offline. set -uo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"