<?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=Alkos333</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=Alkos333"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Alkos333"/>
	<updated>2026-05-09T13:01:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_protect_the_harddisk_through_APS&amp;diff=40384</id>
		<title>How to protect the harddisk through APS</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_protect_the_harddisk_through_APS&amp;diff=40384"/>
		<updated>2008-12-24T21:27:26Z</updated>

		<summary type="html">&lt;p&gt;Alkos333: /* Getting the files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
This page tells you how to make the [[Active Protection System]] work under Linux to protect your harddrive from damage in case of a notebook drop or other kind of impact while it is running.&lt;br /&gt;
&lt;br /&gt;
Specific instructions for {{Fedora}} can be found [[Installing_Fedora_Core_5_on_a_ThinkPad_X41_Tablet#Harddrive_Active_Protection_System_.28HDAPS.29|here]].&lt;br /&gt;
&lt;br /&gt;
For {{Debian}} (Etch) have a look at [[Installing_Debian_Etch_on_a_ThinkPad_Z60m#Active_Protection_System|this]].&lt;br /&gt;
&lt;br /&gt;
== How APS works in Linux ==&lt;br /&gt;
APS in Linux consists of four components on the software side:&lt;br /&gt;
* The [[HDAPS]] driver (included in recent kernels). It exports a sysfs interface providing the acceleration values.&lt;br /&gt;
* The &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt; disk protection kernel patch, which exports a sysfs interface that enables an ide or sata disk to be protected by a userspace process. You should get the patch appropriate to your kernel version from [http://news.gmane.org/group/gmane.linux.drivers.hdaps.devel/last=/force_load=t gmane.linux.drivers.hdaps.devel].&lt;br /&gt;
* The [http://www.dresco.co.uk/hdaps/ &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt;] disk protection userspace daemon. It monitors the acceleration values through the HDAPS interface and automatically initiates disk protection through the hdaps_protect interface - given that the movement exceeds a user specified threshold.&lt;br /&gt;
* Optional: the [http://roy.marples.name/node/269 &amp;lt;tt&amp;gt;khdapsmonitor KDE System Tray applet&amp;lt;/tt&amp;gt;] or the [http://www.dresco.co.uk/hdaps/ &amp;lt;tt&amp;gt;gnome-hdaps-applet&amp;lt;/tt&amp;gt;]. These applets provide a visual indication of the disk protection status and also a graphical interface for adjusting configuration options for &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* For Kernel 2.6.28 it's planned to put a general disc protection directly into the libata driver&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
As mentioned above, the hdaps kernel driver found in recent kernels is only responsible for reading the accelerometer data and exporting it through the sysfs interface. &lt;br /&gt;
&lt;br /&gt;
In order to use this information to protect the disk, some additional steps are required.&lt;br /&gt;
&lt;br /&gt;
* Download and build the latest hdaps_protect disk protection kernel patches.&lt;br /&gt;
* Enable the drivers in the kernel (requires kernel rebuild).&lt;br /&gt;
* Download, build and configure the hdapsd userspace daemon.&lt;br /&gt;
* Download and build one of the applets to get a real-time representation of the disk protection status.&lt;br /&gt;
&lt;br /&gt;
===Getting the files===&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! Latest Sources&lt;br /&gt;
|&lt;br /&gt;
See [[HDAPS#Disk_head_parking|HDAPS - Disk head parking]]&lt;br /&gt;
|-&lt;br /&gt;
! {{Slackware}}&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt; SlackBuild: http://slackbuilds.org/repository/12.2/system/hdapsd/&lt;br /&gt;
|-&lt;br /&gt;
! {{Debian}}&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt; package: http://packages.debian.org/unstable/misc/hdapsd&lt;br /&gt;
|-&lt;br /&gt;
! {{Fedora}}&lt;br /&gt;
| see instructions [[Installing_Fedora_Core_5_on_a_ThinkPad_X41_Tablet#Harddrive_Active_Protection_System_.28HDAPS.29|here]]&lt;br /&gt;
*kernel RPM packages including &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt;: http://www.dresco.co.uk/hdaps/ &lt;br /&gt;
*kernel RPM packages including &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt; and [[Software Suspend 2]]: http://mhensler.de/swsusp/download/yum/development/fc5/ (build 2084_2 and up)&lt;br /&gt;
|-&lt;br /&gt;
! {{Gentoo}}&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt;: [http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-laptop/hdapsd available]&lt;br /&gt;
*&amp;lt;tt&amp;gt;khdapsmonitor&amp;lt;/tt&amp;gt;: [http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-laptop/khdapsmonitor available]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding kernel support ===&lt;br /&gt;
A kernel patch is required for disk head parking and queue freezing.&lt;br /&gt;
&lt;br /&gt;
==== Manually patching and compiling a kernel ====&lt;br /&gt;
As root, do:&lt;br /&gt;
:{{cmdroot|cd /usr/src/linux}}&lt;br /&gt;
:{{cmdroot|patch -p1 &amp;lt; ~/hdaps_protect.20060409.patch}}&lt;br /&gt;
:{{cmdroot|make clean}}&lt;br /&gt;
:{{cmdroot|make}}&lt;br /&gt;
:{{cmdroot|make modules_install}}&lt;br /&gt;
&lt;br /&gt;
==== Zen-Sources patched kernel ====&lt;br /&gt;
Another way to achieve this is using zen-sources kernel. &lt;br /&gt;
It has hdaps patches applied. Additional it supports many other IBM futures like tp_smapi and newest thinkpad_acpi.&lt;br /&gt;
&lt;br /&gt;
Download page for this kind of kernel is http://zen-sources.org/&lt;br /&gt;
&lt;br /&gt;
After downloading a kernel image unpack it to ''/usr/src/linux'' with&lt;br /&gt;
:{{cmdroot|tar jxf zen-sources-2.6-version-zen0.tar.bz2 }}&lt;br /&gt;
&lt;br /&gt;
Installation is similar to previous one.&lt;br /&gt;
&lt;br /&gt;
As root, do:&lt;br /&gt;
:{{cmdroot|make oldconfig}}&lt;br /&gt;
:{{cmdroot|make clean}}&lt;br /&gt;
:{{cmdroot|make}}&lt;br /&gt;
:{{cmdroot|make modules_install}}&lt;br /&gt;
&lt;br /&gt;
'''make oldconfig''' command will ask you for some information. It's required to tap '''m''' or '''y''' on &amp;quot;HDAPS&amp;quot; functionality, and on some other things connected with Thinkpad.&lt;br /&gt;
&lt;br /&gt;
=== Installing hdapsd ===&lt;br /&gt;
==== Manual compilation from source ====&lt;br /&gt;
{{NOTE|1=There has been a new release of hdapsd which doesn't use sysfs anymore and therefore reduces timer interrupts. You need tp_smapi 0.32 for this. See also: http://article.gmane.org/gmane.linux.drivers.hdaps.devel/1040 .}}&lt;br /&gt;
* Download the &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt; sources (see above)&lt;br /&gt;
* Compile using {{cmdroot|gcc -o hdapsd hdapsd-*.c}}&lt;br /&gt;
* Run {{cmdroot|./hdapsd -d sda -s 12 -a}} (replace &amp;lt;tt&amp;gt;sda&amp;lt;/tt&amp;gt; with your hard disk device; run {{cmdroot|./hdapsd}} without arguments for help)&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
{{NOTE|1=hdapsd was added to the official portage tree on the 26th June 2006. However the version in portage is to be considered outdated. (20060409)}}&lt;br /&gt;
{{Gentoo}} users can try the ebuild attached to [http://bugs.gentoo.org/show_bug.cgi?id=166166 gentoo bug 166166].&lt;br /&gt;
*Add hdapsd support in your kernel: device drivers -&amp;gt; hardware monitoring -&amp;gt; ... (you need it as a module if you want to use tp_smapi and hdaps, see [[Tp_smapi]])&lt;br /&gt;
*Download the ebuild, use same ebuild date as the kernel-patch.&lt;br /&gt;
*Make known the portage an extern ebuild path and add the following line to {{path|/etc/make.conf}}:&lt;br /&gt;
 PORTDIR_OVERLAY=&amp;quot;/usr/local/portage/&amp;quot; (or any other location)&lt;br /&gt;
*Create directory {{path|/usr/local/portage}} and {{path|/usr/local/portage/app-laptop/}}&lt;br /&gt;
*Copy the downloaded ebuild to {{path|/usr/local/portage/app-laptop}} ({{path|/usr/local/portage/app-laptop/hdapsd}} should now exists)&lt;br /&gt;
*Make portage known the new ebuild and creat digist with:&lt;br /&gt;
:{{cmdroot|ebuild /usr/local/portage/app-laptop/hdapsd/hdapsd-20060326.ebuild digest}}&lt;br /&gt;
*Optional: Copy source file to portage distfiles (if no internet connection is available): &lt;br /&gt;
:{{cmdroot|cp hdapsd-20060326.c /usr/portage/distfiles}}&lt;br /&gt;
*Accept the x86 keyword for this package: {{cmdroot|echo &amp;quot;app-laptop/hdapsd ~x86&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.keywords}}&lt;br /&gt;
*Install hdapsd with: {{cmdroot|emerge hdapsd}}.&lt;br /&gt;
*Edit {{path|/etc/conf.d/hdapsd}} (change your harddrive if neccessary: mine is sda, and change the value from 5, 5 is to sensitive, 12 is a good value in my opinion).&lt;br /&gt;
*start deamon with: {{cmdroot|/etc/init.d/hdapsd start}}&lt;br /&gt;
*Optional: add to default runlevel: {{cmdroot|rc-update add hdapsd default, rc-update add hdapsd battery}}&lt;br /&gt;
Write an eMail to abartel[Ã¤d]htwm.de, if you want to get my hdapsd-20060326.ebuild and please upload it.&lt;br /&gt;
&lt;br /&gt;
==== Ubuntu ====&lt;br /&gt;
hdapsd is available via synaptic for Hardy Heron.&lt;br /&gt;
&lt;br /&gt;
=== Building an applet ===&lt;br /&gt;
====hdaps-gl====&lt;br /&gt;
*Make sure you have installed hdaps [and loaded] and ?opengl?&lt;br /&gt;
*Download [https://sourceforge.net/project/showfiles.php?group_id=138242 hdaps-gl-0.0.5] from the web.&lt;br /&gt;
*Extract files to {{path|/opt/hdaps-gl}}.&lt;br /&gt;
*{{cmdroot|make}}&lt;br /&gt;
*Start the applet: {{cmdroot|./hdaps-gl}}&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
See the [[Problem with APS harddisk parking]] page for troubleshooting APS issues.&lt;br /&gt;
{{NOTE|1=If you use [[tp_smapi]], remember to include the option &amp;lt;tt&amp;gt;HDAPS=1&amp;lt;/tt&amp;gt; when [[Tp_smapi#Installation|installing tp_smapi]]. Also, you might need to build the hdaps driver as module.}}&lt;br /&gt;
&lt;br /&gt;
==Further Information==&lt;br /&gt;
*Additonal information and support is available through the [[Mailinglists#HDAPS Developers Mailinglist|hdaps-devel]] mailinglist and its archive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:T61]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Z61m]] [[Category:Z61e]] [[Category:Z61m]]&lt;/div&gt;</summary>
		<author><name>Alkos333</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28768</id>
		<title>Swsusp</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28768"/>
		<updated>2007-03-16T00:37:59Z</updated>

		<summary type="html">&lt;p&gt;Alkos333: /* Model-specific Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
===Software Suspend - swsusp===&lt;br /&gt;
Software Suspend (&amp;lt;tt&amp;gt;swsusp&amp;lt;/tt&amp;gt;) is a suspend-to-disk implementation included in the 2.6 kernel series. See [[Software Suspend 2]] for an alternative implementation, which has some advantages.&lt;br /&gt;
&lt;br /&gt;
Note that swsusp is not needed for suspend-to-RAM functionality.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Kernel configuration==&lt;br /&gt;
To enable software suspend change your kernel config as follows:&lt;br /&gt;
:{{kernelconf|CONFIG_PM|&amp;lt;*&amp;gt;|Power management support|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_SOFTWARE_SUSPEND|&amp;lt;*&amp;gt;|Software Suspend|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_PM_STD_PARTITION|[/dev/resume_partition]|Default resume partition|Power management options|||}}&lt;br /&gt;
&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 {{cmdroot|fdisk -l /dev/hda}} if unsure.) &lt;br /&gt;
&lt;br /&gt;
You can override the default resume partition anytime by giving {{bootparm|resume|/dev/resume_partition}} as kernel boot parameter.&lt;br /&gt;
Also, in case you suspended, but want to boot up normally (without resuming from the saved image - losing all data that was unsaved at suspend time), you can give the {{bootparm|noresume|}} kernel boot parameter.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|For some people suspending did not work if &amp;lt;tt&amp;gt;resume_partition&amp;lt;/tt&amp;gt; was specified in the kernel config. In such case specify the resume partition as a kernel parameter instead.}}&lt;br /&gt;
&lt;br /&gt;
{{NOTE|When using Debian Etch or Sid, you need to use &amp;lt;tt&amp;gt;initramfs-tools&amp;lt;/tt&amp;gt; as yaird is currently (2006-05-18) not supporting swsusp. See [http://wiki.debian.org/InitrdReplacementOptions the Debian Wiki] for more details.}}&lt;br /&gt;
&lt;br /&gt;
==Suspending==&lt;br /&gt;
To suspend you can either do a simple {{cmdroot|echo disk &amp;gt; /sys/power/state}} (recommended) or use the [http://softwaresuspend.berlios.de/old-site/swsusp/sysvinit-2.76-v2-for_swsusp-v5.tar.gz patched SysVInit] and call {{cmdroot|swsusp}} or {{cmdroot|shutdown -z now}}. As the {{path|/proc/acpi/sleep}} interface becomes deprecated in newer kernels you should NOT use the old {{cmdroot|echo -n 4 &amp;gt; /proc/acpi/sleep}} anymore.&lt;br /&gt;
&lt;br /&gt;
Ideally, you would do this from a script like {{path|/etc/acpi/actions/hibernate.sh}}. 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 linuxant driver may require to be stopped as well ({{cmdroot|dldrstop}} does the trick).&lt;br /&gt;
&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;
Furthermore, 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;
If the sound output is silent after resume, the following commands might help to get sound to work again without reloading any modules:&lt;br /&gt;
 amixer set Master mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set Master unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
==S5 vs. S4 state==&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;
&lt;br /&gt;
==Model-specific Status==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border:1px; background:grey;&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Thinkpad Model &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Type &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Operating System &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Kernel Version&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| swsusp works&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Note&lt;br /&gt;
|- style=&amp;quot;background: white;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-55G &lt;br /&gt;
| Arch Linux&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.18 with [[User:Profilek | Forest Zhao's AHCI patches]]&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.19.2&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X31}}&lt;br /&gt;
| 2672-BCO &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.20.1&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|{{R52}}&lt;br /&gt;
| 18299MG&lt;br /&gt;
| [[:Category:Debian|Debian Sarge]]&lt;br /&gt;
| 2.6.17.9&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T43}}&lt;br /&gt;
| 2668-74G&lt;br /&gt;
| [[:Category:Fedora|Fedora Core 6]]&lt;br /&gt;
| 2.6.19&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T60}}&lt;br /&gt;
| 1953-E7U&lt;br /&gt;
| [[:Category:Slackware|Slackware 11]]&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style=&amp;quot;color:green;&amp;quot; | yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Alkos333</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28767</id>
		<title>Swsusp</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28767"/>
		<updated>2007-03-16T00:37:42Z</updated>

		<summary type="html">&lt;p&gt;Alkos333: /* Model-specific Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
===Software Suspend - swsusp===&lt;br /&gt;
Software Suspend (&amp;lt;tt&amp;gt;swsusp&amp;lt;/tt&amp;gt;) is a suspend-to-disk implementation included in the 2.6 kernel series. See [[Software Suspend 2]] for an alternative implementation, which has some advantages.&lt;br /&gt;
&lt;br /&gt;
Note that swsusp is not needed for suspend-to-RAM functionality.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Kernel configuration==&lt;br /&gt;
To enable software suspend change your kernel config as follows:&lt;br /&gt;
:{{kernelconf|CONFIG_PM|&amp;lt;*&amp;gt;|Power management support|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_SOFTWARE_SUSPEND|&amp;lt;*&amp;gt;|Software Suspend|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_PM_STD_PARTITION|[/dev/resume_partition]|Default resume partition|Power management options|||}}&lt;br /&gt;
&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 {{cmdroot|fdisk -l /dev/hda}} if unsure.) &lt;br /&gt;
&lt;br /&gt;
You can override the default resume partition anytime by giving {{bootparm|resume|/dev/resume_partition}} as kernel boot parameter.&lt;br /&gt;
Also, in case you suspended, but want to boot up normally (without resuming from the saved image - losing all data that was unsaved at suspend time), you can give the {{bootparm|noresume|}} kernel boot parameter.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|For some people suspending did not work if &amp;lt;tt&amp;gt;resume_partition&amp;lt;/tt&amp;gt; was specified in the kernel config. In such case specify the resume partition as a kernel parameter instead.}}&lt;br /&gt;
&lt;br /&gt;
{{NOTE|When using Debian Etch or Sid, you need to use &amp;lt;tt&amp;gt;initramfs-tools&amp;lt;/tt&amp;gt; as yaird is currently (2006-05-18) not supporting swsusp. See [http://wiki.debian.org/InitrdReplacementOptions the Debian Wiki] for more details.}}&lt;br /&gt;
&lt;br /&gt;
==Suspending==&lt;br /&gt;
To suspend you can either do a simple {{cmdroot|echo disk &amp;gt; /sys/power/state}} (recommended) or use the [http://softwaresuspend.berlios.de/old-site/swsusp/sysvinit-2.76-v2-for_swsusp-v5.tar.gz patched SysVInit] and call {{cmdroot|swsusp}} or {{cmdroot|shutdown -z now}}. As the {{path|/proc/acpi/sleep}} interface becomes deprecated in newer kernels you should NOT use the old {{cmdroot|echo -n 4 &amp;gt; /proc/acpi/sleep}} anymore.&lt;br /&gt;
&lt;br /&gt;
Ideally, you would do this from a script like {{path|/etc/acpi/actions/hibernate.sh}}. 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 linuxant driver may require to be stopped as well ({{cmdroot|dldrstop}} does the trick).&lt;br /&gt;
&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;
Furthermore, 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;
If the sound output is silent after resume, the following commands might help to get sound to work again without reloading any modules:&lt;br /&gt;
 amixer set Master mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set Master unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
==S5 vs. S4 state==&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;
&lt;br /&gt;
==Model-specific Status==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border:1px; background:grey;&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Thinkpad Model &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Type &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Operating System &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Kernel Version&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| swsusp works&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Note&lt;br /&gt;
|- style=&amp;quot;background: white;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-55G &lt;br /&gt;
| Arch Linux&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.18 with [[User:Profilek | Forest Zhao's AHCI patches]]&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.19.2&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X31}}&lt;br /&gt;
| 2672-BCO &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.20.1&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|{{R52}}&lt;br /&gt;
| 18299MG&lt;br /&gt;
| [[:Category:Debian|Debian Sarge]]&lt;br /&gt;
| 2.6.17.9&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T43}}&lt;br /&gt;
| 2668-74G&lt;br /&gt;
| [[:Category:Fedora|Fedora Core 6]]&lt;br /&gt;
| 2.6.19&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T60}}&lt;br /&gt;
| 1953-E7U&lt;br /&gt;
| [[:Category:Slackware|Slackware 11]]&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style=&amp;quot;color:green;&amp;quot; | yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Alkos333</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28766</id>
		<title>Swsusp</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28766"/>
		<updated>2007-03-16T00:36:32Z</updated>

		<summary type="html">&lt;p&gt;Alkos333: /* Model-specific Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
===Software Suspend - swsusp===&lt;br /&gt;
Software Suspend (&amp;lt;tt&amp;gt;swsusp&amp;lt;/tt&amp;gt;) is a suspend-to-disk implementation included in the 2.6 kernel series. See [[Software Suspend 2]] for an alternative implementation, which has some advantages.&lt;br /&gt;
&lt;br /&gt;
Note that swsusp is not needed for suspend-to-RAM functionality.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Kernel configuration==&lt;br /&gt;
To enable software suspend change your kernel config as follows:&lt;br /&gt;
:{{kernelconf|CONFIG_PM|&amp;lt;*&amp;gt;|Power management support|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_SOFTWARE_SUSPEND|&amp;lt;*&amp;gt;|Software Suspend|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_PM_STD_PARTITION|[/dev/resume_partition]|Default resume partition|Power management options|||}}&lt;br /&gt;
&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 {{cmdroot|fdisk -l /dev/hda}} if unsure.) &lt;br /&gt;
&lt;br /&gt;
You can override the default resume partition anytime by giving {{bootparm|resume|/dev/resume_partition}} as kernel boot parameter.&lt;br /&gt;
Also, in case you suspended, but want to boot up normally (without resuming from the saved image - losing all data that was unsaved at suspend time), you can give the {{bootparm|noresume|}} kernel boot parameter.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|For some people suspending did not work if &amp;lt;tt&amp;gt;resume_partition&amp;lt;/tt&amp;gt; was specified in the kernel config. In such case specify the resume partition as a kernel parameter instead.}}&lt;br /&gt;
&lt;br /&gt;
{{NOTE|When using Debian Etch or Sid, you need to use &amp;lt;tt&amp;gt;initramfs-tools&amp;lt;/tt&amp;gt; as yaird is currently (2006-05-18) not supporting swsusp. See [http://wiki.debian.org/InitrdReplacementOptions the Debian Wiki] for more details.}}&lt;br /&gt;
&lt;br /&gt;
==Suspending==&lt;br /&gt;
To suspend you can either do a simple {{cmdroot|echo disk &amp;gt; /sys/power/state}} (recommended) or use the [http://softwaresuspend.berlios.de/old-site/swsusp/sysvinit-2.76-v2-for_swsusp-v5.tar.gz patched SysVInit] and call {{cmdroot|swsusp}} or {{cmdroot|shutdown -z now}}. As the {{path|/proc/acpi/sleep}} interface becomes deprecated in newer kernels you should NOT use the old {{cmdroot|echo -n 4 &amp;gt; /proc/acpi/sleep}} anymore.&lt;br /&gt;
&lt;br /&gt;
Ideally, you would do this from a script like {{path|/etc/acpi/actions/hibernate.sh}}. 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 linuxant driver may require to be stopped as well ({{cmdroot|dldrstop}} does the trick).&lt;br /&gt;
&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;
Furthermore, 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;
If the sound output is silent after resume, the following commands might help to get sound to work again without reloading any modules:&lt;br /&gt;
 amixer set Master mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set Master unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
==S5 vs. S4 state==&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;
&lt;br /&gt;
==Model-specific Status==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border:1px; background:grey;&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Thinkpad Model &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Type &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Operating System &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Kernel Version&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| swsusp works&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Note&lt;br /&gt;
|- style=&amp;quot;background: white;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-55G &lt;br /&gt;
| Arch Linux&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.18 with [[User:Profilek | Forest Zhao's AHCI patches]]&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.19.2&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X31}}&lt;br /&gt;
| 2672-BCO &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.20.1&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|{{R52}}&lt;br /&gt;
| 18299MG&lt;br /&gt;
| [[:Category:Debian|Debian Sarge]]&lt;br /&gt;
| 2.6.17.9&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T43}}&lt;br /&gt;
| 2668-74G&lt;br /&gt;
| [[:Category:Fedora|Fedora Core 6]]&lt;br /&gt;
| 2.6.19&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T60}}&lt;br /&gt;
| 1953-E7U&lt;br /&gt;
| [[:Category:Slackware|Slackware 11]]&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style=&amp;quot;color:green;&amp;quot; | yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Alkos333</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28765</id>
		<title>Swsusp</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Swsusp&amp;diff=28765"/>
		<updated>2007-03-16T00:35:39Z</updated>

		<summary type="html">&lt;p&gt;Alkos333: /* Model-specific Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
===Software Suspend - swsusp===&lt;br /&gt;
Software Suspend (&amp;lt;tt&amp;gt;swsusp&amp;lt;/tt&amp;gt;) is a suspend-to-disk implementation included in the 2.6 kernel series. See [[Software Suspend 2]] for an alternative implementation, which has some advantages.&lt;br /&gt;
&lt;br /&gt;
Note that swsusp is not needed for suspend-to-RAM functionality.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Kernel configuration==&lt;br /&gt;
To enable software suspend change your kernel config as follows:&lt;br /&gt;
:{{kernelconf|CONFIG_PM|&amp;lt;*&amp;gt;|Power management support|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_SOFTWARE_SUSPEND|&amp;lt;*&amp;gt;|Software Suspend|Power management options|||}}&lt;br /&gt;
:{{kernelconf|CONFIG_PM_STD_PARTITION|[/dev/resume_partition]|Default resume partition|Power management options|||}}&lt;br /&gt;
&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 {{cmdroot|fdisk -l /dev/hda}} if unsure.) &lt;br /&gt;
&lt;br /&gt;
You can override the default resume partition anytime by giving {{bootparm|resume|/dev/resume_partition}} as kernel boot parameter.&lt;br /&gt;
Also, in case you suspended, but want to boot up normally (without resuming from the saved image - losing all data that was unsaved at suspend time), you can give the {{bootparm|noresume|}} kernel boot parameter.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|For some people suspending did not work if &amp;lt;tt&amp;gt;resume_partition&amp;lt;/tt&amp;gt; was specified in the kernel config. In such case specify the resume partition as a kernel parameter instead.}}&lt;br /&gt;
&lt;br /&gt;
{{NOTE|When using Debian Etch or Sid, you need to use &amp;lt;tt&amp;gt;initramfs-tools&amp;lt;/tt&amp;gt; as yaird is currently (2006-05-18) not supporting swsusp. See [http://wiki.debian.org/InitrdReplacementOptions the Debian Wiki] for more details.}}&lt;br /&gt;
&lt;br /&gt;
==Suspending==&lt;br /&gt;
To suspend you can either do a simple {{cmdroot|echo disk &amp;gt; /sys/power/state}} (recommended) or use the [http://softwaresuspend.berlios.de/old-site/swsusp/sysvinit-2.76-v2-for_swsusp-v5.tar.gz patched SysVInit] and call {{cmdroot|swsusp}} or {{cmdroot|shutdown -z now}}. As the {{path|/proc/acpi/sleep}} interface becomes deprecated in newer kernels you should NOT use the old {{cmdroot|echo -n 4 &amp;gt; /proc/acpi/sleep}} anymore.&lt;br /&gt;
&lt;br /&gt;
Ideally, you would do this from a script like {{path|/etc/acpi/actions/hibernate.sh}}. 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 linuxant driver may require to be stopped as well ({{cmdroot|dldrstop}} does the trick).&lt;br /&gt;
&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;
Furthermore, 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;
If the sound output is silent after resume, the following commands might help to get sound to work again without reloading any modules:&lt;br /&gt;
 amixer set Master mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM mute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set Master unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 amixer set PCM unmute &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
==S5 vs. S4 state==&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;
&lt;br /&gt;
==Model-specific Status==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border:1px; background:grey;&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Thinkpad Model &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Type &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Operating System &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Kernel Version&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| swsusp works&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Note&lt;br /&gt;
|- style=&amp;quot;background: white;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-55G &lt;br /&gt;
| Arch Linux&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.18 with [[User:Profilek | Forest Zhao's AHCI patches]]&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-5FG &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.19.2&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X31}}&lt;br /&gt;
| 2672-BCO &lt;br /&gt;
| [[:Category:Debian|Debian Etch]]&lt;br /&gt;
| 2.6.20.1&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|{{R52}}&lt;br /&gt;
| 18299MG&lt;br /&gt;
| [[:Category:Debian|Debian Sarge]]&lt;br /&gt;
| 2.6.17.9&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{T43}}&lt;br /&gt;
| 2668-74G&lt;br /&gt;
| [[:Category:Fedora|Fedora Core 6]]&lt;br /&gt;
| 2.6.19&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| yes&lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|{{T60}}&lt;br /&gt;
| 1953-E7U&lt;br /&gt;
| [[:Category:Slackware|Slackware 11]]&lt;br /&gt;
| 2.6.20&lt;br /&gt;
! style=&amp;quot;color:green;&amp;quot; | yes&lt;br /&gt;
|&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Alkos333</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_control_fan_speed&amp;diff=28734</id>
		<title>How to control fan speed</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_control_fan_speed&amp;diff=28734"/>
		<updated>2007-03-14T18:09:06Z</updated>

		<summary type="html">&lt;p&gt;Alkos333: /* Automated control scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page discusses methods for controlling the system fan.&lt;br /&gt;
&lt;br /&gt;
==For Linux==&lt;br /&gt;
===Using a patched kernel===&lt;br /&gt;
{{WARN|This patch is superceded by the patches in [[ibm-acpi]] [[Git]] repository or [http://ibm-acpi.sourceforge.net ibm-acpi.sf.net] releases}}&lt;br /&gt;
{{NOTE|Advanced fan control through ibm-acpi has been merged in Linux 2.6.20-rc2 mainline, so users of 2.6.20 won't need to patch their kernels to get the '''fan level''' functionality anymore}}&lt;br /&gt;
&lt;br /&gt;
The [[Patch for controlling fan speed]] provides a convenient interface via {{path|/proc/acpi/ibm/fan}}.&lt;br /&gt;
&lt;br /&gt;
Manual speed control can be done through the [[patch for controlling fan speed]]:&lt;br /&gt;
&lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 level:          auto&lt;br /&gt;
 speed:          4219&lt;br /&gt;
 commands:       enable, disable, level &amp;lt;level&amp;gt;&lt;br /&gt;
                 (&amp;lt;level&amp;gt; is 0-7, auto or disengaged)&lt;br /&gt;
 &lt;br /&gt;
 '''#echo level 2 &amp;gt; /proc/acpi/ibm/fan'''&lt;br /&gt;
 &lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 level:          2&lt;br /&gt;
 speed:          3142&lt;br /&gt;
 commands:       enable, disable, level &amp;lt;level&amp;gt;&lt;br /&gt;
                 (&amp;lt;level&amp;gt; is 0-7, auto or disengaged)&lt;br /&gt;
&lt;br /&gt;
===Using a stock kernel===&lt;br /&gt;
&lt;br /&gt;
If you have the [[ibm-acpi]] module loaded with &amp;lt;tt&amp;gt;experimental=1&amp;lt;/tt&amp;gt;, you can control the fan without patching the kernel by directly writing to the relevant embedded controller register using {{path|/proc/acpi/ibm/ecdump}}. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x00 &amp;gt; /proc/acpi/ibm/ecdump}} (fan off)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x02 &amp;gt; /proc/acpi/ibm/ecdump}} (low speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x04 &amp;gt; /proc/acpi/ibm/ecdump}} (medium speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x07 &amp;gt; /proc/acpi/ibm/ecdump}} (maximum speed)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x80 &amp;gt; /proc/acpi/ibm/ecdump}} (automatic - default)&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 0x2F 0x40 &amp;gt; /proc/acpi/ibm/ecdump}} (disengaged)&lt;br /&gt;
&lt;br /&gt;
See the specifications below for the meaning of these modes.&lt;br /&gt;
&lt;br /&gt;
===On/off control using stock kernel===&lt;br /&gt;
&lt;br /&gt;
If you only wish to turn the fan on and off (with automatic control when it's on), you can use the following.&lt;br /&gt;
&lt;br /&gt;
When loading [[ibm-acpi]] v0.11 with experimental switch ({{cmdroot|1=modprobe ibm_acpi experimental=1}}), it is possible to read and write the status of fan:&lt;br /&gt;
&lt;br /&gt;
 '''#cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         enabled&lt;br /&gt;
 speed:          3580&lt;br /&gt;
 commands:       enable, disable&lt;br /&gt;
 &lt;br /&gt;
 '''#echo disable &amp;gt; /proc/acpi/ibm/fan'''&lt;br /&gt;
 &lt;br /&gt;
 '''cat /proc/acpi/ibm/fan'''&lt;br /&gt;
 status:         disabled&lt;br /&gt;
 speed:          0&lt;br /&gt;
 commands:       enable, disable&lt;br /&gt;
&lt;br /&gt;
When off, the fan will then '''never''' wake up. It is advised to use an automated control script to reduce the chance of hardware damage.&lt;br /&gt;
&lt;br /&gt;
===Automated control scripts===&lt;br /&gt;
&lt;br /&gt;
An [[ACPI fan control script#Variable speed control scripts|ACPI fan control script]] can be used to override the firmware's fan algorithm with gentler, quieter version. It monitors the laptop's [[thermal sensors]] and sets the fan speed accordingly, according to customizable thresholds. For the default behavior, simply save the [[ACPI fan control script#Variable speed control scripts|script]] as {{path|tp-fancontrol}} and run; note that this script requires you to modprobe the ibm_acpi module as &amp;quot;modprobe ibm_acpi experimental=1&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
{{cmdroot|./tp-fancontrol}}&lt;br /&gt;
&lt;br /&gt;
==For Windows==&lt;br /&gt;
&lt;br /&gt;
Shimodax's ThinkPad fan control tool offers similar functionality (see [http://forum.thinkpads.com/viewtopic.php?t=17715 forum discussion] at thinkpads.com).  Source and binaries are available through the [http://sourceforge.net/projects/tp4xfancontrol &amp;quot;Tp4xFanControl&amp;quot;] project on SourceForge.&lt;br /&gt;
&lt;br /&gt;
==Hardware specs==&lt;br /&gt;
&lt;br /&gt;
The following hardware behavior was discovered experimentally by [[User:Thinker|Thinker]] and neither provided by nor confirmed by IBM/Lenovo. The following description may be inaccurate and may vary by model (see list of models above). The terminology probably does not match the one used by IBM/Lenovo engineers.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Information on other models is included in the [[ibm-acpi]] [[Git]] version.}}&lt;br /&gt;
&lt;br /&gt;
ACPI DSDT register _SB.PCI0.LPC.EC.HFSP (8 bits, offset 0x2F in the &amp;lt;tt&amp;gt;EmbeddedController&amp;lt;/tt&amp;gt; address space, accessed through the standard EC interface at IO ports 0x62 and 0x66) is read/writable and has the following meaning:&lt;br /&gt;
 &lt;br /&gt;
 Bits   7 6 5 4 3 2 1 0&lt;br /&gt;
        ---------------&lt;br /&gt;
 Value  1 0 * * * * * *  - automatic&lt;br /&gt;
        * 1 * * * * * *  - disengaged&lt;br /&gt;
        0 0 N N N N N N  - manual (0..63; 0=disable fan, 1=min, ..., 7=max)&lt;br /&gt;
&lt;br /&gt;
In ''automatic'' mode, the embedded controller sets the fan speed automatically according to system temperatures and some unknown algorithm.&lt;br /&gt;
&lt;br /&gt;
In ''manual'' mode, the fan level is forced to the given value and the EC will auto-regulate the fan to maintain at a (roughly) constant RPM, which is model-dependent. Manual speed levels 8-63 yield the same behavior as level 7, and the the ACPI DSDT uses level 7 for the emergency mode it enters upon critical CPU/GPU temperature, so apparently 7 is the real maximum level.&lt;br /&gt;
&lt;br /&gt;
In ''disengaged'' mode, the embedded controller does not read the fan RPM (hence &amp;lt;tt&amp;gt;EmbeddedController&amp;lt;/tt&amp;gt; offset 0x84 is not updated), and does not maintain a stable fan speed. When disengaged mode is entered the fan speed is not immediately changed (except if the fan was disabed, in which case it is turned on at a low level). However, once in disengaged mode, fan speed will slowly increase to ''beyond'' the maximum manual level (this may cause hardware damage!).&lt;br /&gt;
&lt;br /&gt;
{{NOTE|The &amp;quot;disengaged&amp;quot; mode has a different behaviour on ThinkPad {{A31}} than that described above.  As above, the fan speed increases beyond the levels of the regular 0-7 speed settings.  However, the speed increase is fairly instantaneous (the change being as fast as the transition between any other two speed levels, except 0 (off) which seems faster, i.e. immediate); and the fan speed reading is ''continuously'' available while in &amp;quot;disengaged&amp;quot; mode.  In the {{A31}}, the speed reaches about 4000 RPM as listed in the table below.}}&lt;br /&gt;
&lt;br /&gt;
After boot, the HFSP register may not reflect the true state of the EC (on some models it reads 0x07 even though the EC is actually in automatic mode).&lt;br /&gt;
&lt;br /&gt;
{{HINT|Apparently the [[Problem with fan noise|pulsing fan noise]] experienced by some users can be cured by repeatedly running 2-4 seconds of manual control followed by 0.5-1 seconds of disengaged mode. The pulse occurs when the the embedded controller computes the fan speed and adjusts the fan voltage adaptively every few seconds (~4.8sec for the ThinkPad T43); the aforementioned mode switching doesn't give it a chance to do so. One of the [[ACPI fan control script#Variable speed control scripts|ACPI fan control scripts]] implements this solution.}}&lt;br /&gt;
&lt;br /&gt;
==Supported models==&lt;br /&gt;
&lt;br /&gt;
The above was successfully tested on the following models:&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{T60}} (fan levels RPM: 1-2 = 3000-3100, 3-5 = ~3600, 6-7 = ~4500)&lt;br /&gt;
* ThinkPad {{T43}}, {{T43p}} (fan levels RPM: 1-2 = ~3300, 3-5 = ~4100, 6-7 = ~4700; disengaged mode works)&lt;br /&gt;
* ThinkPad {{T42}}, {{T42p}} (fan levels RPM: 1-2 = ~2900, 3-5 = ~3700, 6-7 = ~4700; disengaged mode works at ~5200)&lt;br /&gt;
* ThinkPad {{T41}}, {{T41p}} (fan levels RPM: 1-2 = ~2980, 3-5 = ~3500, 6-7 = ~4050; disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{T40}} (fan levels RPM: 1-2 = ~2950, 3-5 = ~3600, 6-7 = ~4050)&lt;br /&gt;
* ThinkPad {{T30}}&lt;br /&gt;
* ThinkPad {{T22}}&lt;br /&gt;
* ThinkPad {{T23}} (low speed = ~2200, medium and maximum speed = ~4800; disengaged mode works at ~5800)&lt;br /&gt;
* ThinkPad {{R52}}&lt;br /&gt;
* ThinkPad {{R50}} (highest manual level is 3; disengage mode works and reaches much higher RPM)&lt;br /&gt;
* ThinkPad {{R50p}} (disengaged mode works at ~5100)&lt;br /&gt;
* ThinkPad {{R51}} (level 0 = off, level 1-2 = ~3150, level 3-5 = ~3350, level 6 = ~3750, disengaged = ~5100)&lt;br /&gt;
* ThinkPad {{R51e}} (level 0 = off, level 1-2 = ~3300, level 3-5 = ~3800, level 6 = ~4150, disengaged = ~5100)&lt;br /&gt;
* ThinkPad {{X30}} (level 0 = off, low = ~3900, medium = ~4200, maximum = ~4650, disengaged = ~5900)&lt;br /&gt;
* ThinkPad {{X31}}&lt;br /&gt;
* ThinkPad {{X40}}&lt;br /&gt;
* ThinkPad {{X41T}}&lt;br /&gt;
* ThinkPad {{Z60t}} (fan levels RPM: 1-2 = ~1700, 3-5 = ~2800, 6-7 = ~3500)&lt;br /&gt;
* ThinkPad {{Z60m}} (fan levels like Z60t)&lt;br /&gt;
* ThinkPad {{Z61m}}&lt;br /&gt;
* Thinkpad {{Z61p}} (fan levels 0-7, auto, disengaged; enable, disable; watchdog (untested))&lt;br /&gt;
* ThinkPad {{X60}}&lt;br /&gt;
* ThinkPad {{A31}} (fan levels RPM: 0 = off, 1-2 = ~3280-3380 (!), 3-5 = ~3200, 6-7 = ~3380, &amp;quot;disengaged&amp;quot; = ~4000 (see NOTE above))&lt;br /&gt;
Probably other models are supported too (please update this page if you confirm this).&lt;br /&gt;
&lt;br /&gt;
==Models using a different interface==&lt;br /&gt;
&lt;br /&gt;
The following models also work, use a different access method which supported (only) via the {{path|/proc/acpi/ibm/fan}} of [[ibm-acpi]]. No need for patching.&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{600E}}, {{600X}}, {{770E}}, {{770X}} (these use a different fan control interface)&lt;br /&gt;
&lt;br /&gt;
==Unsupported models==&lt;br /&gt;
&lt;br /&gt;
* ThinkPad {{560}} (these models don't have a fan)&lt;/div&gt;</summary>
		<author><name>Alkos333</name></author>
		
	</entry>
</feed>