Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 69734 | Differences between
and this patch

Collapse All | Expand All

(-)power-management-guide-1.17.xml (-102 / +307 lines)
Lines 5-11 Link Here
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="fragfred@gmx.de">Dennis Nienh&#252;ser</mail>
8
  <mail link="fragfred@gmx.de">Dennis Nienhüser</mail>
9
</author>
9
</author>
10
10
11
<abstract>
11
<abstract>
Lines 17-24 Link Here
17
<!-- See http://creativecommons.org/licenses/by-sa/2.0 -->
17
<!-- See http://creativecommons.org/licenses/by-sa/2.0 -->
18
<license/>
18
<license/>
19
19
20
<version>1.17</version>
20
<version>1.18</version>
21
<date>October 10, 2004</date>
21
<date>January 05, 2005</date>
22
22
23
<chapter>
23
<chapter>
24
<title>Introduction</title>
24
<title>Introduction</title>
Lines 164-178 Link Here
164
          Default CPUFreq governor (userspace)
164
          Default CPUFreq governor (userspace)
165
    &lt;*&gt;   'performance' governor
165
    &lt;*&gt;   'performance' governor
166
    &lt;*&gt;   'powersave' governor
166
    &lt;*&gt;   'powersave' governor
167
    &lt;*&gt;   'ondemand' cpufreq policy governor
167
    &lt;*&gt;   CPU frequency table helpers
168
    &lt;*&gt;   CPU frequency table helpers
168
    &lt;M&gt; ACPI Processor P-States driver
169
    &lt;M&gt; ACPI Processor P-States driver
169
    &lt;*&gt; <i>CPUFreq driver for your processor</i>
170
    &lt;*&gt; <i>CPUFreq driver for your processor</i>
170
</pre>
171
</pre>
171
172
172
<p>
173
<p>
173
Decide yourself whether you want to enable Software Suspend, Suspend-to-Disk
174
Decide yourself whether you want to enable Software Suspend, Suspend-to-Disk and
174
and Sleep States (see below). If you own an ASUS, Medion or Toshiba laptop,
175
Sleep States (see below). If you own an ASUS, Medion or Toshiba laptop, enable
175
enable the appropriate section.
176
the appropriate section. Recent kernel versions (2.6.9 and later) include an
177
<e>'ondemand' governor</e> for CPU Frequency Scaling, activate it as well when
178
using such a kernel.
179
</p>
180
181
<p>
182
The kernel has to know how to enable CPU frequency scaling on your processor. As
183
each type of CPU has a different interface, you've got to choose the right
184
driver for your processor. Be careful here - enabling <e>Intel Pentium 4 clock
185
modulation</e> on a Pentium M system will lead to strange results for example.
186
Consult the kernel documentation if you're unsure which one to take.
176
</p>
187
</p>
177
188
178
<p>
189
<p>
Lines 230-310 Link Here
230
241
231
<p>
242
<p>
232
Typical ACPI events are closing the lid, changing the power source or pressing
243
Typical ACPI events are closing the lid, changing the power source or pressing
233
the sleep button. Every acpi event recognized by the kernel is catched by acpid
244
the sleep button. An important event is changing the power source, which should
234
which calls <path>/etc/acpi/default.sh</path>. Here is a basic modification
245
cause a runlevel switch. Create the following files to switch between
235
supporting runlevel switching:
246
<e>default</e> and <e>battery</e> runlevel depending on the power source:
236
</p>
247
</p>
237
248
238
<pre caption="Event driven runlevel switching with acpid">
249
<pre caption="/etc/acpi/switch_runlevel.sh">
239
#!/bin/sh
250
#!/bin/bash
240
251
241
set $*
252
RUNLEVEL_AC="default"
253
RUNLEVEL_BATTERY="battery"
242
254
243
group=${1/\/*/}
255
function on_ac () {
244
action=${1/*\//}
256
    if which on_ac_power &amp;> /dev/null
257
    then
258
        on_ac_power
259
    else
260
        grep --quiet on-line /proc/acpi/ac_adapter/*/state
261
    fi
262
}
245
263
246
<comment># runlevel to use in AC mode</comment>
264
function SwitchRunlevel () {
247
RLVL_AC="default"
248
<comment># runlevel to use in battery mode</comment>
249
RLVL_BATTERY="battery"
250
265
251
<comment># file indicating the AC state. Verify the filename before using</comment>
266
    if [ ! -d "/etc/runlevels/${RUNLEVEL_AC}" ]
252
AC_STATE="/proc/acpi/ac_adapter/AC/state"
267
    then
253
<comment># this string means running on AC</comment>
268
        logger "${0}: Runlevel ${RUNLEVEL_AC} does not exist. Aborting."
254
AC_ON="on-line"
269
        exit 1
255
<comment># this string means running on batteries</comment>
270
    fi
256
AC_OFF="off-line"
271
272
273
    if [ ! -d "/etc/runlevels/${RUNLEVEL_BATTERY}" ]
274
    then
275
        logger "${0}: Runlevel ${RUNLEVEL_BATTERY} does not exist. Aborting."
276
        exit 1
277
    fi
257
278
258
function SwitchRunlevel() {
279
    if on_ac
259
  if [[ "$(grep ${AC_OFF} ${AC_STATE})" != "" &amp;&amp; "$(cat /var/lib/init.d/softlevel)" != "${RLVL_BATTERY}" ]]
280
    then if [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]]
260
  then
281
  then
261
    logger "Switching to ${RLVL_BATTERY} runlevel"
282
            logger "Switching to ${RUNLEVEL_AC} runlevel"
262
    /sbin/rc ${RLVL_BATTERY}
283
            /sbin/rc ${RUNLEVEL_AC}
263
  elif [[ "$(grep ${AC_ON} ${AC_STATE})" != "" &amp;&amp; "$(cat /var/lib/init.d/softlevel)" != "${RLVL_AC}" ]]
284
        fi
285
    elif [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]]
