a
Á]›iŽ ã @ sX d dl mZ d dlT ddlZddlZddlZddlmZ ej
¡ ZG dd„ dejƒZ
dS )é )Úbase)Ú*é N)ÚACPI_DIRc sv e Zd ZdZ‡ fdd„Zedd„ ƒZdd„ Zdd „ Zed
d„ ƒZ edd
„ ƒZ
edƒdd„ ƒZe
dƒddd„ƒZ‡ ZS )Ú
ACPIPlugina'
Configures the ACPI driver.
The only currently supported option is
[option]`platform_profile`, which sets the ACPI
platform profile sysfs attribute,
a generic power/performance preference API for other drivers.
Multiple profiles can be specified, separated by `|`.
The first available profile is selected.
.Selecting a platform profile
====
----
[acpi]
platform_profile=balanced|low-power
----
Using this option, *TuneD* will try to set the platform profile
to `balanced`. If that fails, it will try to set it to `low-power`.
====
c s t t| ƒj|i |¤Ž d S ©N)Úsuperr Ú__init__)ÚselfÚargsÚkwargs©Ú __class__© ú=/usr/lib/python3.9/site-packages/tuned/plugins/plugin_acpi.pyr s zACPIPlugin.__init__c C s dd iS ©NÚplatform_profiler ©Úclsr r r Ú_get_config_options# s zACPIPlugin._get_config_optionsc C s d|_ d|_d S )NTF)Z_has_static_tuningZ_has_dynamic_tuning©r
Úinstancer r r Ú_instance_init' s zACPIPlugin._instance_initc C s d S r r r r r r Ú_instance_cleanup+ s zACPIPlugin._instance_cleanupc C s t j td¡S )NZplatform_profile_choices©ÚosÚpathÚjoinr r r r r Ú_platform_profile_choices_path. s z)ACPIPlugin._platform_profile_choices_pathc C s t j td¡S r r r r r r Ú_platform_profile_path2 s z!ACPIPlugin._platform_profile_pathr c C s´ t j | ¡ ¡st d¡ d S dd„ | d¡D ƒ}t| j |
¡ ¡ ¡ ƒ}|D ]V}||v r–|sŽt d| ¡ | jj| ¡ ||r†t
jgndd | S t d| ¡ qNt d ¡ d S )
Nú5ACPI platform_profile is not supported on this systemc S s g | ]}| ¡ ‘qS r )Ústrip)Ú.0Úprofiler r r Ú