<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="question" id="power-closelid" xml:lang="zh-CN">

  <info>
    <link type="guide" xref="power"/>
    <link type="seealso" xref="power-suspendfail"/>

    <revision pkgversion="3.4.0" date="2012-02-20" status="review"/>
    <revision pkgversion="3.10" date="2013-11-08" status="review"/>

    <credit type="author">
      <name>GNOME 文档项目</name>
      <email its:translate="no">gnome-doc-list@gnome.org</email>
    </credit>
    <credit type="author editor">
      <name>Ekaterina Gerasimova</name>
      <email its:translate="no">kittykat3756@gmail.com</email>
    </credit>

    <include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>

    <desc>在您合上笔记本盖时，将会进入睡眠以省电。</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>TeliuTe</mal:name>
      <mal:email>teliute@163.com</mal:email>
      <mal:years>2011, 2012</mal:years>
    </mal:credit>
  </info>

  <title>为什么我合上笔记本盖时它会关闭？</title>

  <p>当您合上笔记本盖，计算机将会<link xref="power-suspend"><em>挂起</em></link>以省电。也就是说计算机并没有真正关闭——它只是进入睡眠，您可以打开盖唤醒它。如果翻盖后不能唤醒，试着点几下鼠标，或者按一下键盘。如果还不能工作，那么就按电源按钮。</p>

  <p>一些计算机不能很好地挂起，这通常是因为硬件不完全支持操作系统(例如，Linux 驱动不完善)。在这种情况下，您可能会发现合上盖再打开时，不能唤醒电脑。您可以试着<link xref="power-suspendfail">修复挂起错误</link>，或者您可以阻止电脑在合上盖时挂起。</p>

<section id="nosuspend">
  <title>Stop the computer from suspending when the lid is closed</title>

  <note style="important">
    <p>These instructions will only work if you are using <app>systemd</app>.
    Contact your distribution for more information.</p>
  </note>

  <p>If you do not want the computer to suspend when you close the lid, you can
  change the settings for that behavior. You will need to have an
  <link xref="user-admin-change">administrator password</link> to change the
  setting.</p>

  <note style="warning">
    <p>Be very careful if you change this setting. Some laptops can overheat
    if they are left running with the lid closed, especially if they are in
    a confined place like a backpack.</p>
  </note>

  <steps>
    <item>
      <p>在<gui>活动</gui>概览中，打开<app>终端</app>程序。</p>
    </item>
    <item>
      <p>Run the following command:</p>
      <screen its:translate="no"><output style="prompt">$</output> <input>sudoedit /etc/systemd/logind.conf</input></screen>
    </item>
    <item>
      <p>You will now see the contents of the file. Look for
      <code>HandleLidSwitch=</code> in the file. The line may be quoted out
      with a <code>#</code> at the start and may be followed by an argument. If
      the line already exists, unquote it. Otherwise, add the line.</p>
      <code>
[Login]
HandleLidSwitch=<input>lock</input>
      </code>
      <p>You can use <input>lock</input> for the screen to lock,
      <input>ignore</input> for nothing to happen, <input>poweroff</input> for
      the computer to switch off or <input>suspend</input> to suspend. For more
      information, see <link href="man:logind.conf">logind.conf help</link>.</p>
    </item>
    <item>
      <p>Once you finish editing the file, save your changes and quit the
      editor.</p>
    </item>
    <item>
      <p>Run the following command to make your change work:</p>
      <screen its:translate="no"><output style="prompt">$</output> <input>sudo systemctl restart systemd-logind.service</input></screen>
      <p>If you do not run that command, the change will only work after your
      computer is restarted.</p>
    </item>
  </steps>

</section>

</page>
