<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=24.126.25.181</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=24.126.25.181"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/24.126.25.181"/>
	<updated>2026-04-11T12:30:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Laptop-mode&amp;diff=1027</id>
		<title>Laptop-mode</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Laptop-mode&amp;diff=1027"/>
		<updated>2004-12-08T22:42:32Z</updated>

		<summary type="html">&lt;p&gt;24.126.25.181: correcting typo of /proc/sys/vm/laptop-mode to _mode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An often overlooked feature in the modern 2.6.6+ series of Linux kernels is the laptop-mode. It may be activated by writing a &amp;quot;1&amp;quot; into /proc/sys/vm/laptop_mode. Laptop-mode, when configured correctly, can make the kernel buffer disk activities for quite a long time and keep the harddisk spun down for most of the time to save power.&lt;br /&gt;
&lt;br /&gt;
There is also a set of userland tools made to automatically manage all aspects of laptop-mode configuration according to the actual mode of operation (ac/battery/status). It is called laptop-mode-tools and you can install it in debian via apt-get or download it from [http://www.xs4all.nl/~bsamwel/laptop_mode/tools here].&lt;br /&gt;
&lt;br /&gt;
Almost anything you need to know about laptop-mode can be read in your Linux kernel documentation at /usr/src/linux/Documentation/laptop-mode.txt&amp;lt;br&amp;gt;&lt;br /&gt;
If you can not find this file on your laptop, then go and get yourself the latest kernel sources.&lt;/div&gt;</summary>
		<author><name>24.126.25.181</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=APM_setup_on_a_type_2379_ThinkPad_T40&amp;diff=1507</id>
		<title>APM setup on a type 2379 ThinkPad T40</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=APM_setup_on_a_type_2379_ThinkPad_T40&amp;diff=1507"/>
		<updated>2004-12-08T21:45:41Z</updated>

		<summary type="html">&lt;p&gt;24.126.25.181: one user's experience getting APM hibernate working&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==APM Setup on a Type 2379 Thinkpad T40==&lt;br /&gt;
&lt;br /&gt;
There have been varying reports of success or lack thereof using [[tphdisk]]; my experience, as noted [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-March/016711.html in this] and [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-June/018329.html this] mail to the linux-thinkpad list, is that a pure-Linux fix on a T40 using [[tphdisk]] and a hibernate file or partition, was not possible.&lt;br /&gt;
&lt;br /&gt;
My Thinkpad is a T40, type 2379, bought in the US.&lt;br /&gt;
&lt;br /&gt;
(My theory is that this is because [[tphdisk]] just creates a file in the right format, but does not twiddle a bit in the BIOS to indicate that APM hibernation is now possible.  In earlier Thinkpads, this bit would have been set during the factory setup of the default Windows install with APM hibernation file; but in modern Thinkpads, Windows XP is installed with ACPI software-suspend instead.)&lt;br /&gt;
&lt;br /&gt;
I did manage to get it working after some trial and error.  Here's how.&lt;br /&gt;
&lt;br /&gt;
First off, the BIOS had to be at least 3.00c to support APM hibernation on my 2379 T40.   Using an earlier BIOS, the SAVE2DSK.BIN file was supposedly created successfully by both [[tphdisk]] and IBM's utility, but hibernation failed.&lt;br /&gt;
&lt;br /&gt;
In order to upgrade the BIOS, I needed to install a version of Windows earlier than Windows XP to run the BIOS upgrade application successfully.  It wouldn't complete from IBM's default XP installation, or from any version of DOS (it's a Win32 application).  I used Windows 98.&lt;br /&gt;
&lt;br /&gt;
Once I did that, however, I could boot the IBM hibernation-file creation utility diskette and run the tool, and it created the SAVE2DSK.BIN file successfully.  See [[How to make use of Power Management features#using a hibernation file on a dos partition]] for details on sizing.&lt;br /&gt;
&lt;br /&gt;
Also worth noting that I did have to use a FAT32 volume -- using a file on a FAT16 volume is no longer an option with today's large RAM installations, since neither [[tphdisk]] nor IBM's utility could create working 512MB SAVE2DSK.BIN files in a FAT16 filesystem.&lt;br /&gt;
&lt;br /&gt;
Another glitch I ran into is that I had no floppy drive; however, during this process I discovered that one can burn a floppy disk image as an ISO image to a CD-ROM, and create a bootable CD-ROM that way!  Useful trick ;)&lt;/div&gt;</summary>
		<author><name>24.126.25.181</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_Power_Management_features&amp;diff=999</id>
		<title>How to make use of Power Management features</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_make_use_of_Power_Management_features&amp;diff=999"/>
		<updated>2004-12-08T21:40:46Z</updated>

		<summary type="html">&lt;p&gt;24.126.25.181: /* using a hibernation file on a dos partition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==APM==&lt;br /&gt;
&lt;br /&gt;
===general===&lt;br /&gt;
You need to enable the APM Power Management support in the kernel and install the [[apmd]] to handle the events triggered by the kernel driver.&lt;br /&gt;
The configuration for what to do at the different events is done in the proxy script which is usually found in /etc/apmd_proxy.&lt;br /&gt;
See &amp;lt;tt&amp;gt;man apmd&amp;lt;/tt&amp;gt; for further information on this.&lt;br /&gt;
&lt;br /&gt;
===Screen blanking (Standby)===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
===Suspend to RAM (Sleep)===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
===Suspend to disk (Hibernate)===&lt;br /&gt;
The Phoenix BIOS allows you two ways to hibernate with APM: using a special partition or using a hibernation file on a dos type partition.&lt;br /&gt;
&lt;br /&gt;
====using a hibernation partition====&lt;br /&gt;
The partition to be used for hibernation must be a primary partition that is at least as big as your laptop's memory including its video ram. First set the partition type of this partition to a0 (IBM Thinkpad hibernation) with fdisk, and then use [[tphdisk]] to write a hibernation file directly to this partition.&lt;br /&gt;
&lt;br /&gt;
Only follow these instructions, if you understand them. You will overwrite a partition on your hard disk and might loose valuable data - consider yourself warned. For example, assume that /dev/hda2 is the partition that is to be converted to a hibernation partition. Become root and type '''/sbin/fdisk /dev/hda'''. At the fdisk prompt type '''t''' to change the partition type, then type '''2''' to indicate that you want to change the type of partition 2, and then enter the partition type: '''a0'''. Now type '''w''' to write the partition table back to disk and exit. After that use [[tphdisk]] to initialize the hibernation partition. First estimate the size of your laptop's memory (main and video). For the sake of this example, let us assume that the main memory is 1024 MB and the video card has 128 MB of memory. Then the command '''tphdisk 1152 &amp;gt; /dev/hda2''' will initialize the hibernation partition. Note that this will only work if the partition is big enough. After a reboot, Fn+F12 will work as expected.&lt;br /&gt;
&lt;br /&gt;
I have successfully used this method on a T41 (2373GEU) that runs Fedora Core 3.&lt;br /&gt;
&lt;br /&gt;
====using a hibernation file on a dos partition====&lt;br /&gt;
The partition to put the file on must be a dos or vfat partition. Fat32 formatted partitions have been reported successful as well as Fat16 formatted ones. The file is either created with phdisk.exe, if you happen to have a floppy drive and a bootable dos floppy disk that you can start it from.&lt;br /&gt;
Under Linux [[tphdisk]] will do this job for you.&lt;br /&gt;
&lt;br /&gt;
There have been varying reports of success or lack thereof using [[tphdisk]]; see [[APM setup on a type 2379 Thinkpad T40]] for workarounds if [[tphdisk]] doesn't do the trick.&lt;br /&gt;
&lt;br /&gt;
==ACPI==&lt;br /&gt;
&lt;br /&gt;
===general===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
===Screen blanking (Standby)===&lt;br /&gt;
Make sure you have &lt;br /&gt;
*Option &amp;quot;DPMS&amp;quot;&lt;br /&gt;
in you XF86Config/xorg.conf.&lt;br /&gt;
&lt;br /&gt;
Running &amp;quot;xset +dpms&amp;quot; and then &amp;quot;xset xdpms force off&amp;quot; will turn off the backlight on a laptop screen.  To force a screen off that is using a radeon chipset, install the package &amp;quot;radeontools.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
===Suspend to RAM (Sleep)===&lt;br /&gt;
ACPI Sleep and suspend-to-ram with recent 2.6.x kernels usually works fine, too.&lt;br /&gt;
&lt;br /&gt;
But after a suspend-to-ram (using Linux 2.6.9) the display of the T42p (and probably of other Thinkpads, too) remains black. This can be fixed by adding &lt;br /&gt;
&amp;quot;acpi_sleep=s3_bios&amp;quot; to the kernel boot parameter. However I experience some problems with the serial port of the port replicator&lt;br /&gt;
after the wake up from ram.&lt;br /&gt;
&lt;br /&gt;
There is a interesting discussion taking place in the [http://bugme.osdl.org/show_bug.cgi?id=3022 OSDL Bugzilla].&lt;br /&gt;
&lt;br /&gt;
===Suspend to disk (Hibernate)===&lt;br /&gt;
There are two drivers for this available:&lt;br /&gt;
* swsusp, which is in the kernel and&lt;br /&gt;
* [http://developer.berlios.de/projects/softwaresuspend/ SoftwareSuspend2] which is more feature rich, but not yet in the kernel, so you have to patch it in yourself&lt;br /&gt;
Both are reported to work fine as long as you use open-source graphic drivers. A comparison of the features can be found on [http://softwaresuspend.berlios.de/features.html this page].&lt;br /&gt;
&lt;br /&gt;
Just in case you are in doubt...yes, it is safe in both cases to use the same swap partition as active swap and as suspend partition.&lt;br /&gt;
&lt;br /&gt;
====using swsusp====&lt;br /&gt;
Software Suspend (swsusp) is included in the 2.6 kernel series. It seems like no patches for 2.4 kernels are available.&lt;br /&gt;
&lt;br /&gt;
To enable it, go to &amp;lt;tt&amp;gt;Power management options&amp;lt;/tt&amp;gt; and enable &amp;lt;tt&amp;gt;Power management support&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Software Suspend&amp;lt;/tt&amp;gt; in the kernel config menu. You'll also want to give the swap partition to suspend to in &amp;lt;tt&amp;gt;Default resume partition&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In case you prefer to edit your config file directly, you should have the following three entries look like here...&lt;br /&gt;
 CONFIG_PM=y&lt;br /&gt;
 CONFIG_SOFTWARE_SUSPEND=y&lt;br /&gt;
 CONFIG_PM_STD_PARTITION=&amp;quot;/dev/resume_partition&amp;quot;&lt;br /&gt;
...where &amp;lt;tt&amp;gt;/dev/resume_partition&amp;lt;/tt&amp;gt; needs to be replaced by the swap partition you want to use for suspending. (Use &amp;lt;tt&amp;gt;fdisk -l /dev/hda&amp;lt;/tt&amp;gt; if unsure.)&lt;br /&gt;
&lt;br /&gt;
You can override the default resume partition anytime by giving &amp;lt;tt&amp;gt;resume=/dev/resume_partition&amp;lt;/tt&amp;gt; as kernel boot parameter.&lt;br /&gt;
Also, ihn case you suspended, but want to boot up normally (without resuming from the saved image - loosing all data that was unsaved at suspend time), you can give the &amp;lt;tt&amp;gt;noresume&amp;lt;/tt&amp;gt; kernel boot parameter.&lt;br /&gt;
&lt;br /&gt;
To suspend you can either do a simple &amp;lt;tt&amp;gt;echo -n 4 &amp;gt; /proc/acpi/sleep&amp;lt;/tt&amp;gt; (recommended) or use the [http://softwaresuspend.berlios.de/old-site/swsusp/sysvinit-2.76-v2-for_swsusp-v5.tar.gz patched SysVInit] and call &amp;lt;tt&amp;gt;swsusp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;shutdown -z now&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ideally you would do this from a script like &amp;lt;tt&amp;gt;/etc/acpi/actions/hibernate.sh&amp;lt;/tt&amp;gt;. It has proven to be a good idea to shutdown the following processes/drivers within the script before you do the actual suspend.&lt;br /&gt;
*any running mysql server&lt;br /&gt;
*the madwifi driver, if you happen to use it&lt;br /&gt;
Afterwards you might want to enable them again, as well as run a script that does necessary configurations according to the ac power state.&lt;br /&gt;
It has furthermore turned out that the system clock is not readjusted automatically, so you will probably also want the do that from that script (i.e. by restarting your systemclock bootup script).&lt;br /&gt;
&lt;br /&gt;
Finally you should take note that swsusp does not set the ACPI S4 state. Instead it goes to S5. This means that the machine itself doesn't know that it was suspend rather than shutdown. Hence you can i.e. boot a parallel installed other operating system and resume your linux session later, as long as you don't touch the swap partition the image was saved to.&lt;br /&gt;
&lt;br /&gt;
====using SoftwareSuspend2====&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
==Dynamic Frequency Scaling (SpeedStep)==&lt;br /&gt;
&lt;br /&gt;
===configuring the kernel===&lt;br /&gt;
&lt;br /&gt;
====2.4 kernels====&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
====2.6 kernels====&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
If you have a Coppermine-piix-smi based Thinkpads like from the A2x, X2x and T2x series you might want to look at [[How to get SpeedStep working on Coppermine-piix4-smi based Thinkpads | this page]].&lt;br /&gt;
&lt;br /&gt;
===configuring SpeedStep daemons===&lt;br /&gt;
*[[How to configure cpufreqd | cpufreqd]]&lt;br /&gt;
*[[Hot to configure powersaved | powersaved]]&lt;br /&gt;
&lt;br /&gt;
==Harddisk Power Management==&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
===enabling the harddisks power management features===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # I' using this on FC2 and FC3&lt;br /&gt;
 # cpu throttling off as FC does thisout-of-the-box&lt;br /&gt;
 # turning swap off is only for those that feel comfortable&lt;br /&gt;
 # doing something this nasty.&lt;br /&gt;
 #&lt;br /&gt;
 # pcfe, 2004-11-15&lt;br /&gt;
                                                                                                                                      &lt;br /&gt;
 # cpu throttling&lt;br /&gt;
 # cat /proc/acpi/processor/CPU0/throttling for more info&lt;br /&gt;
 ACAD_THR=0&lt;br /&gt;
 BATT_THR=2&lt;br /&gt;
                                                                                                                                     &lt;br /&gt;
 # spindown time for HD (man hdparm for valid values)&lt;br /&gt;
 # I prefer 2 hours for acad and 2 min for batt&lt;br /&gt;
 ACAD_HD=244&lt;br /&gt;
 BATT_HD=24&lt;br /&gt;
                                                                                                                                     &lt;br /&gt;
 # Power management level&lt;br /&gt;
 # 255 (off) on AC&lt;br /&gt;
 # 128 (medium) on batt&lt;br /&gt;
 # lowered to 32, pcfe, 2004-06-23&lt;br /&gt;
 # upped to 64, pcfe, 2004-07-14&lt;br /&gt;
 # upped to 96, pcfe, 2004-10-20&lt;br /&gt;
 ACAD_PM=255&lt;br /&gt;
 BATT_PM=96&lt;br /&gt;
                                                                                                                                     &lt;br /&gt;
 # ac/battery event handler&lt;br /&gt;
                                                                                                                                     &lt;br /&gt;
 status=`awk '/^state: / { print $2 }' /proc/acpi/ac_adapter/AC/state`&lt;br /&gt;
                                                                                                                                      &lt;br /&gt;
 case $status in&lt;br /&gt;
        &amp;quot;on-line&amp;quot;)&lt;br /&gt;
                logger &amp;quot;Running /sbin/laptop_mode stop&amp;quot;&lt;br /&gt;
                /sbin/laptop_mode stop&lt;br /&gt;
                logger &amp;quot;Setting HD spindown for AC mode with hdparm -S $ACAD_HD /dev/hda.&amp;quot;&lt;br /&gt;
                /sbin/hdparm -S $ACAD_HD /dev/hda &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
                logger &amp;quot;Setting HD powersaving for AC mode with hdparm -B $ACAD_PM /dev/hda.&amp;quot;&lt;br /&gt;
                /sbin/hdparm -B $ACAD_PM /dev/hda &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
                #logger &amp;quot;Turning on swap.&amp;quot;&lt;br /&gt;
                #/sbin/swapon -a&lt;br /&gt;
                #echo -n $ACAD_CPU:$ACAD_THR &amp;gt; /proc/acpi/processor/CPU0/limit&lt;br /&gt;
                exit 0&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;off-line&amp;quot;)&lt;br /&gt;
                #logger &amp;quot;Turning off swap.&amp;quot;&lt;br /&gt;
                #/sbin/swapoff -a&lt;br /&gt;
                logger &amp;quot;Running /sbin/laptop_mode start&amp;quot;&lt;br /&gt;
                /sbin/laptop_mode start&lt;br /&gt;
                logger &amp;quot;Setting HD spindown for battery mode with hdparm -S $BATT_HD /dev/hda.&amp;quot;&lt;br /&gt;
                /sbin/hdparm -S $BATT_HD /dev/hda &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
                logger &amp;quot;Setting HD powersaving for battery mode with hdparm -B $BATT_PM /dev/hda.&amp;quot;&lt;br /&gt;
                /sbin/hdparm -B $BATT_PM /dev/hda &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
                #echo -n $BATT_CPU:$BATT_THR &amp;gt; /proc/acpi/processor/CPU0/limit&lt;br /&gt;
                exit 0&lt;br /&gt;
        ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
===Laptop-mode===&lt;br /&gt;
To actually enable the harddrive to shutdown for a longer time and not get started again because of filesystem syncs every few seconds, you'll need to activate [[Laptop-mode]].&lt;br /&gt;
&lt;br /&gt;
==DynamicClocks in the Radeon Xorg driver==&lt;br /&gt;
The xorg X server has support for a power saving feature from ATI called PowerPlay. Xorg calls this feature DynamicClocks. It can be enabled in the server by adding '''Option  &amp;quot;DynamicClocks&amp;quot; &amp;quot;on&amp;quot;''' in the '''Device''' section in /etc/X11/xorg.conf&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;Device&amp;quot;&lt;br /&gt;
        Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Driver      &amp;quot;radeon&amp;quot;&lt;br /&gt;
        VendorName  &amp;quot;IBM Thinkpad&amp;quot;&lt;br /&gt;
        BoardName   &amp;quot;ATI Radeon Mobility M9&amp;quot;&lt;br /&gt;
        '''Option      &amp;quot;DynamicClocks&amp;quot; &amp;quot;on&amp;quot;'''&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this option enabled, the X11 server should print (/var/log/Xorg.0.log):&lt;br /&gt;
&lt;br /&gt;
 (**) RADEON(0): Option &amp;quot;DynamicClocks&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
 (II) RADEON(0): Dynamic Clock Scaling Enabled&lt;br /&gt;
&lt;br /&gt;
http://www.ati.com/products/pdf/powerplaywp2.pdf&lt;br /&gt;
&lt;br /&gt;
==other Hardware==&lt;br /&gt;
Todo...(if any - other ways of saving power and such)&lt;/div&gt;</summary>
		<author><name>24.126.25.181</name></author>
		
	</entry>
</feed>