404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.17.75.243: ~ $
3

�<�e��@s`ddlmZddlTddlZddlmZddlZddlZddl	Z	ej
j�ZGdd�dej
�ZdS)�)�base)�*�N)�commandsc@sjeZdZdZdd�Zdd�Zedd��Zdd	�Zd
d�Z	dd
�Z
eddd�dd��Ze
d�ddd��ZdS)�VideoPlugina�
	`video`::
	
	Sets various powersave levels on video cards. Currently, only the
	Radeon cards are supported. The powersave level can be specified
	by using the [option]`radeon_powersave` option. Supported values are:
	+
	--
	* `default`
	* `auto`
	* `low`
	* `mid`
	* `high`
	* `dynpm`
	* `dpm-battery`
	* `dpm-balanced`
	* `dpm-perfomance`
	--
	+
	For additional detail, see
	link:https://www.x.org/wiki/RadeonFeature/#kmspowermanagementoptions[KMS Power Management Options].
	+
	NOTE: This plug-in is experimental and the option might change in future releases.
	+
	.To set the powersave level for the Radeon video card to high
	====
	----
	[video]
	radeon_powersave=high
	----
	====
	cCsTd|_t�|_t�|_x0|jjd�jd�jdd�D]}|jj|j	�q2Wt
�|_dS)NT�drmzcard*ZDEVTYPEZ	drm_minor)Z_devices_supported�setZ
_free_devicesZ_assigned_devices�_hardware_inventoryZget_devicesZmatch_sys_nameZmatch_property�addZsys_namer�_cmd)�self�device�r�"/usr/lib/python3.6/plugin_video.py�
_init_devices-s zVideoPlugin._init_devicescs�fdd�|D�S)Ncsg|]}�jjd|��qS)r)r	Z
get_device)�.0�x)rrr�
<listcomp>9sz3VideoPlugin._get_device_objects.<locals>.<listcomp>r)rZdevicesr)rr�_get_device_objects8szVideoPlugin._get_device_objectscCsddiS)N�radeon_powersaver)rrrr�_get_config_options;szVideoPlugin._get_config_optionscCsd|_d|_dS)NFT)Z_has_dynamic_tuningZ_has_static_tuning)r�instancerrr�_instance_initAszVideoPlugin._instance_initcCsdS)Nr)rrrrr�_instance_cleanupEszVideoPlugin._instance_cleanupcCsd|d|d|d�S)Nz%/sys/class/drm/%s/device/power_methodz&/sys/class/drm/%s/device/power_profilez(/sys/class/drm/%s/device/power_dpm_state)�method�profile�	dpm_stater)rr
rrr�_radeon_powersave_filesHsz#VideoPlugin._radeon_powersave_filesrT)Z
per_devicec	Csl|j|�}ttjdd|��j�}tjj|d�sF|sFtj	d|�dS�x|D�]}|dkr�|s�|j
j|dd
|rztj
gndd�r�|j
j|d
||r�tj
gndd�r�|SqN|d
kr�|s�|j
j|dd
|r�tj
gndd�r�d
SqN|dk�rP|�sd|td�d�}|j
j|dd|�rtj
gndd��rd|j
j|d||�r@tj
gndd��rd|SqN|�s`tj	d�dSqNWdS)Nz#(\s*:\s*)|(\s+)|(\s*;\s*)|(\s*,\s*)� rz)radeon_powersave is not supported on '%s'�default�auto�low�mid�highrF)�no_error�dynpm�dpm-battery�dpm-balanced�dpm-performancezdpm-�dpmrz$Invalid option for radeon_powersave.)rr r!r"r#)r&r'r()r�str�re�sub�split�os�path�exists�log�warnrZ
write_to_file�errno�ENOENT�len)	r�valuer
Zsim�remove�	sys_filesZva�v�staterrr�_set_radeon_powersaveOs>


