#!/usr/bin/clitest
# Test Processor features
# Requirements:
# * Intel Core i processor gen. 6 or newer
# * HWP in active mode
# Copyright (c) 2023 Thomas Koch <linrunner at gmx.net>.
# SPDX-License-Identifier: GPL-2.0-or-later
#
$ # --- valid freqs
$ sudo tlp start -- X_SIMULATE_PS=1 CPU_HWP_DYN_BOOST_ON_AC=1 CPU_HWP_DYN_BOOST_ON_BAT=0
TLP started in battery mode (auto).
$ sudo tlp-stat -p | grep hwp_dynamic_boost
/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost =   0
$ sudo tlp start -- X_SIMULATE_PS=0 CPU_HWP_DYN_BOOST_ON_AC=1 CPU_HWP_DYN_BOOST_ON_BAT=0
TLP started in AC mode (auto).
$ sudo tlp-stat -p | grep hwp_dynamic_boost
/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost =   1
$ # --- Reset
$ sudo tlp start > /dev/null
