Trying to suspend to mem with X started and the nvidia module loaded I got this error. NVRM: ACPI: unsupported event: 2 Could not suspend device 0000:01:00.0: error -1 Some devices failed to suspend Googling around I found this bug report to Debian http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=339329 which points out that the kernel defines for pm events changed from 2.6.14. This is the git changelog for the patch. diff-tree ca078bae813dd46c0f9b102fdfb4a3384641ff48 (from 829ca9a30a2ddb727981d80fabdbff2ea8 Author: Pavel Machek <pavel@ucw.cz> Date: Sat Sep 3 15:56:57 2005 -0700 [PATCH] swsusp: switch pm_message_t to struct This adds type-checking to pm_message_t, so that people can't confuse it with int or u32. It also allows us to fix "disk yoyo" during suspend (disk spinning down/up/down). [We've tried that before; since that cpufreq problems were fixed and I've tried make allyes config and fixed resulting damage.] Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Alexander Nyberg <alexn@telia.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> This is the relevant part of the patch --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -186,7 +186,9 @@ extern int pm_suspend(suspend_state_t st struct device; -typedef u32 __bitwise pm_message_t; +typedef struct pm_message { + int event; +} pm_message_t; /* * There are 4 important states driver can be in: @@ -207,9 +209,13 @@ typedef u32 __bitwise pm_message_t; * or something similar soon. */ -#define PMSG_FREEZE ((__force pm_message_t) 3) -#define PMSG_SUSPEND ((__force pm_message_t) 3) -#define PMSG_ON ((__force pm_message_t) 0) +#define PM_EVENT_ON 0 +#define PM_EVENT_FREEZE 1 +#define PM_EVENT_SUSPEND 2 + +#define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) +#define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) +#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) struct dev_pm_info { pm_message_t power_state; As a result suspend to RAM doesn't work anymore. This is the compilation warning showing the the .suspend function is not compatible with new kernels. /var/tmp/portage/nvidia-kernel-1.0.7676-r1/work/NVIDIA-Linux-x86-1.0-7676-pkg0/usr/src/nv/nv.c:265: warning: initialization from incompatible pointer type. Besides this (it would still work because the new struct contains only an int instead of the old u32) nv.c check for the old constants PM_SUSPEND_* instead of the new PM_EVENT_* ones, giving the error above for PM_EVENT_SUSPEND. If no patch for nv.c is already available (I searched by I found no bugs) I will'try to build one (that posted in the Debian bug will not work if the struct changes again).
Created attachment 73991 [details, diff] nv.c patch for suspend to RAM on 2.6.15 This patch seem to work on vanilla 2.6.15-rc4
Seems that it has been solved in media-video/nvidia-kernel-1.0.8174-r1 (see bug #114640)
*** This bug has been marked as a duplicate of 114640 ***