|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Resuming after hibernateResuming does not work for my laptop after it hibernates - OS boots
normally and does not use resume image created by s2disk. Linux 2.6.30-gentoo-r8 i686 Kernel command line: root=/dev/sda6 vga=0x317 video=vesafb:mtrr:3,ywrap resume=swap:/dev/sda5 # cat /usr/src/linux/.config | grep CONFIG_PM_STD_PARTITION CONFIG_PM_STD_PARTITION="/dev/sda5" sys-power/hibernate-script-2.0-r1 sys-power/suspend-0.8-r1 To suspend laptop I uses 'hibernate' command which uses s2disk tool # cat /etc/suspend.conf snapshot device = /dev/snapshot resume device = /dev/sda5 When the system boots up: * Activating (possible) swap ... swapon: /dev/sda5: Invalid argument .... * Invalidating stale software suspend images ... /sda5 It looks like that kernel knows nothing about suspend image and does not use it. Any ideas? Thanks. -- Sergey |
|
|
Re: Resuming after hibernate Why do you need anything in the kernel commandlindline? Everything is
done either in the kernel config or in hibernate.conf. "make menuconfig" on my machine goes like so... ========================================= Power management and ACPI options ---> [*] Power Management support [ ] Power Management Debug Support [ ] Suspend to RAM and standby [*] Hibernation (aka 'suspend to disk') (/dev/sda6) Default resume partition ========================================= Your system should have /dev/sda5. I ran "emerge hibernate-script" and then executed "rc-update add hibernate-cleanup boot" so that when the machine comes up from "reboot" or "halt -p", it doesn't try to load the swap file as memory state. Here are the uncommented lines in my hibernate.conf. The last 4 lines are specific to my machine, and may not apply to yours. It works great for me. TryMethod disk.conf Distribution gentoo DownInterfaces auto PowerdownMethod shutdown UseSysfsPowerState disk UpInterfaces auto OnResume 99 chvt 1 OnResume 98 setfont lat1-10 OnResume 97 /etc/init.d/sshd restart OnResume 96 alsactl restore -- Walter Dnes <waltdnes@...> |
|
|
Re[2]: Resuming after hibernateMonday, November 9, 2009, 5:39:46 PM, Walter wrote:
> Why do you need anything in the kernel commandlindline? Everything is > done either in the kernel config or in hibernate.conf. "make menuconfig" > on my machine goes like so... > ========================================= > Power management and ACPI options ---> > [*] Power Management support > [ ] Power Management Debug Support > [ ] Suspend to RAM and standby > [*] Hibernation (aka 'suspend to disk') > (/dev/sda6) Default resume partition > ========================================= I have same settings in my kernel too: CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_HIBERNATION=y CONFIG_PM_STD_PARTITION="/dev/sda5" Just added the 'resume=swap:/dev/sda5' to grub.con to be 100% sure it's not a kernel bug. > Your system should have /dev/sda5. I ran "emerge hibernate-script" > and then executed "rc-update add hibernate-cleanup boot" so that when > the machine comes up from "reboot" or "halt -p", it doesn't try to load > the swap file as memory state. I did this too. Also I emerged sys-power/suspend because without this tool hibernate-ram does not work for me (display is blank after resuming). > Here are the uncommented lines in my hibernate.conf. The last 4 lines > are specific to my machine, and may not apply to yours. It works great > for me. > TryMethod disk.conf > Distribution gentoo > DownInterfaces auto > PowerdownMethod shutdown > UseSysfsPowerState disk > UpInterfaces auto > OnResume 99 chvt 1 > OnResume 98 setfont lat1-10 > OnResume 97 /etc/init.d/sshd restart > OnResume 96 alsactl restore /etc/hibernate/common.conf: Verbosity 0 LogFile /var/log/hibernate.log LogVerbosity 1 Distribution gentoo SaveClock restore-only UnloadBlacklistedModules yes LoadModules auto SwitchToTextMode yes /etc/hibernate/hibernate.conf: TryMethod tuxonice.conf TryMethod disk.conf TryMethod ram.conf cat /etc/hibernate/disk.conf TryMethod ususpend-disk.conf TryMethod sysfs-disk.conf /etc/hibernate/ususpend-disk.conf: USuspendMethod disk Include common.conf Btw, am I right pressing 'power' button to resume from suspend to disk? -- Sergey |
|
|
Re[2]: Resuming after hibernateBtw, s2disk is user-level tool. According to http://wiki.archlinux.org/index.php/Suspend_to_Disk
initrd image is required to resume from image created by s2disk tool, but I don't use initrd. Maybe this is a reason? Probably I need switch to native swsusp?.. Monday, November 9, 2009, 5:39:46 PM, Walter wrote: > Why do you need anything in the kernel commandlindline? Everything is > done either in the kernel config or in hibernate.conf. "make menuconfig" > on my machine goes like so... > ========================================= > Power management and ACPI options ---> > [*] Power Management support > [ ] Power Management Debug Support > [ ] Suspend to RAM and standby > [*] Hibernation (aka 'suspend to disk') > (/dev/sda6) Default resume partition > ========================================= > Your system should have /dev/sda5. I ran "emerge hibernate-script" > and then executed "rc-update add hibernate-cleanup boot" so that when > the machine comes up from "reboot" or "halt -p", it doesn't try to load > the swap file as memory state. > Here are the uncommented lines in my hibernate.conf. The last 4 lines > are specific to my machine, and may not apply to yours. It works great > for me. > TryMethod disk.conf > Distribution gentoo > DownInterfaces auto > PowerdownMethod shutdown > UseSysfsPowerState disk > UpInterfaces auto > OnResume 99 chvt 1 > OnResume 98 setfont lat1-10 > OnResume 97 /etc/init.d/sshd restart > OnResume 96 alsactl restore -- Sergey |
|
|
Re: Resuming after hibernateOn Mon, 2009-11-09 at 10:39 -0500, Walter Dnes wrote:
> Here are the uncommented lines in my hibernate.conf. The last 4 lines > are specific to my machine, and may not apply to yours. It works great > for me. ... > OnResume 97 /etc/init.d/sshd restart how come? To kill any stale ssh connections? I find that they clean themselves up fairly well. In fact, if I hibernate and resume in enough time, an existing ssh won't be disconnected (and still works). -- Iain Buchanan <iaindb at netspace dot net dot au> COBOL is for morons. -- E.W. Dijkstra |
|
|
Re: Resuming after hibernateOn Tue, Nov 10, 2009 at 08:58:13AM +0930, Iain Buchanan wrote
> On Mon, 2009-11-09 at 10:39 -0500, Walter Dnes wrote: > > > OnResume 97 /etc/init.d/sshd restart > > how come? To kill any stale ssh connections? I find that they clean > themselves up fairly well. In fact, if I hibernate and resume in > enough time, an existing ssh won't be disconnected (and still works). I find that for some reason sshd doesn't restart on resume. I tested it 2 minutes ago... - ssh from my laptop... OK - disconnect - comment out the OnResume statement - hibernate the desktop - resume the desktop - ssh from my laptop... Connection refused - manually enter "/etc/init.d/sshd restart" (as root) - ssh from my laptop... OK - and remember to uncomment the OnResume For that matter, the console font setting is forgotten as well. I have VGA=6 in lilo.conf (probably works in GRUB as well), which defaults to an unreadable 80 columns x 60 rows display. This is done by selecting the 640 pixels by 480 scanlines mode, and the 8-pixel high font. 480 / 8 = 60 rows. Selecting 10-pixel high font gets 480 / 10 = 48 rows (YES!). And thanks to the extra pixels, the font is *MUCH* nicer than standard 80 x 50 (using 8-pixel high font with 400 scanlines). No 2 ways about it, 10-pixel high font beats out 8-pixel high font on a text console every time. -- Walter Dnes <waltdnes@...> |
|
|
Re: Resuming after hibernateOn Mon, 2009-11-09 at 22:37 -0500, Walter Dnes wrote:
... > I find that for some reason sshd doesn't restart on resume. I tested > it 2 minutes ago... weird... is networkmanager getting in the way? I also have rc_depend_strict="NO" in /etc/rc.conf ... > For that matter, the console font setting is forgotten as well. I > have VGA=6 in lilo.conf (probably works in GRUB as well), which defaults > to an unreadable 80 columns x 60 rows display. Did I read that right? You have a setting in lilo.conf that makes your font unreadable? Then why do you have that in lilo.conf? -- Iain Buchanan <iaindb at netspace dot net dot au> Nirvana? That's the place where the powers that be and their friends hang out. -- Zonker Harris |
|
|
Re: Re[2]: Resuming after hibernateOn Mon, 2009-11-09 at 18:16 +0200, Sergey Kobzar wrote:
> Btw, s2disk is user-level tool. According to http://wiki.archlinux.org/index.php/Suspend_to_Disk > initrd image is required to resume from image created by s2disk tool, > but I don't use initrd. > > Maybe this is a reason? Probably I need switch to native swsusp?.. what about the normal `hibernate` script? I'm not exactly sure what s2disk is, and I've never used it... -- Iain Buchanan <iaindb at netspace dot net dot au> Neurotics build castles in the sky, Psychotics live in them, And psychiatrists collect the rent. |
|
|
Re: Resuming after hibernateOn Wed, Nov 11, 2009 at 08:18:11AM +0930, Iain Buchanan wrote
> Did I read that right? You have a setting in lilo.conf that makes > your font unreadable? Then why do you have that in lilo.conf? You didn't read the entire post. The *DEFAULT* result of 'VGA=6' in /etc/lilo.conf gives an 8x8 font which results in an 80x60 display. *IN ADDITION* I set 'CONSOLEFONT="lat1-10"' in /etc/conf.d/consolefont, which gives me an 80x48 row display, using 8x10 font, which is *MUCH* nicer than 8x8 font. The reason I do 'VGA=6' in /etc/lilo.conf is because that is a quick-n-dirty way to kick the display into a 480 scanline mode, instead of the default 400 scanline mode. It's a lot safer and easier than screwing around with SVGATextmode (is it still around?). Anyhow, upon resuming from hibernation, Gentoo remembers the 480 scanline mode, but does not remember the non-default font, which is why I have to reset the font via the OnResume option. -- Walter Dnes <waltdnes@...> |
| Free embeddable forum powered by Nabble | Forum Help |