264
  then
286
  then
265
    logger "Switching to ${RLVL_AC} runlevel"
287
        logger "Switching to ${RUNLEVEL_BATTERY} runlevel"
266
    /sbin/rc ${RLVL_AC}
288
        /sbin/rc ${RUNLEVEL_BATTERY}
267
  fi
289
  fi
268
}
290
}
291
</pre>
292
293
<pre caption="/etc/acpi/events/pmg_ac_adapter">
294
event=ac_adapter.*
295
action=/etc/acpi/actions/pmg_ac_adapter.sh %e
296
</pre>
297
298
<pre caption="/etc/acpi/events/pmg_battery">
299
event=battery.*
300
action=/etc/acpi/actions/pmg_battery.sh %e
301
</pre>
302
303
<pre caption="/etc/acpi/actions/pmg_ac_adapter.sh">
304
#!/bin/bash
269
305
306
source /etc/acpi/switch_runlevel.sh
307
SwitchRunlevel
308
</pre>
309
310
<pre caption="/etc/acpi/actions/pmg_battery.sh">
311
#!/bin/bash
312
313
source /etc/acpi/switch_runlevel.sh
314
SwitchRunlevel
315
</pre>
316
317
<p>
318
Some of these files must be executable. Last not least restart acpid to have
319
it recognize the changes.
320
</p>
270
321
271
case "$group" in
322
<pre caption="Finishing runlevel switching with acpid">
272
  battery)
323
<i># chmod +x /etc/acpi/switch_runlevel.sh</i>
273
    case "$action" in
324
<i># chmod +x /etc/acpi/actions/pmg_*</i>
274
      battery) 
325
<i># /etc/init.d/acpid restart</i>
275
        SwitchRunlevel
276
        ;;
277
      *) 
278
        logger "ACPI group battery / action $action is not defined"
279
        ;;
280
    esac
281
    ;;
282
283
  ac_adapter)
284
    case "$action" in
285
      ac_adapter)
286
        SwitchRunlevel
287
        ;;
288
      *)
289
        logger "ACPI group ac_adapter / action $action is not defined"
290
        ;;
291
    esac
292
    ;;
293
  *)
