{"id":5200,"date":"2021-05-04T18:38:32","date_gmt":"2021-05-04T10:38:32","guid":{"rendered":"https:\/\/damogame.cn\/wordpress\/?p=5200"},"modified":"2021-05-04T18:38:32","modified_gmt":"2021-05-04T10:38:32","slug":"%e9%80%9a%e8%bf%87-pmset-%e5%b7%a5%e5%85%b7%e7%ae%a1%e7%90%86-masos-%e7%9d%a1%e7%9c%a0%ef%bc%8c%e8%ae%a9%e4%bd%a0%e7%9a%84-mac-%e7%9d%a1%e5%be%97%e6%9b%b4%e5%a5%bd","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/5200","title":{"rendered":"\u901a\u8fc7 pmset \u5de5\u5177\u7ba1\u7406 masOS \u7761\u7720\uff0c\u8ba9\u4f60\u7684 Mac \u7761\u5f97\u66f4\u597d"},"content":{"rendered":"<div class=\"article-header normal\" data-v-650e14ac=\"\" data-v-76c89034=\"\">\n<div class=\"articleWidth-content\" data-v-650e14ac=\"\">\n<div id=\"article-title\" class=\"title\" data-v-650e14ac=\"\"><a href=\"https:\/\/sspai.com\/post\/61379\">\u539f\u6587\u5730\u5740<\/a><\/div>\n<div data-v-650e14ac=\"\"><\/div>\n<\/div>\n<\/div>\n<div id=\"\" class=\"article-body\" data-v-e1f0100a=\"\" data-v-76c89034=\"\">\n<div class=\"articleWidth-content\" data-v-e1f0100a=\"\">\n<div class=\"content wangEditor-txt minHeight\" data-v-e1f0100a=\"\">\n<h3 class=\"ss-hIdChildren-1\"><b>Matrix \u7cbe\u9009<\/b><\/h3>\n<p><a href=\"https:\/\/sspai.com\/matrix\">Matrix<\/a>\u00a0\u662f\u5c11\u6570\u6d3e\u7684\u5199\u4f5c\u793e\u533a\uff0c\u6211\u4eec\u4e3b\u5f20\u5206\u4eab\u771f\u5b9e\u7684\u4ea7\u54c1\u4f53\u9a8c\uff0c\u6709\u5b9e\u7528\u4ef7\u503c\u7684\u7ecf\u9a8c\u4e0e\u601d\u8003\u3002\u6211\u4eec\u4f1a\u4e0d\u5b9a\u671f\u6311\u9009 Matrix \u6700\u4f18\u8d28\u7684\u6587\u7ae0\uff0c\u5c55\u793a\u6765\u81ea\u7528\u6237\u7684\u6700\u771f\u5b9e\u7684\u4f53\u9a8c\u548c\u89c2\u70b9\u3002<\/p>\n<p>\u6587\u7ae0\u4ee3\u8868\u4f5c\u8005\u4e2a\u4eba\u89c2\u70b9\uff0c\u5c11\u6570\u6d3e\u4ec5\u5bf9\u6807\u9898\u548c\u6392\u7248\u7565\u4f5c\u4fee\u6539\u3002<\/p>\n<hr \/>\n<blockquote><p>Power Manager Setting (pmset) \u662f macOS \u7684\u7cfb\u7edf\u7ea7\u7535\u6c60\u7ba1\u7406\u5de5\u5177\uff0c\u901a\u8fc7\u8c03\u6574 macOS \u7684\u7761\u7720\u8ba1\u5212\uff0c\u53ef\u4ee5\u8ba9Mac\u7761\u5f97\u66f4\u300c\u597d\u300d\uff0c\u8fbe\u5230 \u300c\u63d2\u7535\u54cd\u5e94\u5feb\uff0c\u65ad\u7535\u7528\u5f97\u4e45\u300d \u7684\u7406\u60f3\u76ee\u6807\u3002<\/p><\/blockquote>\n<h2 class=\"ss-hId-1\">Mac \u662f\u600e\u4e48\u7761\u89c9\u7684\uff1f<\/h2>\n<p>Mac \u7684\u7761\u89c9\u5206\u6210\u4e24\u79cd\uff0c<b>\u300c\u4f11\u7720\u300d (sleep)<\/b>\u00a0\u548c<b>\u00a0\u300c\u7761\u7720\u300d (hibernate)<\/b>\u3002\u7b80\u5355\u70b9\u8bf4\uff0c\u4f11\u7720\u548c\u7761\u7720\u5c31\u597d\u6bd4\u4eba\u7684\u5c0f\u61a9\u548c\u7761\u5927\u89c9\uff0c\u5c0f\u61a9\u9192\u5f97\u5feb\uff0c\u7761\u5927\u89c9\u5c31\u9192\u5f97\u6162\u3002<\/p>\n<p>\u5f53\u4f60\u957f\u65f6\u95f4\u4e0d\u64cd\u4f5c Mac \u6216\u628a MacBook \u7684\u76d6\u5b50\u5408\u4e0a\u6216\u70b9\u51fb Apple Logo \u83dc\u5355\u4e0b\u7684 Sleep \u9009\u9879\uff0c\u7cfb\u7edf\u4f1a\u8fdb\u5165<b>\u300c\u4f11\u7720\u300d<\/b>\u72b6\u6001\uff0c\u7531\u4e8e\u6570\u636e\u4ecd\u5b58\u50a8\u5728\u5185\u5b58\u4e2d\uff0c\u6b64\u65f6\u7cfb\u7edf\u53ef\u4ee5\u88ab\u5feb\u901f\u5524\u9192\uff0c\u5feb\u901f\u6062\u590d\u5230\u4f11\u7720\u524d\u7684\u72b6\u6001\u3002<\/p>\n<p>\u5728\u300c\u4f11\u7720\u300d\u4e00\u6bb5\u65f6\u95f4\u540e\uff0cMac \u4f1a\u6839\u636e\u4f60\u7684\u8bbe\u5b9a\u8fdb\u5165\u66f4\u6df1\u4e00\u5c42\u7684\u00a0<b>\u300c\u7761\u7720\u300d<\/b>\u00a0\u72b6\u6001\uff0c\u6b64\u65f6 Mac \u4f1a\u8003\u8651\u5c06\u5185\u5b58\u4e2d\u7684\u6570\u636e\u4f5c\u4e3a\u4e00\u4e2a\u955c\u50cf\u5199\u5165\u5230\u786c\u76d8\u4e2d\uff08GB \u7ea7\u522b\u5927\u5c0f\uff09\uff0c\u7136\u540e\u653e\u5f03\u5185\u5b58\u4f9b\u7535\uff0c\u8fbe\u5230\u66f4\u52a0\u7701\u7535\u7684\u76ee\u7684\u3002\u6b64\u65f6\u5524\u9192\u7cfb\u7edf\uff0c\u6570\u636e\u9700\u8981\u4ece\u786c\u76d8\u91cd\u65b0\u88c5\u8f7d\u81f3\u5185\u5b58\uff0c\u8017\u65f6\u957f\uff0c\u901f\u5ea6\u6162\u3002<\/p>\n<p>\u603b\u7ed3\u4e00\u4e0b\uff0c\u300c\u4f11\u7720\u300d\u548c\u300c\u7761\u7720\u300d\u7684\u4e3b\u8981\u533a\u522b\uff1a<\/p>\n<ul>\n<li>\u5524\u9192\u901f\u5ea6\u5feb\u6162<\/li>\n<li>\u662f\u5426\u5411\u5185\u5b58\u4f9b\u7535<\/li>\n<li>\u662f\u5426\u5411\u786c\u76d8\u5199\u5165\u5185\u5b58\u955c\u50cf<\/li>\n<\/ul>\n<p>\u5f53\u7136\uff0cMac \u5230\u5e95\u8981\u600e\u4e48\u300c\u7761\u300d\uff0c\u6211\u4eec\u662f\u53ef\u4ee5\u901a\u8fc7\u00a0<code>pmset<\/code>\u00a0\u8c03\u6574\u7684\u3002<\/p>\n<h2 class=\"ss-hId-2\">macOS \u7cfb\u7edf\u7761\u7720\u6d41\u7a0b<\/h2>\n<figure class=\"ss-img-wrapper\" tabindex=\"0\" contenteditable=\"false\" draggable=\"false\"><img decoding=\"async\" class=\"lazyLoadEnd\" src=\"https:\/\/cdn.sspai.com\/2020\/07\/10\/c066a439046bb6e6fe15be81245bdfa3.png?imageView2\/2\/w\/1120\/q\/90\/interlace\/1\/ignore-error\/1\" alt=\"\" data-original=\"https:\/\/cdn.sspai.com\/2020\/07\/10\/c066a439046bb6e6fe15be81245bdfa3.png\" data-index=\"0\" \/><figcaption class=\"ss-image-caption\">macOS \u7761\u7720\u6d41\u7a0b\u56fe<\/figcaption><\/figure>\n<p>\u5982\u56fe\u6240\u793a\uff0c\u5f53\u6211\u4eec\u4e0d\u4f7f\u7528 Mac \u65f6\uff0c\u4e00\u6bb5\u65f6\u5019\u540e\uff0c\u7cfb\u7edf\u5148\u8fdb\u5165\u00a0<code>sleep<\/code>\u00a0\u72b6\u6001\uff0c\u7136\u540e\u6839\u636e\u00a0<code>hibernatemode<\/code>\u00a0\u7684\u6a21\u5f0f\uff0c\u51b3\u5b9a\u5c06\u955c\u50cf\u6570\u636e\u5199\u5165\u5185\u5b58\u8fd8\u662f\u786c\u76d8\u3002<\/p>\n<p><code>standby<\/code>\u00a0\u548c\u00a0<code>autopoweroff<\/code>\u00a0\u76f8\u5f53\u4e8e\u4e24\u4e2a\u5e76\u884c\u7684\u6a21\u5f0f\u8ba1\u65f6\u5668\uff0cMac \u4f1a\u6839\u636e\u5f53\u524d\u4f9b\u7535\u6761\u4ef6\u4f5c\u51fa\u6a21\u5f0f\u7684\u9009\u62e9\uff0c\u5728\u8ba1\u65f6\u5668\u9636\u6bb5\u5185\uff0c\u5f53\u65f6\u95f4\u6761\u4ef6\u6ee1\u8db3\uff0cMac \u5c31\u4f1a\u5c06\u955c\u50cf\u5199\u5165\u786c\u76d8\u5e76\u7761\u7720\u3002<\/p>\n<h2 class=\"ss-hId-3\">pmset \u7528\u6cd5<\/h2>\n<p><code>sudo pmset [-\u9009\u9879] &lt;\u53c2\u6570&gt;<\/code><\/p>\n<p>\u4f8b\u5b50\uff1a<\/p>\n<ul>\n<li><code>pmset -g custom<\/code>\uff1a\u67e5\u770b\u5f53\u524d\u6240\u6709\u7761\u7720\u8ba1\u5212<\/li>\n<li><code>pmset -g cap<\/code>\uff1a\u67e5\u770b\u5f53\u524d\u4f9b\u7535\u6761\u4ef6\u4e0b\u53ef\u4ee5\u8c03\u8282\u7684\u53c2\u6570<\/li>\n<li><code>sudo pmset restoredefaults<\/code>\uff1a\u8fd8\u539f\u5168\u90e8\u8bbe\u7f6e<\/li>\n<\/ul>\n<h3 class=\"ss-hIdChildren-2\">\u5e38\u7528\u9009\u9879<\/h3>\n<ul>\n<li><code>pmset -a<\/code>\uff1a\u8c03\u6574\u4efb\u4f55\u6761\u4ef6\u4e0b\u7684\u7761\u7720\u8ba1\u5212<\/li>\n<li><code>pmset -c<\/code>\uff1a\u8c03\u6574\u5916\u90e8\u4f9b\u7535\u7684\u7761\u7720\u8ba1\u5212<\/li>\n<li><code>pmset -b<\/code>\uff1a\u8c03\u6574\u7535\u6c60\u4f9b\u7535\u7684\u7761\u7720\u8ba1\u5212<\/li>\n<li><code>pmset -g<\/code>\uff1a\u67e5\u770b\u8ba1\u5212<\/li>\n<\/ul>\n<h3 class=\"ss-hIdChildren-3\">\u5e38\u7528\u53c2\u6570<\/h3>\n<p>?\u00a0<b>sleep<\/b><\/p>\n<p>sleep \u63a7\u5236\u8fdb\u5165\u4f11\u7720\u6240\u9700\u8981\u7684\u7a7a\u95f2\u65f6\u95f4<\/p>\n<p>?\u00a0<b>hibernatemode<\/b><\/p>\n<blockquote><p>hibernatemode supports values of 0, 3, or 25. Whether or not a hibernation image gets written is also dependent on the values of standby and autopoweroff.<\/p><\/blockquote>\n<p>hibernatemode \u8d1f\u8d23\u7ba1\u7406\u7761\u7720\u6a21\u5f0f\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u4f11\u7720\u65f6\u7684\u5185\u5b58\u955c\u50cf\u662f\u5426\u5199\u5165\u786c\u76d8\uff0c\u9664\u4e86\u53d7\u00a0<code>hibernatemode<\/code>\u00a0\u7684\u63a7\u5236\uff0c\u8fd8\u548c\u00a0<code>standby<\/code>\u00a0\u4ee5\u53ca\u00a0<code>autopoweroff<\/code>\u00a0\u7684\u503c\u6709\u5173\u3002<\/p>\n<p>hibernatemode \u6709 3 \u79cd\u4f11\u7720\u6a21\u5f0f\u53ef\u9009\u62e9<\/p>\n<ul>\n<li><code>hibernatemode = 0<\/code>\n<ul>\n<li><b>iMac, Mac Mini\u7b49 Mac\u684c\u9762\u8bbe\u5907\u9ed8\u8ba4\u53c2\u6570<\/b><\/li>\n<li>\u6301\u7eed\u5411\u5185\u5b58\u4f9b\u7535\uff0c\u5c06\u6570\u636e\u4fdd\u7559\u5728\u5185\u5b58<\/li>\n<li>\u5524\u9192\u901f\u5ea6\u5feb\uff0c\u51cf\u5c11\u786c\u76d8\u5360\u7528<\/li>\n<li>\u6570\u636e\u6709\u4e22\u5931\u98ce\u9669<\/li>\n<li>\u8017\u7535\u91cf\u5927<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><code>hibernatemode = 25<\/code>\n<ul>\n<li>\u5c06\u6570\u636e\u5199\u5165\u786c\u76d8<\/li>\n<li>\u4e0d\u5411\u5185\u5b58\u4f9b\u7535\uff0c\u5c06\u5185\u5b58\u955c\u50cf\u76f4\u63a5\u5199\u5165\u786c\u76d8<\/li>\n<li>\u6570\u636e\u4e0d\u6613\u4e22\u5931\uff0c\u955c\u50cf\u5360\u7528\u786c\u76d8\u7a7a\u95f4<\/li>\n<li>\u5524\u9192\u901f\u5ea6\u6162<\/li>\n<li>\u8017\u7535\u91cf\u5c11<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><code>hibernatemode = 3<\/code>\n<ul>\n<li><b>MacBook \u7b14\u8bb0\u672c\u8bbe\u5907\u9ed8\u8ba4\u53c2\u6570<\/b><\/li>\n<li>safe sleep, \u6570\u636e\u65e2\u5199\u5165\u5185\u5b58\u53c8\u5199\u5165\u786c\u76d8<\/li>\n<li>\u6301\u7eed\u5411\u5185\u5b58\u4f9b\u7535<\/li>\n<li>\u5524\u9192\u65f6\uff0c\u6839\u636e\u8bbe\u5907\u7535\u91cf\u81ea\u52a8\u9009\u62e9\u4ece \u5185\u5b58\/\u786c\u76d8 \u6062\u590d<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>?\u00a0<b>standby<\/b><\/p>\n<blockquote><p>standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period.<\/p><\/blockquote>\n<p>standby \u662f Mac \u5728\u4f11\u7720\u65f6\u7684\u8ba1\u65f6\u5668\uff0c\u5f53\u6ee1\u8db3\u65f6\u95f4\u6761\u4ef6\uff0cMac\u5c31\u4f1a\u7531\u300c\u4f11\u7720\u300d\u72b6\u6001\u8f6c\u81f3\u300c\u7761\u7720\u300d\u72b6\u6001\u3002<\/p>\n<p>standby\u6a21\u5f0f\u9700\u8981\u4ee5\u4e0b\u6761\u4ef6\uff1a<\/p>\n<ul>\n<li><b>\u7535\u6c60\u4f9b\u7535<\/b><\/li>\n<li>\u6ca1\u6709\u5916\u63a5\u8bbe\u5907<\/li>\n<li>\u6ca1\u6709\u7f51\u7edc\u6d3b\u52a8<\/li>\n<li>\u6ca1\u6709\u5916\u63a5\u663e\u793a\u5668<\/li>\n<\/ul>\n<p>\u5728\u6ee1\u8db3\u6761\u4ef6\u7684\u524d\u63d0\u4e0b\uff0c\u00a0<code>standbydelayhigh\/low<\/code>\u00a0\u79d2\u540e\uff0c\u4f1a\u8fdb\u884c\u7761\u7720\u3002\u6bd4\u8f83\u4eba\u6027\u5316\u7684\u7684\u4e00\u70b9\u662f\uff0cstandby \u63d0\u4f9b\u4e86\u4e24\u4e2a\u5012\u8ba1\u65f6\uff0c\u901a\u8fc7\u4e00\u4e2a\u9608\u503c (<code>highstandbythreshold<\/code>) \u8fdb\u884c\u63a7\u5236\u3002<\/p>\n<p>?\u00a0<b>highstandbythreshold<\/b><\/p>\n<p>highstandbythreshold(\u7535\u6c60\u5269\u4f59\u7535\u91cf\u767e\u5206\u6bd4)\u5b83\u662f<code>standbydelay<\/code>\u6a21\u5f0f\u9009\u62e9\u9608\u503c\uff0c\u9ed8\u8ba4 50% \u7535\u91cf\u3002<\/p>\n<ul>\n<li>\u9ad8\u4e8e\u9608\u503c\uff0c\u91c7\u7528\u00a0<code>standbydelayhigh<\/code>\u00a0\u8ba1\u7b97\u65f6\u95f4\u3002<\/li>\n<li>\u4f4e\u4e8e\u9608\u503c\uff0c\u91c7\u7528\u00a0<code>standbydelaylow<\/code>\u00a0\u8ba1\u7b97\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<p>?\u00a0<b>autopoweroff<\/b><\/p>\n<blockquote><p>autopoweroff is enabled by default on supported platforms as an implementation of Lot 6 to the European Energy-related Products Directive. After sleeping for &lt;autopoweroffdelay&gt; seconds, the system will write a hibernation image and go into a lower power chipset sleep. Wakeups from this state will take longer than wakeups from regular sleep.<\/p><\/blockquote>\n<p>autppoweroff \u662f\u4e3a\u4e86\u6ee1\u8db3\u00a0<a href=\"https:\/\/ac-dc.powerint.cn\/sites\/default\/files\/greenroom\/docs\/EC_1275_2008PublishedRegulation.pdf\" target=\"_blank\" rel=\"noopener\">\u6b27\u76df\u80fd\u6e90\u6548\u7387 Lot 6 \u6761\u4f8b<\/a>\uff08\u5173\u4e8e\u5f85\u673a\u548c\u5173\u95ed\u6a21\u5f0f\u7684\u8981\u6c42\uff09\u800c\u8bbe\u8ba1\u7684\uff0c\u4f46\u5e76\u4e0d\u662f\u5168\u90e8\u8bbe\u5907\u90fd\u6709\u8fd9\u4e2a\u8fd9\u4e2a\u8bbe\u5b9a\uff0c\u9700\u8981\u901a\u8fc7\u00a0<code>pmset -g cap<\/code>\u00a0\u67e5\u770b\u662f\u5426\u80fd\u8c03\u8282\u6b64\u9879\u53c2\u6570\u3002<\/p>\n<p><code>autopoweroff<\/code>\u6a21\u5f0f\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\uff1a<\/p>\n<ul>\n<li><b>\u5916\u90e8\u7535\u6e90\u4f9b\u7535<\/b><\/li>\n<li>\u6ca1\u6709\u5916\u63a5\u8bbe\u5907<\/li>\n<li>\u6ca1\u6709\u7f51\u7edc\u6d3b\u52a8<\/li>\n<\/ul>\n<p>\u5728\u6ee1\u8db3\u6761\u4ef6\u7684\u524d\u63d0\u4e0b,\u00a0<code>autopoweroffdelay<\/code>\u79d2\u540e\uff0c\u7cfb\u7edf\u4f1a\u5199\u5165\u5185\u5b58\u955c\u50cf\u7136\u540e\u7761\u7720\u3002\u4e0e\u4e0a\u6587\u63d0\u5230\u7684\u00a0<code>standby<\/code>\u00a0\u4e0d\u540c\uff0c<code>autppoweroff<\/code>\u00a0\u66f4\u591a\u662f\u4e3a\u4e86\u8fde\u63a5\u5916\u90e8\u7535\u6e90\u5145\u7535\u65f6\u8bbe\u8ba1\u7684\u3002<\/p>\n<h3 class=\"ss-hIdChildren-4\">?\u00a0<span style=\"font-size: medium;\"><b>gpuswitch<\/b><\/span><\/h3>\n<p><code>gpuswitch<\/code>\u00a0\u8fd9\u4e2a\u53c2\u6570\u7528\u4e8e\u7ba1\u7406\u663e\u5361\u7684\u9009\u62e9\uff0c\u9002\u5408\u6709\u72ec\u7acb\u663e\u5361\/\u5916\u7f6e\u663e\u5361\u7684 Mac<\/p>\n<ul>\n<li><code>gpuswitch=0<\/code>\u00a0\u53ea\u4f7f\u7528\u96c6\u6210\u663e\u5361<\/li>\n<li><code>gpuswitch=1<\/code>\u00a0\u53ea\u4f7f\u7528\u72ec\u7acb\u663e\u5361<\/li>\n<li><code>gpuswitch=2<\/code>\u00a0\u81ea\u52a8\u5207\u6362\u663e\u5361<\/li>\n<\/ul>\n<p>\u8c03\u8282\u8fd9\u4e2a\u53c2\u6570\u53ef\u4ee5\u907f\u514d\u5728\u7535\u6c60\u4f9b\u7535\u65f6\u4f7f\u7528\u8017\u7535\u91cf\u9ad8\u7684\u72ec\u7acb\u663e\u5361\uff0c\u4ee5\u8282\u7701\u7535\u91cf\u3002<\/p>\n<p><b>\u5176\u4ed6\u5e38\u7528\u53c2\u6570<\/b><\/p>\n<ul>\n<li><code>lidwake<\/code>\uff1a\u5f00\u76d6\u65f6\u662f\u5426\u5524\u9192<\/li>\n<li><code>tcpkeepalive<\/code>\uff1a\u5408\u76d6\u65f6\u662f\u5426\u4fdd\u5b58\u7f51\u7edc\u8fde\u63a5<\/li>\n<li><code>displaysleep<\/code>\uff1a\u5c4f\u5e55\u4f11\u7720\u65f6\u95f4<\/li>\n<li><code>disksleep<\/code>\uff1a \u786c\u76d8\u4f11\u7720\u65f6\u95f4<\/li>\n<li><code>acwake<\/code>: \u88ab\u540c\u4e00 iCloud ID \u4e0b\u7684\u8bbe\u5907\u5524\u9192<\/li>\n<\/ul>\n<p>\u66f4\u591a\u53c2\u6570\u5728\u7ec8\u7aef\u8fd0\u884c\u00a0<code>$ man pmset<\/code>, \u67e5\u9605\u00a0<code>pmset<\/code>\u00a0\u7684\u8bf4\u660e<\/p>\n<h2 class=\"ss-hId-4\">? \u4e2a\u4eba\u8bbe\u7f6e\u65b9\u6848<\/h2>\n<p>\u6211\u4e2a\u4eba\u6240\u5e0c\u671b\u7684\u7761\u7720\u8ba1\u5212\u662f\uff1a\u5916\u63a5\u4f9b\u7535\u6761\u4ef6\u4e0b\u54cd\u5e94\u5c3d\u53ef\u80fd\u5feb\uff0c\u7535\u6c60\u4f9b\u7535\u6761\u4ef6\u4e0b\u8017\u7535\u5c11\u3002<\/p>\n<h3 class=\"ss-hIdChildren-5\">\u26a1\ufe0f \u5916\u90e8\u4f9b\u7535\u4e0b\u7684 pmset \u8bbe\u7f6e<\/h3>\n<figure class=\"ss-img-wrapper\" tabindex=\"0\" contenteditable=\"false\" draggable=\"false\"><img decoding=\"async\" class=\"lazyLoadEnd\" src=\"https:\/\/cdn.sspai.com\/2020\/07\/11\/d1bddc8581e915ceed4f71c21600dc95.png?imageView2\/2\/w\/1120\/q\/90\/interlace\/1\/ignore-error\/1\" alt=\"\" data-original=\"https:\/\/cdn.sspai.com\/2020\/07\/11\/d1bddc8581e915ceed4f71c21600dc95.png\" data-index=\"1\" \/><figcaption class=\"ss-image-caption\">\u5916\u90e8\u4f9b\u7535\u65f6\u7684\u8bbe\u7f6e<\/figcaption><\/figure>\n<p>\u5728\u8fdb\u884c\u5916\u90e8\u4f9b\u7535\u7684\u65f6\u5019\uff0c\u6211\u5e0c\u671b MacBook \u662f\u5904\u4e8e\u4e00\u4e2a<b>\u00a0\u300c\u65f6\u523b\u51c6\u5907\u7740\u300d<\/b>\u00a0\u7684\u72b6\u6001\uff08\u53c2\u8003 iMac \uff09\uff0c\u56e0\u6b64\u6211\u5e0c\u671b\u6211\u7684 Mac\u80fd\u6e05\u9192\u66f4\u4e45\uff0c\u5e76\u4e14\u6c38\u4e0d \u300c\u7761\u7720\u300d\u3002\u56e0\u6b64\u6211\u4f1a\u4f5c\u51fa\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<p><b>\u6c38\u4e0d\u7761\u7720\uff1a<\/b><\/p>\n<ul>\n<li><code>hibernatemode<\/code>\u00a0\u8bbe\u7f6e\u6210\u00a0<code>0<\/code>\uff0c\u8ba9\u5916\u90e8\u7535\u6e90\u6301\u7eed\u7ed9\u5185\u5b58\u4f9b\u7535\u3002<\/li>\n<li>\u5173\u95ed\u00a0<code>standyby<\/code>\u00a0\u548c\u00a0<code>autopoweroff<\/code>\u00a0\u6a21\u5f0f\uff0c\u963b\u6b62 MacBook \u7761\u7720\u3002<\/li>\n<\/ul>\n<p><b>\u8be6\u7ec6\u8bbe\u7f6e\uff1a<\/b><\/p>\n<pre><code><\/code><\/pre>\n<pre>\/\/ 120 \u5206\u949f\u540e\u8fdb\u5165\u4f11\u7720\uff0c\u5ef6\u957f\u6e05\u9192\u65f6\u95f4\r\nsudo pmset -c sleep 120\r\n\/\/ \u663e\u793a\u5668\u4f11\u7720\u65f6\u95f4\uff1a30 \u5206\u949f\r\nsudo pmset -c displaysleep 30\r\n\/\/ \u786c\u76d8\u4f11\u7720\u65f6\u95f4\uff1a60 \u5206\u949f\r\nsudo pmset -c disksleep 60\r\n\/\/ \u5185\u5b58\u4f9b\u7535\uff0c\u5185\u5b58\u955c\u50cf\u4e0d\u5199\u5165\u786c\u76d8\r\nsudo pmset -c hibernatemode 0\r\n\/\/ \u5173\u95ed standby \u6a21\u5f0f\r\nsudo pmset -c standby 0\r\n\/\/ \u5173\u95ed autopoweroff\r\nsudo pmset -c autopoweroff 0\r\n\/\/ \u4f11\u7720\u65f6\u6301\u7eed\u8054\u7f51\r\nsudo pmset -c tcpkeepalive 1<\/pre>\n<pre><code><\/code><\/pre>\n<h3 class=\"ss-hIdChildren-6\">? \u7535\u6c60\u4f9b\u7535\u4e0b\u7684 pmset \u8bbe\u7f6e<\/h3>\n<figure class=\"ss-img-wrapper\" tabindex=\"0\" contenteditable=\"false\" draggable=\"false\"><img decoding=\"async\" class=\"lazyLoadEnd\" src=\"https:\/\/cdn.sspai.com\/2020\/07\/11\/eccbaecb64b1320e7aa1f113a15ef9f5.png?imageView2\/2\/w\/1120\/q\/90\/interlace\/1\/ignore-error\/1\" alt=\"\" data-original=\"https:\/\/cdn.sspai.com\/2020\/07\/11\/eccbaecb64b1320e7aa1f113a15ef9f5.png\" data-index=\"2\" \/><figcaption class=\"ss-image-caption\">\u7535\u6c60\u4f9b\u7535\u65f6\u7684\u8bbe\u7f6e<\/figcaption><\/figure>\n<p>\u5728\u901a\u8fc7\u7535\u6c60\u4f9b\u7535\u7684\u65f6\u5019\uff0c\u6211\u5e0c\u671b Mac \u80fd\u8017\u7535\u5c11\u4e00\u4e9b\uff0c\u540c\u65f6\u300c\u7761\u7720\u300d\u540e\u5524\u9192\u901f\u5ea6\u4e0d\u592a\u6162\u3002\u56e0\u6b64\u6211\u4f1a\u4f5c\u51fa\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<ul>\n<li><code>hibernatemode<\/code>\u00a0\u4e3a\u00a0<code>3<\/code>\uff0c\u5c06\u955c\u50cf\u6570\u636e\u65e2\u5199\u5165\u5185\u5b58\u53c8\u5199\u5165\u786c\u76d8\uff0c\u540c\u65f6\u5bf9\u5185\u5b58\u53ea\u4f9b\u7535\u4e00\u6bb5\u65f6\u95f4\u3002<\/li>\n<li><code>standby<\/code>\u00a0\u7684\u7535\u91cf\u9608\u503c\u8bbe\u7f6e\u6210\u00a0<code>75%<\/code>\uff0c\u5f53\u7535\u91cf\u4f4e\u4e8e 75% stanby\u7684\u8ba1\u65f6\u5668\u5c31\u4f7f\u7528\u00a0<code>standbydelaylow<\/code>\u00a0\u4f5c\u4e3a\u4f11\u7720\u5012\u8ba1\u65f6\u3002<\/li>\n<li><code>tcpkeepalive<\/code>\u00a0\u8bbe\u7f6e\u6210\u00a0<code>0<\/code>, \u4f11\u7720\u65f6\u7535\u8111\u5c06\u4f1a\u65ad\u7f51\uff0c\u4ee5\u8282\u7701\u7535\u91cf\u3002\u4f46\u6b64\u65f6\u65e0\u6cd5\u8fdb\u884c\u4e0b\u8f7d\u5de5\u4f5c\uff0c<b>FindMy \u4e5f\u65e0\u6cd5\u5b9a\u4f4d\u3002<\/b><\/li>\n<li><code>proximitywake<\/code>\u00a0\u8bbe\u7f6e\u6210 0, \u5173\u95ed\u88ab\u540c\u4e00\u7f51\u7edc\u4e0b\u7684\u540c iCloud \u8bbe\u5907\u5524\u9192<\/li>\n<\/ul>\n<p><b>\u8be6\u7ec6\u8bbe\u7f6e\uff1a<\/b><\/p>\n<pre><code><\/code><\/pre>\n<pre>\/\/ 20 \u5206\u949f\u540e\u8fdb\u5165\u4f11\u7720\r\nsudo pmset -b sleep 20\r\n\/\/ \u5411\u786c\u76d8\u5199\u5165\u955c\u50cf\uff0c\u540c\u65f6\u5185\u5b58\u4f9b\u7535\r\nsudo pmset -b hibernatemode 3\r\n\/\/ \u663e\u793a\u5668\u4f11\u7720\u65f6\u95f4\uff1a15 \u5206\u949f\r\nsudo pmset -b displaysleep 15\r\n\/\/ \u786c\u76d8\u4f11\u7720\u65f6\u95f4\uff1a30 \u5206\u949f\r\nsudo pmset -b disksleep 30\r\n\/\/ \u4f11\u7720\u65f6\u65ad\u7f51\r\nsudo pmset -b tcpkeepalive 0\r\n\/\/ \u9ad8\u7535\u91cf\u4e0b standby: 4\u5c0f\u65f6\r\nsudo pmset -b standbydelayhigh 14400\r\n\/\/ \u4f4e\u7535\u91cf\u4e0b standby: 2\u5c0f\u65f6\r\nsudo pmset -b standbydelaylow 7200\r\n\/\/ standby \u7535\u91cf\u9608\u503c\uff1a75%\r\nsudo pmset -b highstandbythreshold 75\r\n\/\/ \u5f00\u76d6\u5524\u9192\r\nsudo pmset -b lidwake 1\r\n\/\/ \u5173\u95ed\u88ab\u540c\u4e00 iCloud \u4e0b\u7684\u8bbe\u5907\u5524\u9192\r\nsudo pmset -b acwake 0<\/pre>\n<pre><code><\/code><\/pre>\n<p>? \u53c2\u8003\u8d44\u6599:<\/p>\n<ul>\n<li>StackExchange:\u00a0<a href=\"https:\/\/apple.stackexchange.com\/questions\/113954\/difference-between-autopoweroff-and-standby-in-pmset\" target=\"_blank\" rel=\"noopener\">Difference between autopoweroff and standby in pmset<\/a><\/li>\n<li>tutsplus:\u00a0<a href=\"https:\/\/computers.tutsplus.com\/tutorials\/how-to-hibernate-a-mac--cms-23235\" target=\"_blank\" rel=\"noopener\">How to Hibernate a Mac<\/a><\/li>\n<li>WikiPedia:\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pmset\" target=\"_blank\" rel=\"noopener\">pmset<\/a><\/li>\n<\/ul>\n<p>P.S. \u300cHibernate\u300d \u82f1\u6587\u76f4\u8bd1\u4e3a\u300c\u7761\u5f97\u6df1\u7684\u7761\u7720\uff0c\u5982\u51ac\u7720\u300d\uff0c\u672c\u6587\u53d6\u300c\u7761\u7720\u300d\u4e4b\u4e49\uff0c\u4ee5\u8868\u8fbe\u8bbe\u5907\u7684\u4f4e\u529f\u8017\u8fd0\u4f5c\u3002<\/p>\n<p>&gt; \u4e0b\u8f7d\u5c11\u6570\u6d3e\u00a0<a href=\"https:\/\/sspai.com\/page\/client\">\u5ba2\u6237\u7aef\u00a0<\/a>\u3001\u5173\u6ce8\u00a0<a href=\"https:\/\/sspai.com\/s\/J71e\">\u5c11\u6570\u6d3e\u516c\u4f17\u53f7\u00a0<\/a>\uff0c\u4e86\u89e3\u66f4\u5999\u7684\u6570\u5b57\u751f\u6d3b ?<\/p>\n<\/div>\n<\/div>\n<div data-v-e1f0100a=\"\"><\/div>\n<div class=\"article-side sideFixed\" data-v-7be936cf=\"\" data-v-e1f0100a=\"\">\n<div class=\"download-guide-container\" data-v-14f9065e=\"\" data-v-7be936cf=\"\">\n<div class=\"btn-wrapper\" data-v-14f9065e=\"\"><\/div>\n<\/div>\n<div class=\"item-wrapper\" data-v-7be936cf=\"\"><button class=\"btn btn-charge\" data-v-7be936cf=\"\"><i class=\"iconfont\" data-v-7be936cf=\"\"><\/i><\/button><span class=\"count\" data-v-7be936cf=\"\">170<\/span><\/div>\n<div class=\"item-wrapper\" data-v-7be936cf=\"\"><button class=\"btn-mini btn-comment\" data-v-7be936cf=\"\"><i class=\"iconfont iconfont-comment\" data-v-7be936cf=\"\"><\/i><\/button><span class=\"count\" data-v-7be936cf=\"\">24<\/span><\/div>\n<div class=\"item-wrapper\" data-v-7be936cf=\"\"><\/div>\n<div class=\"item-wrapper\" data-v-7be936cf=\"\"><\/div>\n<\/div>\n<div class=\"right-side-directory rightFixed\" data-v-284f6578=\"\" data-v-e1f0100a=\"\">\n<div class=\"directory-container\" data-v-284f6578=\"\">\n<div class=\"item\" data-v-284f6578=\"\">\n<div class=\"circle\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">Mac \u662f\u600e\u4e48\u7761\u89c9\u7684\uff1f<\/div>\n<\/div>\n<\/div>\n<div class=\"directory-container\" data-v-284f6578=\"\">\n<div class=\"item\" data-v-284f6578=\"\">\n<div class=\"circle\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">macOS \u7cfb\u7edf\u7761\u7720\u6d41\u7a0b<\/div>\n<\/div>\n<\/div>\n<div class=\"directory-container\" data-v-284f6578=\"\">\n<div class=\"item\" data-v-284f6578=\"\">\n<div class=\"circle\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">pmset \u7528\u6cd5<\/div>\n<\/div>\n<div class=\"subdirectory-container\" data-v-284f6578=\"\">\n<div class=\"item subDirectory\" data-v-284f6578=\"\">\n<div class=\"circle h3\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">\u5e38\u7528\u9009\u9879<\/div>\n<\/div>\n<div class=\"item subDirectory\" data-v-284f6578=\"\">\n<div class=\"circle h3\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">\u5e38\u7528\u53c2\u6570<\/div>\n<\/div>\n<div class=\"item subDirectory\" data-v-284f6578=\"\">\n<div class=\"circle h3\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">? gpuswitch<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"directory-container\" data-v-284f6578=\"\">\n<div class=\"item\" data-v-284f6578=\"\">\n<div class=\"circle show\" data-v-284f6578=\"\"><\/div>\n<div class=\"title show showMain\" data-v-284f6578=\"\">? \u4e2a\u4eba\u8bbe\u7f6e\u65b9\u6848<\/div>\n<\/div>\n<div class=\"subdirectory-container isBlock\" data-v-284f6578=\"\">\n<div class=\"item subDirectory\" data-v-284f6578=\"\">\n<div class=\"circle h3\" data-v-284f6578=\"\"><\/div>\n<div class=\"title\" data-v-284f6578=\"\">\u26a1\ufe0f \u5916\u90e8\u4f9b\u7535\u4e0b\u7684 pmset \u8bbe\u7f6e<\/div>\n<\/div>\n<div class=\"item subDirectory\" data-v-284f6578=\"\">\n<div class=\"circle h3 show\" data-v-284f6578=\"\"><\/div>\n<div class=\"title show showItem\" data-v-284f6578=\"\">? \u7535\u6c60\u4f9b\u7535\u4e0b\u7684 pmset \u8bbe\u7f6e<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"article-copyrights\" data-v-fd30d0be=\"\" data-v-76c89034=\"\">\n<div class=\"followUpAdmin\" data-v-fd30d0be=\"\"><span class=\"nickname\" data-v-fd30d0be=\"\">\u672c\u6587\u8d23\u7f16\uff1a@<a href=\"https:\/\/sspai.com\/u\/LuZhNan\" target=\"_blank\" rel=\"noopener\" data-v-fd30d0be=\"\">\u8def\u4e2d\u5357<\/a><\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u5730\u5740 Matrix \u7cbe\u9009 Matri<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[123],"class_list":["post-5200","post","type-post","status-publish","format-standard","hentry","tag-07-mac"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=5200"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/5200\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=5200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=5200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=5200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}