* Suspend/resume to disk problem
@ 2005-01-03 1:20 Francisco Martins
2005-01-03 17:24 ` Barry K. Nathan
0 siblings, 1 reply; 3+ messages in thread
From: Francisco Martins @ 2005-01-03 1:20 UTC (permalink / raw)
To: linux-kernel; +Cc: Francisco Martins
Hi all,
I'm using Debian GNU/linux 3.1 with kernel 2.6.10 on my IBM Thinkpad
R40, and I'm experiencing a strange problem with suspend to disk.
If I configure the kernel options
#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION="/dev/hda5",
issuing
echo platform > /sys/kernel/disk
echo disk > /sys/kernel/state
always results in error:
swsusp: FATAL: cannot find swap device, try swapon -a!
My swap partition was on, as can be confirmed by
(output from free)
total used free shared buffers cached
Mem: 515836 469716 46120 0 35588 220672
-/+ buffers/cache: 213456 302380
Swap: 763520 0 763520
(cat /proc/swaps)
Filename Type Size Used
Priority
/dev/hda5 partition 763520 0
-1
So, after searching with no luck for help in google, I looked at in the
source code for kernel/power/swsusp.c
The problem seems to be in function "is_resume_device"
static int is_resume_device(const struct swap_info_struct *swap_info)
...
return S_ISBLK(inode->i_mode) &&
resume_device == MKDEV(imajor(inode), iminor(inode));
}
The resume_device variable is not initialised at this stage and
has the value zero, which is different from MKDEV(...)
Can you please check this out?
I was able to suspend to disk by setting CONFIG_PM_STD_PARTITION="", but
I cannot resume.
Again, resume_device is set to 0 in function swsusp_read after
resume_device = name_to_dev_t(resume_file);
and therefore, it is not possible to open the swap device and
resume_bdev = open_by_devnum(resume_device, FMODE_READ);
returns an error, aborting the resume process.
I check that resume_file is correctly set to "/dev/hda5" by
the resume_setup function form disk.c
Thanks for you attention,
Cheers,
Francisco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Suspend/resume to disk problem
2005-01-03 1:20 Suspend/resume to disk problem Francisco Martins
@ 2005-01-03 17:24 ` Barry K. Nathan
2005-01-03 19:47 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Barry K. Nathan @ 2005-01-03 17:24 UTC (permalink / raw)
To: Francisco Martins; +Cc: linux-kernel
On Mon, Jan 03, 2005 at 01:20:28AM +0000, Francisco Martins wrote:
> Hi all,
>
> I'm using Debian GNU/linux 3.1 with kernel 2.6.10 on my IBM Thinkpad
> R40, and I'm experiencing a strange problem with suspend to disk.
>
> If I configure the kernel options
> #
> # Power management options (ACPI, APM)
> #
> CONFIG_PM=y
> # CONFIG_PM_DEBUG is not set
> CONFIG_SOFTWARE_SUSPEND=y
> CONFIG_PM_STD_PARTITION="/dev/hda5",
AFAIK the typical way people do it (or at least what I'm doing, which
isn't hitting this bug) is to set CONFIG_PM_STD_PARTITION to "" then to
add (in your case) "resume=/dev/hda5" to the kernel boot command line.
This won't really fix your bug, but it should let you use swsusp in the
meantime.
-Barry K. Nathan <barryn@pobox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Suspend/resume to disk problem
2005-01-03 17:24 ` Barry K. Nathan
@ 2005-01-03 19:47 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2005-01-03 19:47 UTC (permalink / raw)
To: Barry K. Nathan; +Cc: Francisco Martins, linux-kernel
Hi!
> > I'm using Debian GNU/linux 3.1 with kernel 2.6.10 on my IBM Thinkpad
> > R40, and I'm experiencing a strange problem with suspend to disk.
> >
> > If I configure the kernel options
> > #
> > # Power management options (ACPI, APM)
> > #
> > CONFIG_PM=y
> > # CONFIG_PM_DEBUG is not set
> > CONFIG_SOFTWARE_SUSPEND=y
> > CONFIG_PM_STD_PARTITION="/dev/hda5",
>
> AFAIK the typical way people do it (or at least what I'm doing, which
> isn't hitting this bug) is to set CONFIG_PM_STD_PARTITION to "" then to
> add (in your case) "resume=/dev/hda5" to the kernel boot command line.
>
> This won't really fix your bug, but it should let you use swsusp in the
> meantime.
Perhaps its time for CONFIG_PM_STD_PARTITION to go away?
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-03 19:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-03 1:20 Suspend/resume to disk problem Francisco Martins
2005-01-03 17:24 ` Barry K. Nathan
2005-01-03 19:47 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).