[2.5] - Supplimental fix to ACPI_SLEEP & SOFTWARE_SUSPEND compile issue
RFC PATCH 1/1 [2.5] - Supplimental fix to ACPI_SLEEP & SOFTWARE_SUSPEND compile issue
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch should fix remaining issues regarding compiling ACPI Sleep states with Software suspend. You need to enable ACPI_SLEEP in config to use software suspend.
The problem is, kbuild doesn't seem to allow this (right?). if ACPI_SLEEP is enabled it will allow you to select SOFTWARE_SUSPEND but if you uncheck SOFTWARE_SUSPEND it doesn't disable ACPI_SLEEP which
IMHO it should not be because sleeping the system doesn't always mean power off. Standby might be a sleep state too.
Here's the patch, please comment :)
Shawn.
- From Pavel:
Quoted 4 lines
Quoted 4 lines
Could you make it so that
CONFIG_ACPI_SLEEPis not selectable withoutCONFIG_SOFTWARE_SUSPENDand moveCONFIG_SOFTWARE_SUSPENDinto "power managment" submenu?
Pavel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE94EJQePHb7Xli5GsRAiYgAJ0ZQYfqCSKn+IL6VPeym44mgUbF8gCfW30a u03BGOgvMjFwIJ5EoF4ByR8=
=kv0+
-----END PGP SIGNATURE-----
arch/i386/Kconfig +0 -29
@@ -1516,35 +1516,6 @@ source "arch/i386/oprofile/Kconfig" menu "Kernel hacking" -config SOFTWARE_SUSPEND - bool "Software Suspend (EXPERIMENTAL)" - depends on EXPERIMENTAL && PM - ---help--- - Enable the possibilty of suspendig machine. It doesn't need APM. - You may suspend your machine by 'swsusp' or 'shutdown -z <time>' - (patch for sysvinit needed). - - It creates an image which is saved in your active swaps. By the next - booting the, pass 'resume=/path/to/your/swap/file' and kernel will - detect the saved image, restore the memory from - it and then it continues to run as before you've suspended. - If you don't want the previous state to continue use the 'noresume' - kernel option. However note that your partitions will be fsck'd and - you must re-mkswap your swap partitions/files. - - Right now you may boot without resuming and then later resume but - in meantime you cannot use those swap partitions/files which were - involved in suspending. Also in this case there is a risk that buffers - on disk won't match with saved ones. - - SMP is supported ``as-is''. There's a code for it but doesn't work. - There have been problems reported relating SCSI. - - This option is about getting stable. However there is still some - absence of features. - - For more information take a look at Documentation/swsusp.txt. - config DEBUG_KERNEL bool "Kernel debugging" help
drivers/acpi/Kconfig +30 -0
@@ -76,6 +76,36 @@ config ACPI_SLEEP This option is not recommended for anyone except those doing driver power management development. +config SOFTWARE_SUSPEND + bool "Software Suspend (EXPERIMENTAL)" + depends on EXPERIMENTAL && X86 && ACPI && ACPI_SLEEP && !ACPI_HT_ONLY + default y + ---help--- + Enable the possibilty of suspendig machine. It doesn't need APM. + You may suspend your machine by 'swsusp' or 'shutdown -z <time>' + (patch for sysvinit needed). + + It creates an image which is saved in your active swaps. By the next + booting the, pass 'resume=/path/to/your/swap/file' and kernel will + detect the saved image, restore the memory from + it and then it continues to run as before you've suspended. + If you don't want the previous state to continue use the 'noresume' + kernel option. However note that your partitions will be fsck'd and + you must re-mkswap your swap partitions/files. + + Right now you may boot without resuming and then later resume but + in meantime you cannot use those swap partitions/files which were + involved in suspending. Also in this case there is a risk that buffers + on disk won't match with saved ones. + + SMP is supported ``as-is''. There's a code for it but doesn't work. + There have been problems reported relating SCSI. + + This option is about getting stable. However there is still some + absence of features. + + For more information take a look at Documentation/swsusp.txt. + config ACPI_AC tristate "AC Adapter" depends on X86 && ACPI && !ACPI_HT_ONLY
This still has problems. Unless kbuild can force an option always on when another dependency is selected. You will get compile errors.
Solutions?
Quoted 19 lines · Shawn Starr
This patch should fix remaining issues regarding compiling ACPI Sleep states with Software suspend. You need to enable
ACPI_SLEEPin config to use software suspend.The problem is, kbuild doesn't seem to allow this (right?). if
ACPI_SLEEPis enabled it will allow you to selectSOFTWARE_SUSPENDbut if you uncheckSOFTWARE_SUSPENDit doesn't disableACPI_SLEEPwhich IMHO it should not be because sleeping the system doesn't always mean power off. Standby might be a sleep state too.Here's the patch, please comment :)
Shawn.
From Pavel:
Quoted 4 lines
Quoted 4 lines
Could you make it so that
CONFIG_ACPI_SLEEPis not selectable withoutCONFIG_SOFTWARE_SUSPENDand moveCONFIG_SOFTWARE_SUSPENDinto "power managment" submenu?
Pavel