3  `acpi`:: 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||dS)N)superr__init__)selfargskwargs) __class__!/usr/lib/python3.6/plugin_acpi.pyr$szACPIPlugin.__init__cCsddiS)Nplatform_profiler )clsr r r_get_config_options'szACPIPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r instancer r r_instance_init+szACPIPlugin._instance_initcCsdS)Nr )r rr r r_instance_cleanup/szACPIPlugin._instance_cleanupcCstjjtdS)NZplatform_profile_choices)ospathjoinr)rr r r_platform_profile_choices_path2sz)ACPIPlugin._platform_profile_choices_pathcCstjjtdS)Nr)rrrr)rr r r_platform_profile_path6sz!ACPIPlugin._platform_profile_pathrcCstjj|jstjddSdd|jdD}t|jj |j j}xZ|D]R}||kr|stj d||jj |j||rt jgndd|Stjd|qPWtjd dS) Nz5ACPI platform_profile is not supported on this systemcSsg|] }|jqSr )strip).0profiler r r ?sz4ACPIPlugin._set_platform_profile..|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?)rrisfilerlogdebugsplitset_cmd read_filerinfoZ write_to_fileerrnoENOENTwarnerror)r ZprofilesZsimremoveZavail_profilesrr r r_set_platform_profile:s   z ACPIPlugin._set_platform_profileFcCs2tjj|jstjddS|jj|jjS)Nz5ACPI platform_profile is not supported on this system) rrrrr r!r$r%r)r Zignore_missingr r r_get_platform_profileLs z ACPIPlugin._get_platform_profile)F)__name__ __module__ __qualname____doc__r classmethodrrrrrZ command_setr,Z command_getr- __classcell__r r )r rr s    r)rZ decoratorsrr'Z tuned.logsZtunedZ tuned.constsrZlogsgetr ZPluginrr r r rs