5
5
<link type="guide" xref="power"/>
6
6
<link type="seealso" xref="power-suspendfail"/>
7
8
<revision pkgversion="3.4.0" date="2012-02-20" status="review"/>
9
<revision pkgversion="3.10" date="2013-11-08" status="review"/>
9
<desc>Laptops go to sleep when you close the lid, in order to save power.</desc>
10
11
<credit type="author">
11
12
<name>ਗਨੋਮ ਦਸਤਾਵੇਜ਼ ਪ੍ਰੋਜੈਕਟ</name>
12
<email>gnome-doc-list@gnome.org</email>
13
<email its:translate="no">gnome-doc-list@gnome.org</email>
14
<credit type="editor">
15
<credit type="author editor">
15
16
<name>Ekaterina Gerasimova</name>
16
<email>kittykat3756@gmail.com</email>
17
<email its:translate="no">kittykat3756@gmail.com</email>
19
20
<include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>
22
<desc>Laptops go to sleep when you close the lid, in order to save
22
<title>Why does my computer turn off when I close the lid?</title>
24
<p>When you close the lid of your laptop, your computer will <link xref="power-suspend"><em>suspend</em></link> in order to save power. This means
25
that the computer is not actually turned off - it has just gone to sleep. You
26
can resume it by opening the lid. If it does not resume, try clicking the mouse
27
or pressing a key. If that still does not work, press the power button.</p>
29
<p>Some computers are unable to suspend properly, normally because their
30
hardware is not completely supported by the operating system (for example, the
31
Linux drivers are incomplete). In this case, you may find that you are unable
32
to resume your computer after you have closed the lid. You can try to <link xref="power-suspendfail">fix the problem with suspend</link>, or you can
33
prevent the computer from trying to suspend when you close the lid.</p>
26
<title>Why does my computer turn off when I close the lid?</title>
28
<p>When you close the lid of your laptop, your computer will
29
<link xref="power-suspend"><em>suspend</em></link> in order to save power.
30
This means that the computer is not actually turned off - it has just gone to
31
sleep. You can resume it by opening the lid. If it does not resume, try
32
clicking the mouse or pressing a key. If that still does not work, press the
35
<p>Some computers are unable to suspend properly, normally because their
36
hardware is not completely supported by the operating system (for example,
37
the Linux drivers are incomplete). In this case, you may find that you are
38
unable to resume your computer after you have closed the lid. You can try to
39
<link xref="power-suspendfail">fix the problem with suspend</link>, or you
40
can prevent the computer from trying to suspend when you close the lid.</p>
35
42
<section id="nosuspend">
36
<title>Stop the computer from suspending when the lid is closed</title>
37
<p>If you do not want the computer to suspend when you close the lid, you can
38
change the settings for that behavior. To set the computer to blank the
39
screen, rather than suspend, when the lid is closed:</p>
40
<note style="warning">
41
<p>Be very careful if you change this setting. Some laptops can overheat
42
if they are left running with the lid closed, especially if they are in
43
a confined place like a backpack.</p>
47
<p>Open the <app>Terminal</app> application from the <gui>Activities</gui> overview.</p>
50
<p>To change the setting used when running on battery power, type this command and press <key>Enter</key>:</p>
51
<screen its:translate="no">
52
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action blank
56
<p>To change the setting used when running on AC power, type this command and press <key>Enter</key>:</p>
57
<screen its:translate="no">
58
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
43
<title>Stop the computer from suspending when the lid is closed</title>
45
<note style="important">
46
<p>These instructions will only work if you are using <app>systemd</app>.
47
Contact your distribution for more information.</p>
50
<p>If you do not want the computer to suspend when you close the lid, you can
51
change the settings for that behavior. You will need to have an
52
<link xref="user-admin-change">administrator password</link> to change the
55
<note style="warning">
56
<p>Be very careful if you change this setting. Some laptops can overheat
57
if they are left running with the lid closed, especially if they are in
58
a confined place like a backpack.</p>
63
<p>Open the <app>Terminal</app> application from the
64
<gui>Activities</gui> overview.</p>
67
<p>Run the following command:</p>
68
<screen its:translate="no"><output style="prompt">$</output> <input>sudoedit /etc/systemd/logind.conf</input></screen>
71
<p>You will now see the contents of the file. Look for
72
<code>HandleLidSwitch=</code> in the file. The line may be quoted out
73
with a <code>#</code> at the start and may be followed by an argument. If
74
the line already exists, unquote it. Otherwise, add the line.</p>
77
HandleLidSwitch=<input>lock</input>
79
<p>You can use <input>lock</input> for the screen to lock,
80
<input>ignore</input> for nothing to happen, <input>poweroff</input> for
81
the computer to switch off or <input>suspend</input> to suspend. For more
82
information, see <link href="man:logind.conf">logind.conf help</link>.</p>
85
<p>Once you finish editing the file, save your changes and quit the
89
<p>Run the following command to make your change work:</p>
90
<screen its:translate="no"><output style="prompt">$</output> <input>sudo systemctl restart systemd-logind.service</input></screen>
91
<p>If you do not run that command, the change will only work after your
92
computer is restarted.</p>