/[gentoo]/xml/htdocs/doc/en/power-management-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/power-management-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.23 Revision 1.24
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.23 2006/12/17 03:42:50 nightmorph Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.24 2007/02/20 17:44:15 nightmorph Exp $ -->
4<guide link="/doc/en/power-management-guide.xml"> 4<guide link="/doc/en/power-management-guide.xml">
5<title>Power Management Guide</title> 5<title>Power Management Guide</title>
6 6
7<author title="Author"> 7<author title="Author">
8 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail> 8 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail>
18 18
19<!-- The content of this document is licensed under the CC-BY-SA license --> 19<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 20<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21<license/> 21<license/>
22 22
23<version>1.30</version> 23<version>1.31</version>
24<date>2006-12-16</date> 24<date>2007-02-20</date>
25 25
26<chapter> 26<chapter>
27<title>Introduction</title> 27<title>Introduction</title>
28<section> 28<section>
29<body> 29<body>
1292# <i>emerge hibernate-script</i> 1292# <i>emerge hibernate-script</i>
1293</pre> 1293</pre>
1294 1294
1295<p> 1295<p>
1296Some configuration has to be done in <path>/etc/hibernate</path> The default 1296Some configuration has to be done in <path>/etc/hibernate</path> The default
1297package introduces two configuration files <path>hibernate.conf</path> and 1297package introduces a few configuration files for each sleep state. Options that
1298<path>ram.conf</path>. 1298are common to all suspend methods are placed in <path>common.conf</path>; make
1299</p> 1299sure this file is properly set up for your system.
1300
1301<p> 1300</p>
1302To configure sleep, edit <path>ram.conf</path> in <path>/etc/hibernate</path>. 1301
1303<c>UseSysfsPowerState mem</c> is already setup correctly, but you have to go
1304through the rest of the configuration file and set it up for your system. The
1305comments and option names will guide you. If you use nfs or samba shares over
1306the network, make sure to shutdown the appropriate init scripts to avoid
1307timeouts.
1308</p> 1302<p>
1303To configure sleep, edit <path>sysfs-ram.conf</path> in
1304<path>/etc/hibernate</path>. <c>UseSysfsPowerState mem</c> is already setup
1305correctly, but you need to make further changes to this particular sleep state
1306(or any other sleep state) you should add them to
1307<path>/etc/hibernate/hibernate.conf</path>. The comments and option names will
1308guide you. If you use nfs or samba shares over the network, make sure to
1309shutdown the appropriate init scripts to avoid timeouts.
1310</p>
1311
1312<note>
1313For more information on setting up sleep states, read <c>man
1314hibernate.conf</c>.
1315</note>
1309 1316
1310<p> 1317<p>
1311Ready? Now is the last chance to backup any data you want to keep after 1318Ready? Now is the last chance to backup any data you want to keep after
1312executing the next command. Notice that you probably have to hit a special key 1319executing the next command. Notice that you probably have to hit a special key
1313like <c>Fn</c> to resume from sleep. 1320like <c>Fn</c> to resume from sleep.
1317# <i>hibernate-ram</i> 1324# <i>hibernate-ram</i>
1318</pre> 1325</pre>
1319 1326
1320<p> 1327<p>
1321If you're still reading, it seems to work. You can also setup standby (S1) in a 1328If you're still reading, it seems to work. You can also setup standby (S1) in a
1322similar way by copying <path>ram.conf</path> to <path>standby.conf</path> and 1329similar way by editing <path>sysfs-ram.conf</path> and changing
1323creating a symlink <path>/usr/sbin/hibernate-standby</path> pointing to 1330"UseSysfsPowerState mem" to "UseSysfsPowerState standby". S3 and S4 are the more
1324<path>/usr/sbin/hibernate</path>. S3 and S4 are the more interesting sleep
1325states due to greater energy savings however. 1331interesting sleep states due to greater energy savings however.
1326</p> 1332</p>
1327 1333
1328</body> 1334</body>
1329</section> 1335</section>
1330<section> 1336<section>
1395# <i>rc-update add hibernate-cleanup boot</i> 1401# <i>rc-update add hibernate-cleanup boot</i>
1396</pre> 1402</pre>
1397 1403
1398<p> 1404<p>
1399To activate hibernate with swsusp, use the hibernate script and set 1405To activate hibernate with swsusp, use the hibernate script and set
1400<c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/hibernate.conf</path>. 1406<c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/sysfs-disk</path>.
1401</p> 1407</p>
1402 1408
1403<warn> 1409<warn>
1404Backup your data before doing this. Run <c>sync</c> before executing one of the 1410Backup your data before doing this. Run <c>sync</c> before executing one of the
1405commands to have cached data written to disk. First try it outside of X, then 1411commands to have cached data written to disk. First try it outside of X, then
1407</warn> 1413</warn>
1408 1414
1409<p> 1415<p>
1410If you experience kernel panics due to uhci or similar, try to compile USB 1416If you experience kernel panics due to uhci or similar, try to compile USB
1411support as module and unload the modules before sending your laptop to sleep 1417support as module and unload the modules before sending your laptop to sleep
1412mode. There are configuration options for this in <path>hibernate.conf</path> 1418mode. There are configuration options for this in <path>common.conf</path>
1413</p> 1419</p>
1414 1420
1415<pre caption="Hibernating with swsusp"> 1421<pre caption="Hibernating with swsusp">
1416# <i>nano -w /etc/hibernate.conf</i> 1422# <i>nano -w /etc/hibernate/common.conf</i>
1417<comment>(Make sure you have a backup of your data)</comment> 1423<comment>(Make sure you have a backup of your data)</comment>
1418# <i>hibernate</i> 1424# <i>hibernate</i>
1419</pre> 1425</pre>
1420 1426
1421<p> 1427<p>
1436<pre caption="Invalidating suspend2 images during the boot process"> 1442<pre caption="Invalidating suspend2 images during the boot process">
1437# <i>rc-update add hibernate-cleanup boot</i> 1443# <i>rc-update add hibernate-cleanup boot</i>
1438</pre> 1444</pre>
1439 1445
1440<p> 1446<p>
1441Now edit <path>/etc/hibernate/hibernate.conf</path>, enable the <c>suspend2</c> 1447Now edit <path>/etc/hibernate/suspend2.conf</path>, enable the <c>suspend2</c>
1442section and comment everything in the <c>sysfs_power_state</c> and 1448options you need. Do not enable the <c>fbsplash</c> options in
1443<c>acpi_sleep</c> sections. Do not enable the <c>fbsplash</c> part in global 1449<c>common.conf</c> just yet.
1444options yet.
1445</p> 1450</p>
1446 1451
1447<pre caption="Hibernating with suspend2"> 1452<pre caption="Hibernating with suspend2">
1448# <i>nano -w /etc/hibernate.conf</i> 1453# <i>nano -w /etc/hibernate/suspend2.conf</i>
1449<comment>(Make sure you have a backup of your data)</comment> 1454<comment>(Make sure you have a backup of your data)</comment>
1450# <i>hibernate</i> 1455# <i>hibernate</i>
1451</pre> 1456</pre>
1452 1457
1453<p> 1458<p>
1456package is needed. Additionally, you've got to enable the <c>fbsplash</c> USE 1461package is needed. Additionally, you've got to enable the <c>fbsplash</c> USE
1457flag. 1462flag.
1458</p> 1463</p>
1459 1464
1460<pre caption="Installing suspend2-userui"> 1465<pre caption="Installing suspend2-userui">
1461# <i>mkdir -p /etc/portage</i>
1462# <i>echo "sys-apps/suspend2-userui fbsplash" >> /etc/portage/package.use</i> 1466# <i>echo "sys-apps/suspend2-userui fbsplash" >> /etc/portage/package.use</i>
1467<comment>(It may be marked ~arch, so first it must be keyworded)</comment>
1468# <i>echo "sys-apps/suspend2-userui" >> /etc/portage/package.keywords</i>
1463# <i>emerge suspend2-userui</i> 1469# <i>emerge suspend2-userui</i>
1464</pre> 1470</pre>
1465 1471
1466<p> 1472<p>
1467The ebuild tells you to make a symlink to the theme you want to use. For 1473The ebuild tells you to make a symlink to the theme you want to use. For
1489# <i>cp /usr/sbin/suspend2ui_fbsplash sbin/</i> 1495# <i>cp /usr/sbin/suspend2ui_fbsplash sbin/</i>
1490# <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i> 1496# <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i>
1491</pre> 1497</pre>
1492 1498
1493<p> 1499<p>
1494Afterwards adjust <path>grub.conf</path> respectively <path>lilo.conf</path> so 1500Afterwards adjust <path>grub.conf</path> (or <path>lilo.conf</path>) so that
1495that your suspend2 kernel uses 1501your suspend2 kernel uses
1496<path>/boot/fbsplash-suspend2-emergence-1024x768</path> as initrd image. You 1502<path>/boot/fbsplash-suspend2-emergence-1024x768</path> as initrd image. You can
1497can now test a dry run to see if everything is setup correctly. 1503now test a dry run to see if everything is setup correctly.
1498</p> 1504</p>
1499 1505
1500<pre caption="Test run for fbsplash hibernation"> 1506<pre caption="Test run for fbsplash hibernation">
1501# <i>suspend2ui_fbsplash -t</i> 1507# <i>suspend2ui_fbsplash -t</i>
1502</pre> 1508</pre>
1503 1509
1504<p> 1510<p>
1505Afterwards open <path>/etc/hibernate/hibernate.conf</path> again and activate 1511Afterwards open <path>/etc/hibernate/common.conf</path> and activate the
1506the fbsplash options. Execute <c>hibernate</c> and enjoy. 1512fbsplash options. Execute <c>hibernate</c> and enjoy.
1507</p> 1513</p>
1508 1514
1509</body> 1515</body>
1510</section> 1516</section>
1511</chapter> 1517</chapter>

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20