JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/tuned/plugins/__pycache__/plugin_acpi.cpython-39.opt-1.pyc

a

���h�	�@sXddlmZddlTddlZddlZddlZddlmZej	�
�ZGdd�dej�Z
dS)�)�base)�*�N)�ACPI_DIRcsveZdZdZ�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`.
	====
	cstt|�j|i|��dS�N)�superr�__init__)�self�args�kwargs��	__class__��=/usr/lib/python3.9/site-packages/tuned/plugins/plugin_acpi.pyr	 szACPIPlugin.__init__cCsddiS�N�platform_profiler��clsrrr�_get_config_options#szACPIPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning�r
�instancerrr�_instance_init'szACPIPlugin._instance_initcCsdSrrrrrr�_instance_cleanup+szACPIPlugin._instance_cleanupcCstj�td�S)NZplatform_profile_choices��os�path�joinrrrrr�_platform_profile_choices_path.sz)ACPIPlugin._platform_profile_choices_pathcCstj�td�Srrrrrr�_platform_profile_path2sz!ACPIPlugin._platform_profile_pathrcCs�tj�|���st�d�dSdd�|�d�D�}t|j�	|�
�����}|D]V}||vr�|s�t�d|�|jj|��||r�t
jgndd�|St�d|�qNt�d	�dS)
N�5ACPI platform_profile is not supported on this systemcSsg|]}|���qSr)�strip)�.0�profilerrr�
<listcomp>;�z4ACPIPlugin._set_platform_profile.<locals>.<listcomp>�|z Setting platform_profile to '%s'F)Zno_errorz+Requested platform_profile '%s' unavailablezDFailed to set platform_profile. Is the value in the profile correct?)rr�isfiler�log�debug�split�set�_cmd�	read_filer�infoZ
write_to_file�errno�ENOENTZwarning�error)r
ZprofilesrZsim�removeZavail_profilesr#rrr�_set_platform_profile6s 
�
z ACPIPlugin._set_platform_profileFcCs2tj�|���st�d�dS|j�|�����S)Nr )	rrr'rr(r)r,r-r!)r
rZignore_missingrrr�_get_platform_profileHs
z ACPIPlugin._get_platform_profile)F)�__name__�
__module__�__qualname__�__doc__r	�classmethodrrrrrZcommand_setr3Zcommand_getr4�
__classcell__rrr
rrs



r)�rZ
decoratorsrr/Z
tuned.logsZtunedZtuned.constsrZlogs�getr(ZPluginrrrrr�<module>s

Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6Yݾ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