294
    logger "ACPI group $group / action $action is not defined"
295
    ;;
296
esac
297
</pre>
326
</pre>
298
327
299
<p>
328
<p>
300
Give it a try: Plug AC in and out and watch syslog for the "Switching to AC
329
Give it a try: Plug AC in and out and watch syslog for the "Switching to AC
301
mode" or "Switching to battery mode" messages. 
330
mode" or "Switching to battery mode" messages. See the Troubleshooting
331
section if the script is not able to detect the power source correctly.
302
</p>
332
</p>
303
333
304
<p>
334
<p>
305
Due to the nature of the event mechanism, your laptop will boot into runlevel
335
Due to the nature of the event mechanism, your laptop will boot into runlevel
306
<e>default</e> regardless of the AC/battery state. You can add another entry
336
<e>default</e> regardless of the AC/battery state. You can add another entry
307
to the boot loader with <c>softlevel=boot</c>, but it's likely to forget
337
to the boot loader with <c>softlevel=battery</c>, but it's likely to forget
308
choosing it. A better way is faking an ACPI event in the end of the boot
338
choosing it. A better way is faking an ACPI event in the end of the boot
309
process and let the <path>/etc/acpi/default.sh</path> script decide whether a
339
process and let the <path>/etc/acpi/default.sh</path> script decide whether a
310
runlevel change is necessary. Open <path>/etc/conf.d/local.start</path> in your
340
runlevel change is necessary. Open <path>/etc/conf.d/local.start</path> in your
Lines 313-319 Link Here
313
343
314
<pre caption="Runlevel switch at boot time by editing local.start">
344
<pre caption="Runlevel switch at boot time by editing local.start">
315
<comment># Fake acpi event to switch runlevel if running on batteries</comment>
345
<comment># Fake acpi event to switch runlevel if running on batteries</comment>
316
/etc/acpi/default.sh "battery/battery"
346
/etc/acpi/actions/pmg_battery.sh "battery/battery"
317
</pre>
347
</pre>
318
348
319
<p>
349
<p>
Lines 328-333 Link Here
328
<chapter>
358
<chapter>
329
<title>CPU Power Management</title>
359
<title>CPU Power Management</title>
330
<section>
360
<section>
361
<title>Some technical terms</title>
362
<body>
363
364
<p>
365
CPU frequency scaling brings up some technical terms that might be unknown to
366
you. Here's a quick introduction.
367
</p>
368
369
<p>
370
First of all, the kernel has to be able to change the processor's frequency. The
371
<e>CPUfreq processor driver</e> knows the commands to do it on your CPU. Thus
372
it's important to choose the right one in your kernel. You should already have
373
done it above. Once the kernel knows how to change frequencies, it has to know
374
which frequency it should set. This is done according to the <e>policy</e> which
375
consists of <e>CPUfreq policy</e> and a <e>governor</e>. A CPUfreq policy are
376
just two numbers which define a range the frequency has to stay between -
377
minimal and maximal frequency. The governor now decides which of the available
378
frequencies in between minimal and maximal frequency to choose. For example, the
379
<e>powersave governor</e> always chooses the lowest frequency available, the
380
<e>performance governor</e> the highest one. The <e>userspace governor</e> makes
381
no decision but chooses whatever the user (or a program in userspace) wants -
382
which means it reads the frequency from
383
<path>/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed</path>.
384
</p>
385
386
<p>
387
This doesn't sound like dynamic frequency changes yet and in fact it isn't.
388
Dynamics however can be accomplished with various approaches. For example,
389
the <e>ondemand governor</e> makes its decisions depending on the current CPU
390
load. The same is done by various userland tools like <c>cpudyn</c>,
391
<c>speedfreq</c>, <c>powernowd</c> and many more. ACPI events can be used to
392
enable or disable dynamic frequency changes depending on power source.
393
</p>
394
395
</body>
396
</section>
397
<section>
331
<title>Setting the frequency manually</title>
398
<title>Setting the frequency manually</title>
332
<body>
399
<body>
333
400
Lines 394-432 Link Here
394
461
395
<p>
462
<p>
396
The above is quite nice, but not doable in daily life. Better let your system
463
The above is quite nice, but not doable in daily life. Better let your system
397
set the appropriate frequency automatically. A couple of user space programs
464
set the appropriate frequency automatically. There are many different approaches
398
like to do it for you. The following table gives a quick overview to help you
465
to do this. The following table gives a quick overview to help you decide on one
399
decide on one of them.
466
of them. It's roughly seperated in three categories <e>kernel</e> for approaches
467
that only need kernel support, <e>daemon</e> for programs that run in the
468
background and <e>graphical</e> for programs that provide a GUI for easy
469
configuration and changes.
400
</p>
470
</p>
401
471
402
<table>
472
<table>
403
<tr>
473
<tr>
404
  <th>Name</th>
