You are not logged in.

#1 2010-07-09 01:44:51

onguarde
Member
Registered: 2008-09-14
Posts: 144

pm-hibernate thaws up immediately if virtualbox xp guest is running

Peace ppl!

i'm on kernel26-ice 2.6.34-2 using tuxonice on pm-utils.
XP SP3 running as guest on virtualbox_bin 3.2.6-1.
Issue present with or without intel vtx enabled. pm-hibernate works fine if virtualbox is not running.

pm-suspend works fine.

Log file shows nothing fishy. It appears to hibernate successfully. Only problem is it doesn't shut down after hibernating.

/usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:

/usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate:

/usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: success.
Running hook /etc/pm/sleep.d/10suspend hibernate hibernate:
Hey guy, we are going to suspend to disk!

/etc/pm/sleep.d/10suspend hibernate hibernate: success.
Running hook /etc/pm/sleep.d/11netcfg hibernate hibernate:

/etc/pm/sleep.d/11netcfg hibernate hibernate: success.
Running hook /etc/pm/sleep.d/11suspend hibernate hibernate:

/etc/pm/sleep.d/11suspend hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate:

/usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate: success.
Running hook /etc/pm/sleep.d/55NetworkManager hibernate hibernate:

/etc/pm/sleep.d/55NetworkManager hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:

/usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:

/usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/91wicd hibernate hibernate:

/usr/lib/pm-utils/sleep.d/91wicd hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:

/usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:

/usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
Kernel modesetting video driver detected, not using quirks.

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:

/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
Fri Jul  9 01:23:19 SGT 2010: performing hibernate
Fri Jul  9 01:23:34 SGT 2010: Awake.
Fri Jul  9 01:23:34 SGT 2010: Running hooks for thaw

Running hook /usr/lib/pm-utils/sleep.d/99video thaw hibernate:

/usr/lib/pm-utils/sleep.d/99video thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate:

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led thaw hibernate:

/usr/lib/pm-utils/sleep.d/95led thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate:

/usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/91wicd thaw hibernate:

/usr/lib/pm-utils/sleep.d/91wicd thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock thaw hibernate:

/usr/lib/pm-utils/sleep.d/90clock thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules thaw hibernate:
Reloaded unloaded modules.

/usr/lib/pm-utils/sleep.d/75modules thaw hibernate: success.
Running hook /etc/pm/sleep.d/55NetworkManager thaw hibernate:

/etc/pm/sleep.d/55NetworkManager thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate:

/usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate: success.
Running hook /etc/pm/sleep.d/11suspend thaw hibernate:

/etc/pm/sleep.d/11suspend thaw hibernate: success.
Running hook /etc/pm/sleep.d/11netcfg thaw hibernate:

/etc/pm/sleep.d/11netcfg thaw hibernate: success.
Running hook /etc/pm/sleep.d/10suspend thaw hibernate:
oh,suspend to disk is over, we are resuming...

/etc/pm/sleep.d/10suspend thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub thaw hibernate:

/usr/lib/pm-utils/sleep.d/01grub thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave thaw hibernate:

/usr/lib/pm-utils/sleep.d/00powersave thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging thaw hibernate:

/usr/lib/pm-utils/sleep.d/00logging thaw hibernate: success.
Fri Jul  9 01:24:00 SGT 2010: Finished.

From the bold part, it seems there was an interval between successful hibernation and waking up.

Another issue is, irrelevant hooks which seems to be running. Like 11netcgfg and 55NetworkManager which I'm no longer using right now; replaced with wicd. 'touching' a file with the same name in /etc/pm/sleep.d, as per wiki, doesn't seem to work.
From opensus wiki,

Do not set the executable bit on that dummy-hook. (Seems that on openSUSE 11.2 you have to set the execution bit in order to work).

Anyhow, setting chmod 755 to all of the files in /etc/pm/sleep.d doesn't seem to help; log file still the same.
However, everything seems to work fine regardless so shouldn't be to bothered I guess.

Thanks in advance!

Offline

#2 2010-07-10 05:25:08

onguarde
Member
Registered: 2008-09-14
Posts: 144

Re: pm-hibernate thaws up immediately if virtualbox xp guest is running

Hmm.. from the lack of replies, is it correct to infer that for most people, hibernating with virtualbox still running is no problem at all?

I wonder what I'm doing wrong...

Offline

#3 2010-07-10 05:55:44

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: pm-hibernate thaws up immediately if virtualbox xp guest is running

Most likely, most people wouldn't want virtualbox running when hibernating. Its a big memory hog, and considering that hibernating basically consists of copying the contents of memory to the hard disk (slow) and then copying it back (slightly faster) when thawing, it doesn't really make very much sense.

Why not just suspend?

In any case, you could try pausing your vbox machine before hibernating. One of the issues I can imagine would be that the machine is taking up some resource on your machine by directly accessing it, thus not allowing hibernation.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2010-07-12 01:54:14

onguarde
Member
Registered: 2008-09-14
Posts: 144

Re: pm-hibernate thaws up immediately if virtualbox xp guest is running

Thanks for the reply!

The issue with suspending is I can't go without a battery. Also, I used to pause the guest first before hibernating previously. It delays the procedure quite a bit.

Good news is, it seems to be working now. Tried several things; not sure which helped.

Created a new profile; the name has to be without spaces. From "Windows XP" back to just "XP" as it was previously.
http://lists.tuxonice.net/pipermail/tux … 05981.html

