MOON
Server: Apache
System: Linux s5.yayogua.com.py 6.12.0-124.55.3.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:54:02 EDT 2026 x86_64
User: sanbercountryclu (1012)
PHP: 8.2.33
Disabled: NONE
Upload Files
File: //lib/python3.12/site-packages/tuned/plugins/__pycache__/plugin_acpi.cpython-312.pyc
�

�]�i�	���ddlmZddl�ddlZddlZddlZddlmZejj�ZGd�dej�Z
y)�)�base)�*�N)�ACPI_DIRc���eZdZdZ�fd�Zed��Zd�Zd�Zed��Z	ed��Z
ed�d	��Ze
d�dd
��Z�xZS)�
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�,��tt|�
|i|��y�N)�superr�__init__)�self�args�kwargs�	__class__s   ��>/usr/lib/python3.12/site-packages/tuned/plugins/plugin_acpi.pyrzACPIPlugin.__init__ s����
�D�"�D�3�F�3�c�
�ddiS�N�platform_profile���clss r�_get_config_optionszACPIPlugin._get_config_options#s
��
�d�	#�#rc� �d|_d|_y)NTF)�_has_static_tuning�_has_dynamic_tuning�r
�instances  r�_instance_initzACPIPlugin._instance_init's�� $�(��!&�(�rc��yr
rrs  r�_instance_cleanupzACPIPlugin._instance_cleanup+s��rc�J�tjjtd�S)N�platform_profile_choices��os�path�joinrrs r�_platform_profile_choices_pathz)ACPIPlugin._platform_profile_choices_path.s��	�����h� :�	;�;rc�J�tjjtd�Srr$rs r�_platform_profile_pathz!ACPIPlugin._platform_profile_path2s��	�����h� 2�	3�3rrc��tjj|j��stjd�y|j
d�D�cgc]}|j���}}t|jj|j��j
��}|D]{}||vr]|sWtjd|z�|jj|j�||rtjgnd��|cStj!d|z��}tj#d�ycc}w)N�5ACPI platform_profile is not supported on this system�|z Setting platform_profile to '%s'F)�no_errorz+Requested platform_profile '%s' unavailablezDFailed to set platform_profile. Is the value in the profile correct?)r%r&�isfiler*�log�debug�split�strip�set�_cmd�	read_filer(�info�
write_to_file�errno�ENOENT�warning�error)r
�profilesr�sim�remove�profile�avail_profiless       r�_set_platform_profilez ACPIPlugin._set_platform_profile6s��	������3�3�5�	6��9�9�
D�E�
�-5�^�^�C�-@�
A�-@�'�g�m�m�o�-@�(�
A��t�y�y�*�*�4�+N�+N�+P�Q�W�W�Y�Z�.��g�
�����X�X�0�7�:�;�	�Y�Y���T�8�8�:�G�!'����~�U��4��N��;�;�<�w�F�G���)�)�R�S�	
��Bs�Ec��tjj|j��stjd�y|jj|j��j�S)Nr,)	r%r&r/r*r0r1r5r6r3)r
r�ignore_missings   r�_get_platform_profilez ACPIPlugin._get_platform_profileHsR��	������3�3�5�	6��9�9�
D�E�
�	
���	�	�T�8�8�:�	;�	A�	A�	C�Cr)F)�__name__�
__module__�__qualname__�__doc__r�classmethodrrr!r(r*�command_setrB�command_getrE�
__classcell__)rs@rrrs�����(4��$��$�'���<��<��4��4�� �!��"��"� �!�D�"�Drr)�r�
decoratorsr%r9�
tuned.logs�tuned�tuned.constsr�logs�getr0�Pluginrrrr�<module>rVs;����	���!��j�j�n�n���BD����BDr