474
  <th>Name</th>
405
  <th>Pro</th>
475
  <th>Category</th>
406
  <th>Con</th>
476
  <th>Switch decision</th>
477
  <th>Kernel governors</th>
478
  <th>Further governors</th>
479
  <th>Comments</th>
480
</tr>
481
<tr>
482
  <ti>'ondemand' governor</ti>
483
  <ti>Kernel</ti>
484
  <ti>CPU load</ti>
485
  <ti>N.A.</ti>
486
  <ti>N.A.</ti>
487
  <ti>
488
    Further tuning through files in
489
    <path>/sys/devices/system/cpu/cpu0/cpufreq/ondemand/</path>. Still requires
490
    userland tools (programs, scripts) if governor switching or similar is
491
    desired.
492
  </ti>
407
</tr>
493
</tr>
408
<tr>
494
<tr>
409
  <ti><uri link="http://mnm.uib.es/~gallir/cpudyn/">cpudyn</uri></ti>
495
  <ti><uri link="http://mnm.uib.es/~gallir/cpudyn/">cpudyn</uri></ti>
410
  <ti>Also supports disk standby</ti>
496
  <ti>Daemon</ti>
411
  <ti></ti>
497
  <ti>CPU load</ti>
498
  <ti>None</ti>
499
  <ti>Dynamic</ti>
500
  <ti>
501
    Also supports disk standby - notice however that <e>laptop mode</e> in most
502
    cases will do a better job.
503
  </ti>
412
</tr>
504
</tr>
413
<tr>
505
<tr>
414
  <ti><uri link="http://sourceforge.net/projects/cpufreqd/">cpufreq</uri></ti>
506
  <ti><uri link="http://sourceforge.net/projects/cpufreqd/">cpufreqd</uri></ti>
415
  <ti>Sophisticated setup possible</ti>
507
  <ti>Daemon</ti>
416
  <ti>Complicated setup</ti>
508
  <ti>Battery state, CPU load, running programs</ti>
509
  <ti>All available</ti>
510
  <ti>None</ti>
511
  <ti>
512
    Sophisticated (but also complicated) setup. An optimal configuration
513
    requires detailed knowledge of your system.
514
  </ti>
515
</tr>
516
<tr>
517
  <ti>
518
    <uri link="http://www.deater.net/john/powernowd.html">powernowd</uri>
519
  </ti>
520
  <ti>Daemon</ti>
521
  <ti>CPU load</ti>
522
  <ti>None</ti>
523
  <ti>Passive, sine, aggressive</ti>
524
  <ti>
525
    Supports SMP.
526
  </ti>
417
</tr>
527
</tr>
418
<tr>
528
<tr>
419
  <ti><uri link="http://www.goop.org/~jeremy/speedfreq/">speedfreq</uri></ti>
529
  <ti><uri link="http://www.goop.org/~jeremy/speedfreq/">speedfreq</uri></ti>
530
  <ti>Daemon</ti>
531
  <ti>CPU load</ti>
532
  <ti>None</ti>
533
  <ti>Dynamic, powersave, performance, fixed speed</ti>
420
  <ti>
534
  <ti>
421
    Small yet powerful<br />
535
    Small yet powerful with an useful client/server interface. Requires a 2.6
422
    Useful client/server interface
536
    kernel.
423
  </ti>
537
  </ti>
424
  <ti>Kernel 2.6 series only</ti>
425
</tr>
538
</tr>
426
<tr>
539
<tr>
427
  <ti><uri link="http://www.deater.net/john/powernowd.html">powernowd</uri></ti>
540
  <ti><uri link="http://cpuspeedy.sourceforge.net/">gtk-cpuspeedy</uri></ti>
428
  <ti>Supports SMP</ti>
541
  <ti>Graphical</ti>
429
  <ti></ti>
542
  <ti>None</ti>
543
  <ti>None</ti>
544
  <ti>None</ti>
545
  <ti>
546
    Gnome application, a graphical tool to set CPU frequency manually. It does
547
    not offer any automation and is mainly listed for the sake of completeness.
548
  </ti>
549
</tr>
550
<tr>
551
  <ti>klaptopdaemon</ti>
552
  <ti>Graphical</ti>
553
  <ti>Battery state</ti>
554
  <ti>All available</ti>
555
  <ti>None</ti>
556
  <ti>
557
    KDE only, 'ondemand' governor required for dynamic frequency scaling.
558
  </ti>
430
</tr>
559
</tr>
431
</table>
560
</table>
432
561
Lines 458-470 Link Here
458
</pre>
587
</pre>
459
588
460
<p>
589
<p>
461
Setting up cpufreq is a little bit more complicated.
590
Setting up cpufreqd is a little bit more complicated.
462
</p>
591
</p>
463
592
464
<warn>
593
<warn>
465
Do not run more than one of the above programs at the same time. It may cause
594
Do not run more than one of the above programs at the same time. It may cause
466
confusion like switching between two frequencies all the time. If you just
595
confusion like switching between two frequencies all the time. If you just
467
installed speedfreq, skip cpufreq now.
596
installed speedfreq, skip cpufreqd now.
468
</warn>
597
</warn>
469
598
470
<pre caption="Installing cpufreqd">
599
<pre caption="Installing cpufreqd">
Lines 548-556 Link Here
548
<c>speedfreq</c>.
677
<c>speedfreq</c>.
549
</p>
678
</p>
550
679
680
</body>
681
</section>
682
683
<section>
684
<title>Verifying the result</title>
685
686
<body>
687
551
<p>
688
<p>
552
The last thing to check is that your new policies do a good job. An easy way to
689
The last thing to check is that your new policies do a good job. An easy way to
553
do so is monitoring the CPU speed while working with your laptop:
690
do so is monitoring CPU speed while working with your laptop:
554
</p>
691
</p>
555
692
556
<pre caption="Monitoring CPU speed">
693
<pre caption="Monitoring CPU speed">
Lines 692-697 Link Here
692
</p>
829
</p>
693
830
694
<pre caption="Automate disk standby settings">
831
<pre caption="Automate disk standby settings">
832
# <i>chmod +x /etc/init.d/pm.hda</i>
695
# <i>/sbin/depscan.sh</i>
833
# <i>/sbin/depscan.sh</i>
696
# <i>rc-update add pm.hda battery</i>
834
# <i>rc-update add pm.hda battery</i>
697
</pre>
835
</pre>
Lines 715-739 Link Here
715
</p>
853
</p>
716
854
717
<p>
855
<p>
718
<!-- FIXME: bug #45593 -->
856
<!-- TODO: bug #45593 -->
719
To start and stop laptop-mode, create a script /etc/init.d/laptop-mode. You can
857
Besides kernel support you also need a script that controls starting and
720
take the one included in
858
stopping of laptop-mode. You kernel documentation in
721
<path>/usr/src/linux/Documentation/laptop-mode.txt</path>. Onces it's ready,
859
<path>/usr/src/linux/Documentation/laptop-mode.txt</path> contains one as well
722
make sure it gets called.
860
as the package <c>laptop-mode-tools</c>. None of them is easy to install
861
though.
723
</p>
862
</p>
724
863
725
<pre caption="Automatic start of laptop-mode">
864
<p>
726
# <i>rc-update add laptop-mode battery</i>
865
Ebuilds for laptop-mode-tools are not in Portage, because Gentoo developers
727
</pre>
866
don't think they are production ready yet. Take that into consideration
867
before using the ebuilds which can be found in <uri
868
link="http://bugs.gentoo.org/show_bug.cgi?id=45593">Bugzilla</uri>. The Gentoo
869
Handbook tells you how to use external ebuilds if you don't know where to put
870
them. Once your PORTDIR_OVERLAY contains the ebuilds, install the
871
script:
872
</p>
728
873
729
<warn>
874
<warn>
730
Once again: Be careful with sleep/spin down settings of your hard drive.
875
This package is not seen as production ready and installing custom ebuilds from
731
Setting it to small values might wear out your drive and lose warranty. Be sure
876
Bugzilla is not recommended. Please don't use laptop-mode-tools if you're
732
to read the documentation in laptop-mode.txt. Make sure to stop laptop-mode
877
unsure.
733
before your battery runs out of power and data gets written to disk - otherwise
734
you will at least lose the last 10 minutes of your work.
735
</warn>
878
</warn>
736
879
880
<pre caption="Automated start of laptop-mode">
881
# <i>emerge laptop-mode-tools</i>
882
</pre>
883
884
<p>
885
<c>laptop-mode-tools</c> has it's configuration file in
886
<path>/etc/laptop-mode/laptop-mode.conf</path>. Adjust it the way you like it,
887
it's well commented. If you have <e>apm</e> or <e>acpi</e> in your USE flags,
888
laptop-mode will be started automatically in battery mode. Otherwise you can
889
automate it by running <c>rc-update add laptop-mode battery</c>.
890
</p>
891
737
</body>
892
</body>
738
</section>
893
</section>
739
<section>
894
<section>
Lines 823-828 Link Here
823
is a good starting point to save even more energy.
978
is a good starting point to save even more energy.
824
</p>
979
</p>
825
980
981
<pre caption="Power Management for WLAN">
982
# <i>chmod +x /etc/init.d/pm.wlan0</i>
983
# <i>/sbin/depscan.sh</i>
984
# <i>rc-update add pm.wlan0 battery</i>
985
</pre>
986
826
</body>
987
</body>
827
</section>
988
</section>
828
<section>
989
<section>
Lines 948-964 Link Here
948
# <i>echo 3 &gt; /proc/acpi/sleep</i>          <comment>(sleep)</comment>
1109
# <i>echo 3 &gt; /proc/acpi/sleep</i>          <comment>(sleep)</comment>
949
1110
950
<comment>(kernel 2.6 series)</comment>
1111
<comment>(kernel 2.6 series)</comment>
951
# <i>echo -n standby &gt; /sys/power/state</i> <comment>standby</comment>
1112
# <i>echo -n standby &gt; /sys/power/state</i> <comment>(standby)</comment>
952
# <i>echo -n mem &gt; /sys/power/state</i>     <comment>sleep</comment>
1113
# <i>echo -n mem &gt; /sys/power/state</i>     <comment>(sleep)</comment>
953
1114
954
<comment>(swsusp)</comment>
1115
<comment>(swsusp)</comment>
955
# <i>echo 4 &gt; /proc/acpi/sleep</i>          <comment>hibernate</comment>
1116
# <i>echo 4 &gt; /proc/acpi/sleep</i>          <comment>(hibernate)</comment>
956
1117
957
<comment>(Suspend-to-Disk)</comment>
1118
<comment>(Suspend-to-Disk)</comment>
958
# <i>echo -n disk &gt; /sys/power/state</i>    <comment>hibernate</comment>
1119
# <i>echo -n disk &gt; /sys/power/state</i>    <comment>(hibernate)</comment>
959
1120
960
<comment>(swsusp2)</comment>
1121
<comment>(swsusp2)</comment>
961
# <i>echo &gt; /proc/swsusp/activate</i>
1122
# <i>/usr/sbin/hibernate</i>                   <comment>(hibernate, see below)</comment>
962
</pre>
1123
</pre>
963
1124
964
<warn>
1125
<warn>
Lines 976-987 Link Here
976
<p>
1137
<p>
977
While the above should be sufficient to get swsusp and Suspend-to-Disk running
1138
While the above should be sufficient to get swsusp and Suspend-to-Disk running
978
(I didn't say working), swsusp2 needs special care. 
1139
(I didn't say working), swsusp2 needs special care. 
979
The first thing to do is to patch the kernel with the patches provided at <uri
1140
The first thing to do is patching the kernel with the patches provided at <uri
980
link="http://softwaresuspend.berlios.de/">
1141
link="http://softwaresuspend.berlios.de/">
981
http://softwaresuspend.berlios.de/</uri>. Afterwards, install the hibernate 
1142
http://softwaresuspend.berlios.de/</uri>. Additionally you've got to emerge
982
script from the same page.
1143
<c>hibernate-script</c>. Once it is installed, configure
1144
<path>/etc/hibernate/hibernate.conf</path> and try whether it works:
983
</p>
1145
</p>
984
1146
1147
<pre>
1148
<i># emerge hibernate-script</i>
1149
<i># $EDITOR /etc/hibernate/hibernate.conf</i>
1150
<comment>(Last chance to backup any data)</comment>
1151
<i># hibernate</i>
1152
</pre>
1153
985
</body>
1154
</body>
986
</section>
1155
</section>
987
</chapter>
1156
</chapter>
Lines 1029-1036 Link Here
1029
</p>
1198
</p>
1030
1199
1031
<p>
1200
<p>
1032
<e>A:</e> This seems to be a kernel bug. Run <c>emerge x86info</c>, update your
1201
<e>A:</e> Probably you have activated symmetric multiprocessing support
1033
kernel as asked and check the current frequency with <c>x86info -mhz</c>.
1202
(CONFIG_SMP) in your kernel. Deactivate it and it should work. Some older
1203
kernels had a bug causing this. In that case, run <c>emerge x86info</c>,
1204
update your kernel as asked and check the current frequency with
1205
<c>x86info -mhz</c>.
1034
</p>
1206
</p>
1035
1207
1036
<p>
1208
<p>
Lines 1049-1054 Link Here
1049
</p>
1221
</p>
1050
1222
1051
<p>
1223
<p>
1224
<e>Q:</e> When configuring the kernel, powersave, performance and userspace
1225
governors show up, but that ondemand thing is missing. Where do I get it?
1226
</p>
1227
1228
<p>
1229
<e>A:</e> The ondemand governor is only included in recent kernel sources. Try
1230
updating them.
1231
</p>
1232
1233
<p>
1234
<e>Q:</e> Runlevel switching doesn't work - the script is not able to determine
1235
the power source correctly.
1236
</p>
1237
1238
<p>
1239
<e>A:</e> On some systems, the power source can't be determined by reading
1240
<path>/proc/acpi/ac_adapter/*/state</path>. If it fails for you, create a
1241
custom script <c>on_ac_power</c> or use the one from <c>powermgmt-base</c>.
1242
An ebuild can be found in <uri
1243
link="http://bugs.gentoo.org/show_bug.cgi?id=76516">Bug #76516</uri>. You
1244
only have to emerge it, it works transparently with the above script.
1245
</p>
1246
1247
<p>
1052
<e>Q:</e> Battery life time seems to be worse than before.
1248
<e>Q:</e> Battery life time seems to be worse than before.
1053
</p>
1249
</p>
1054
1250
Lines 1105-1110 Link Here
1105
your battery is probably broken. Try to claim your warranty.
1301
your battery is probably broken. Try to claim your warranty.
1106
</p>
1302
</p>
1107
1303
1304
<p>
1305
<e>Q:</e> My problem is not listed above. Where should I go next?
1306
</p>
1307
1308
<p>
1309
<e>A:</e> Don't fear to contact me, <mail link="fragfred@gmx.de">Dennis
1310
Nienhüser</mail>, directly.
1311
</p>
1312
1108
</body>
1313
</body>
1109
</section>
1314
</section>
1110
</chapter>
1315
</chapter>

Return to bug 69734