Deleted/moved unusued hooks directly from /usr/lib/pm-utils/sleep.d . Can't disable it as per wiki's "touch" method.

Removed personal hooks from /etc/sleep.d. Interesting thing is audio and xmodmap settings are restored automatically now without custom hooks.
http://bbs.archlinux.org/viewtopic.php?id=88369

Reenabled desktop effects in kde4 and vsync.

Hope this helps ..

ps. those old timers on virtualbox still using the default ide controller should "upgrade" their guest controller to SATA for better speeds. On XP guest, just add the SATA controller, boot up to detect and install drivers, shut down and switch the drive(.vdi file) to the SATA controller and see how much faster XP boots.
Note that you need to install drivers first else you won't be able to boot up. On newer versions, I think you can skip downloading drivers from intel; windows will autodetect them.

http://matt.bottrell.com.au/archives/26 … mance.html
http://forums.virtualbox.org/viewtopic.php?t=7177

Offline

#5 2010-07-13 17:05:14

onguarde
Member
Registered: 2008-09-14
Posts: 144

Re: pm-hibernate thaws up immediately if virtualbox xp guest is running

Hmm.... I think I made a faulty diagnosis. The issue is STILL present despite the above tweaks.

After several tests using both pm-utils & hibernate-scripts -> (allows finer tweaking specific to tuxonice) , ....

I've pinpointed the problem to virtualbox xp guest having an assigned memory of greater than 1.3gb. In this setup, no matter how big your swap is, eg. 35gb, tuxonice will still spit out this error:

dmesg log (totally forgot about this log initially)

Failed to prepare the image because...
- The maximum number of iterations was reached without successfully preparing the image.
- We need to free 32956 lowmem pageset 1 pages.
Cleaning up...
Restarting all filesystems ...
Restarting tasks ... Restarting tasks ... done.
video LNXVIDEO:00: Restoring backlight state
TuxOnIce debugging info:
- TuxOnIce core  : 3.1.1.1
- Kernel Version : 2.6.34-ice
- Compiler vers. : 4.5
- Attempt number : 5
- Parameters     : 4225 667656 0 1 0 0
- Overall expected compression percentage: 0.
- Compressor is 'lzo'.
- Block I/O active.
  Used 0 pages from swap on /dev/sda4.
- Max outstanding reads 1. Max writes 0.
  Memory_needed: 1024 x (4096 + 320 + 104) = 4628480 bytes.
  Free mem throttle point reached 0.
- Swap Allocator enabled.
  Swap available for image: 3808820 pages.
- File Allocator active.
  Storage available for image: 0 pages.
- No I/O speed stats available.
- Extra pages    : 161 used/2000.
- Result         : Hibernation was aborted.
                 : Unable to free enough memory to hibernate.
                 : We were unable to successfully prepare an image.

ata1: hard resetting link
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)

I isolated the problem to virtualbox by maxing out my ram with other applications beside virtualbox; up to 80 percent application data in kde4's "memory" application. It still hibernates fine.

With Vbox xp guest 1gb ram - successful run

TuxOnIce debugging info:
- TuxOnIce core  : 3.1.1.1
- Kernel Version : 2.6.34-ice
- Compiler vers. : 4.5
- Attempt number : 17
- Parameters     : 0 667656 0 1 100000000 5
- Overall expected compression percentage: 0.
- Compressor is 'lzo'.
  Compressed 2360668160 bytes into 607041401 (74 percent compression).
- Block I/O active.
  Used 150418 pages from swap on /dev/sda4.
- Max outstanding reads 693. Max writes 690.
  Memory_needed: 1024 x (4096 + 320 + 104) = 4628480 bytes.
  Free mem throttle point reached 0.
- Swap Allocator enabled.
  Swap available for image: 3699065 pages.
- File Allocator active.
  Storage available for image: 0 pages.
- I/O speed: Write 89 MB/s, Read 82 MB/s.
- Extra pages    : 0 used/20000.
- Result         : Succeeded.

Useful commands
List swap space activated.
swapon -s

Useful references

http://wiki.archlinux.org/index.php/Tuxonice

As of the latest version of TuxOnIce (3.0.99.44), adding the kernel resume parameter is no longer necessary, it will autodetect if your swap drive contains a bootable image. You only need to set the swap method appropriately

which means, you can remove the resume="bla bla" parameter from /boot/grub/menu.lst

http://en.gentoo-wiki.com/wiki/TuxOnIce
Check out the "TuxOnIce Hotkeys" section.

http://www.tuxonice.net/FAQ-5.html
Check out the drop_caches section.

http://www.tuxonice.net/HOWTO-4.html
Sysfs interface options.
You can even echo values directly to /sys/power/tuxonice/ but it won't last the boot.

Hope this helps.

Last edited by onguarde (2010-07-13 17:25:47)

Offline

#6 2010-07-13 19:08:27

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: pm-hibernate thaws up immediately if virtualbox xp guest is running

onguarde wrote:

ps. those old timers on virtualbox still using the default ide controller should "upgrade" their guest controller to SATA for better speeds. On XP guest, just add the SATA controller, boot up to detect and install drivers, shut down and switch the drive(.vdi file) to the SATA controller and see how much faster XP boots.
Note that you need to install drivers first else you won't be able to boot up. On newer versions, I think you can skip downloading drivers from intel; windows will autodetect them.

thanks for this!


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB