{"id":5822,"date":"2022-01-24T17:22:03","date_gmt":"2022-01-24T15:22:03","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=5822"},"modified":"2022-01-24T17:22:03","modified_gmt":"2022-01-24T15:22:03","slug":"%d0%be%d1%82%d0%ba%d0%bb%d1%8e%d1%87%d0%b0%d0%b5%d0%bc-%d0%b7%d0%b0%d1%81%d1%8b%d0%bf%d0%b0%d0%bd%d0%b8%d0%b5-%d0%bc%d0%be%d0%b4%d0%b5%d0%bc%d0%b0","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5822","title":{"rendered":"\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c &#8220;\u0437\u0430\u0441\u044b\u043f\u0430\u043d\u0438\u0435&#8221; \u043c\u043e\u0434\u0435\u043c\u0430"},"content":{"rendered":"\n<p>\u0417\u0430\u043c\u0435\u0442\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430, \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 <a rel=\"noreferrer noopener\" href=\"https:\/\/skeletor.org.ua\/?p=611\" target=\"_blank\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u043e\u0432\u044b\u0445 \u044f\u0434\u0440\u0430\u0445 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u043e \u0441\u0443\u0442\u0438, \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u0437 <a rel=\"noreferrer noopener\" href=\"https:\/\/www.kernel.org\/doc\/Documentation\/usb\/power-management.txt\" target=\"_blank\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <\/a>\u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u044f\u0434\u0440\u0430 <strong>Linux<\/strong>.<\/p>\n\n\n<p><!--more--><\/p>\n\n\n<h1 class=\"wp-block-heading\"><strong><span class=\"has-inline-color has-blue-color\">\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0441\u044b\u043f\u0430\u043d\u0438\u0435.<\/span><\/strong><\/h1>\n\n\n\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u0430\u043a:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p> power\/control <\/p><p><span style=\"color:#a35900\" class=\"has-inline-color\">This file contains one of two words: &#8220;on&#8221; or &#8220;auto&#8221;. You can write those words to the file to change the device&#8217;s setting. &#8220;on&#8221; means that the device should be resumed and autosuspend is not allowed.  (Of course, system suspends are still allowed.) &#8220;auto&#8221; is the normal state in which the kernel is allowed to autosuspend and autoresume the device. (In kernels up to 2.6.32, you could also specify &#8220;suspend&#8221;, meaning that the device should remain suspended and autoresume was not allowed.  This setting is no longer supported.) <\/span><\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>power\/autosuspend_delay_ms<\/p><p><span style=\"color:#a35900\" class=\"has-inline-color\">This file contains an integer value, which is the number of milliseconds the device should remain idle before the kernel will autosuspend it (the idle-delay time).  The default is 2000.  0 means to autosuspend as soon as the device becomes idle, and negative values mean never to autosuspend.  You can write a number to the file to change the autosuspend idle-delay time. <\/span><\/p><\/blockquote>\n\n\n\n<p>\u0412\u0430\u0436\u043d\u044b\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><span style=\"color:#a35900\" class=\"has-inline-color\">Writing &#8220;-1&#8221; to power\/autosuspend_delay_ms and writing &#8220;on&#8221; to power\/control do essentially the same thing &#8212; they both prevent the device from being autosuspended.  Yes, this is a redundancy in the API. (In 2.6.21 writing &#8220;0&#8221; to power\/autosuspend would prevent the device from being autosuspended; the behavior was changed in 2.6.22.  The power\/autosuspend attribute did not exist prior to 2.6.21, and the power\/level attribute did not exist prior to 2.6.22.  power\/control was added in 2.6.34, and power\/autosuspend_delay_ms was added in 2.6.37 but did not become functional until 2.6.38.)<\/span><\/p><\/blockquote>\n\n\n\n<p>\u0418\u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u0441\u044b\u043f\u0430\u0435\u043d\u0438\u0435, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n\n\n\n<p><code>\necho \"-1\" &gt; ${path_usb}\/power\/autosuspend_delay_ms<br>\necho \"on\" &gt; ${path_usb}\/power\/control\n<\/code><\/p>\n\n\n\n<p>\u0410 \u043a\u0430\u043a \u0436\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u044d\u0442\u043e\u0442 <strong>path_usb<\/strong>? \u042d\u0442\u043e \u043f\u0430\u043f\u043a\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u043c\u0435\u0440\u0430 <strong>bus\/port<\/strong> \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>\/sys\/bus\/usb\/drivers\/usb<\/strong>. <\/p>\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<pre>$ lsusb -t\n\/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci\/4p, 12M\n\/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci\/5p, 12M\n\/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci\/5p, 12M\n\/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci\/4p, 480M\n\/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci\/5p, 480M\n\/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci\/5p, 480M\n    |__ Port 3: Dev 21, If 0, Class=Communications, Driver=cdc_ether, 480M\n    |__ Port 3: Dev 21, If 1, Class=CDC Data, Driver=cdc_ether, 480M\n$ ls \/sys\/bus\/usb\/drivers\/usb\n1-3  bind  module  uevent  unbind  usb1  usb2  usb3  usb4  usb5  usb6\n<\/pre>\n\n\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <strong>path_usb=\/sys\/bus\/usb\/drivers\/usb\/1-3<\/strong>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong><span class=\"has-inline-color has-blue-color\">\u0421\u0431\u0440\u043e\u0441 \u043c\u043e\u0434\u0435\u043c\u0430.<\/span><\/strong><\/h1>\n\n\n\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u043d\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0431\u0440\u043e\u0441, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f, \u0432 \u0441\u043a\u043e\u0440\u0435\u0435 <strong>detach\/hide<\/strong> \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c <strong>attach\/unhide<\/strong>. \u0414\u043b\u044f \u041e\u0421 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 &#8211; \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435, \u0442\u043e &#8220;\u0441\u0431\u0440\u043e\u0441&#8221; \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n\n\n\n<p><code>echo '1-3' &gt; \/sys\/bus\/usb\/drivers\/usb\/unbind ;sleep 3;echo '1-3' &gt; \/sys\/bus\/usb\/drivers\/usb\/bind<\/code><\/p>\n\n\n\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0431\u0440\u043e\u0441 \u043f\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u044e, \u0442\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo 0 &gt; power\/pm_qos_no_power_off\necho 0 &gt; peer\/power\/pm_qos_no_power_off # if it exists\necho auto &gt; power\/control # this is the default value\necho auto &gt; &lt;child&gt;\/power\/control\necho 1 &gt; &lt;child&gt;\/power\/persist # this is the default value<\/pre>\n\n\n\n<p>\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 <strong>pm_qos_no_power_off<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u043c\u0435\u0442\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430, \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u043e\u0432\u044b\u0445 \u044f\u0434\u0440\u0430\u0445 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u043e \u0441\u0443\u0442\u0438, \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u044f\u0434\u0440\u0430 Linux.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-5822","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5822"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5822\/revisions"}],"predecessor-version":[{"id":5823,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5822\/revisions\/5823"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}