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_eeepc_she.cpython-312.pyc
�

�]�i����ddlmZddlmZddlZddlmZddlZejj�Z
Gd�dej�Zy)�)�base)�
exceptions�N)�commandsc�Z��eZdZdZ�fd�Zed��Zd�Zd�Z�fd�Z	d�Z
d�Zd	�Z�xZ
S)
�EeePCSHEPlugina�
	Dynamically sets the front-side bus (FSB) speed according to the
	CPU load. This feature can be found on some netbooks and is also
	known as the Asus Super Hybrid Engine. If the CPU load is lower or
	equal to the value specified by the [option]`load_threshold_powersave`
	option, the plug-in sets the FSB speed to the value specified by the
	[option]`she_powersave` option. If the CPU load is higher or
	equal to the value specified by the [option]`load_threshold_normal`
	option, it sets the FSB speed to the value specified by the
	[option]`she_normal` option. Static tuning is not supported and the
	plug-in is transparently disabled if the hardware support for this
	feature is not detected.
	
	NOTE: For details about the FSB frequencies and corresponding values, see
	link:https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-platform-eeepc-laptop[the kernel documentation].
	The provided defaults should work for most users.
	c�4��t�|_d|_tjj|j�sd|_tjj|j�st
jd��tt|�*|i|��y)Nz!/sys/devices/platform/eeepc/cpufvz%/sys/devices/platform/eeepc-wmi/cpufvz)Plugin is not supported on your hardware.)r�_cmd�
_control_file�os�path�isfiler�NotSupportedPluginException�superr�__init__)�self�args�kwargs�	__class__s   ��C/usr/lib/python3.12/site-packages/tuned/plugins/plugin_eeepc_she.pyrzEeePCSHEPlugin.__init__sn����j�$�)�:�$��	������*�*�	+�?�4��	������*�*�	+�	�	/�	/�0[�	\�\����&��7��7�c��ddddd�S)Ng333333�?g�������?�r)�load_threshold_normal�load_threshold_powersave�
she_powersave�
she_normal�)rs r�_get_config_optionsz"EeePCSHEPlugin._get_config_options%s��!$� #� !� !�	
�rc�<�d|_d|_d|_d|_y)NFT)�_has_static_tuning�_has_dynamic_tuning�	_she_mode�
_load_monitor�r�instances  r�_instance_initzEeePCSHEPlugin._instance_init.s"�� %�(��!%�(���(���(�rc�v�|j�-|jj|j�d|_yy)N)r$�_monitors_repository�deleter%s  r�_instance_cleanupz EeePCSHEPlugin._instance_cleanup4s5��
���'����#�#�H�$:�$:�;� �8��(rc�n��tt|�|�|jj	dd�|_y)N�load)rr�_instance_init_dynamicr)�creater$)rr&rs  �rr.z%EeePCSHEPlugin._instance_init_dynamic9s-������4�X�>��4�4�;�;�F�D�I�(�rc���|jj�d}||jdkr|j|d�y||jdk\r|j|d�yy)N�systemr�	powersaver�normal)r$�get_load�options�
_set_she_mode)rr&�devicer-s    r�_instance_update_dynamicz'EeePCSHEPlugin._instance_update_dynamic=sh��	�	�	�	(�	(�	*�8�	4�$�	�X�
�
�8�
9�9����h��,��x��� 7�8�8����h��)�9rc�(�|j|d�y)Nr3)r6)rr&r7s   r�_instance_unapply_dynamicz(EeePCSHEPlugin._instance_unapply_dynamicDs�����X�x�(rc���t|jd|z�}|j|k7rKtj	d||fz�|j
j
|jd|z�||_yy)Nzshe_%sznew eeepc_she mode %s (%d) z%s)�intr5r#�log�infor
�
write_to_filer)rr&�new_mode�new_mode_numerics    rr6zEeePCSHEPlugin._set_she_modeHsp����)�)�(�X�*=�>�?��
���+�+��8�8�)�X�7G�,H�H�I��9�9���4�-�-�t�6F�/F�G�$�4�>�,r)�__name__�
__module__�__qualname__�__doc__r�classmethodrr'r+r.r8r:r6�
__classcell__)rs@rrr	s@����$8����� �!�
J�*�)�%rr)
�rr�
tuned.logs�tuned�tuned.utils.commandsrr�logs�getr=�Pluginrrrr�<module>rOs6�����)�	��j�j�n�n���D%�T�[�[�D%r