z!VideoPlugin._set_radeon_powersaveFcCsr|j|�}|jj|d|d�j�}|dkr>|jj|d�j�S|dkrJ|S|dkrjd|jj|d�j�SdSdS)Nr)r$rr%r)zdpm-r)rrZ	read_file�strip)rr
Zignore_missingr8rrrr�_get_radeon_powersavess
z!VideoPlugin._get_radeon_powersaveN)F)�__name__�
__module__�__qualname__�__doc__rr�classmethodrrrrZcommand_setr;Zcommand_getr=rrrrrs $r)�rZ
decoratorsZ
tuned.logsZtunedZtuned.utils.commandsrr.r3r+Zlogs�getr1ZPluginrrrrr�<module>s


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 173 B 0644
__init__.cpython-36.pyc File 173 B 0644
base.cpython-36.opt-1.pyc File 21.13 KB 0644
base.cpython-36.pyc File 21.13 KB 0644
decorators.cpython-36.opt-1.pyc File 1.06 KB 0644
decorators.cpython-36.pyc File 1.06 KB 0644
exceptions.cpython-36.opt-1.pyc File 354 B 0644
exceptions.cpython-36.pyc File 354 B 0644
hotplug.cpython-36.opt-1.pyc File 4.23 KB 0644
hotplug.cpython-36.pyc File 4.23 KB 0644
plugin_acpi.cpython-36.opt-1.pyc File 3.35 KB 0644
plugin_acpi.cpython-36.pyc File 3.35 KB 0644
plugin_audio.cpython-36.opt-1.pyc File 4.03 KB 0644
plugin_audio.cpython-36.pyc File 4.03 KB 0644
plugin_bootloader.cpython-36.opt-1.pyc File 24.45 KB 0644
plugin_bootloader.cpython-36.pyc File 24.45 KB 0644
plugin_cpu.cpython-36.opt-1.pyc File 26.03 KB 0644
plugin_cpu.cpython-36.pyc File 26.06 KB 0644
plugin_disk.cpython-36.opt-1.pyc File 16.35 KB 0644
plugin_disk.cpython-36.pyc File 16.35 KB 0644
plugin_eeepc_she.cpython-36.opt-1.pyc File 3.43 KB 0644
plugin_eeepc_she.cpython-36.pyc File 3.43 KB 0644
plugin_irqbalance.cpython-36.opt-1.pyc File 4.51 KB 0644
plugin_irqbalance.cpython-36.pyc File 4.51 KB 0644
plugin_modules.cpython-36.opt-1.pyc File 5.45 KB 0644
plugin_modules.cpython-36.pyc File 5.45 KB 0644
plugin_mounts.cpython-36.opt-1.pyc File 5.5 KB 0644
plugin_mounts.cpython-36.pyc File 5.5 KB 0644
plugin_net.cpython-36.opt-1.pyc File 23.21 KB 0644
plugin_net.cpython-36.pyc File 23.21 KB 0644
plugin_rtentsk.cpython-36.opt-1.pyc File 1.34 KB 0644
plugin_rtentsk.cpython-36.pyc File 1.34 KB 0644
plugin_scheduler.cpython-36.opt-1.pyc File 53.44 KB 0644
plugin_scheduler.cpython-36.pyc File 53.44 KB 0644
plugin_script.cpython-36.opt-1.pyc File 4.26 KB 0644
plugin_script.cpython-36.pyc File 4.31 KB 0644
plugin_scsi_host.cpython-36.opt-1.pyc File 4.56 KB 0644
plugin_scsi_host.cpython-36.pyc File 4.56 KB 0644
plugin_selinux.cpython-36.opt-1.pyc File 3 KB 0644
plugin_selinux.cpython-36.pyc File 3 KB 0644
plugin_service.cpython-36.opt-1.pyc File 13.84 KB 0644
plugin_service.cpython-36.pyc File 13.84 KB 0644
plugin_sysctl.cpython-36.opt-1.pyc File 6.7 KB 0644
plugin_sysctl.cpython-36.pyc File 6.7 KB 0644
plugin_sysfs.cpython-36.opt-1.pyc File 3.64 KB 0644
plugin_sysfs.cpython-36.pyc File 3.64 KB 0644
plugin_systemd.cpython-36.opt-1.pyc File 5.92 KB 0644
plugin_systemd.cpython-36.pyc File 5.92 KB 0644
plugin_uncore.cpython-36.opt-1.pyc File 4.75 KB 0644
plugin_uncore.cpython-36.pyc File 4.75 KB 0644
plugin_usb.cpython-36.opt-1.pyc File 2.95 KB 0644
plugin_usb.cpython-36.pyc File 2.95 KB 0644
plugin_video.cpython-36.opt-1.pyc File 4.13 KB 0644
plugin_video.cpython-36.pyc File 4.13 KB 0644
plugin_vm.cpython-36.opt-1.pyc File 4.11 KB 0644
plugin_vm.cpython-36.pyc File 4.11 KB 0644
repository.cpython-36.opt-1.pyc File 1.87 KB 0644
repository.cpython-36.pyc File 1.92 KB 0644