Bug 428284 - provide full featured powersaving under the usage of xen
Summary: provide full featured powersaving under the usage of xen
Status: VERIFIED WONTFIX
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: Xen (show other bugs)
Version: Final
Hardware: Other openSUSE 11.0
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Chunyan Liu
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-22 09:13 UTC by Elmar Stellnberger
Modified: 2010-08-23 05:34 UTC (History)
4 users (show)

See Also:
Found By: Community of Practice
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
testS3 (9.37 KB, application/octet-stream)
2008-10-28 03:18 UTC, James Song
Details
allow s2ram in spite of missing kernel support (835 bytes, patch)
2008-11-26 17:49 UTC, Elmar Stellnberger
Details | Diff
/usr/local/bin/video_post (79.29 KB, application/x-tgz)
2008-11-26 17:52 UTC, Elmar Stellnberger
Details
allow s2ram in spite of missing kernel support (868 bytes, text/x-diff)
2008-11-30 18:39 UTC, Elmar Stellnberger
Details
allow s2ram in spite of missing kernel support (889 bytes, text/x-diff)
2008-12-03 07:02 UTC, Elmar Stellnberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Stellnberger 2008-09-22 09:13:09 UTC
Nowadays virtualisation has become available and thereby even more and more demanded by desktop users (os-compatibility, security, keep old installation, etc.). Nevertheless in places where there is no absolute necessity to deploy it, usability and performance will clinch its deployment.
  Xen offering paravirtualistation would basically be the system of choice for reasons of performance and os-integration. Unfortunately, besides some usability issues like concerning a graphical user interface frontend, it will never be an alternative for the desktop user as long as it does not fully support powersaving modes or as long as the hardware support in common leaps back behind the one of -default kernels (hardware support is an issue to desktop users but not to the deployment on server systems).
Comment 1 Elmar Stellnberger 2008-09-22 09:26:37 UTC
 By default neither s2ram nor s2disk work.

  /usr/sbin/s2ram refuses its work because it can not find /proc/sys/kernel/acpi_video_flags. 
On my machine editing /usr/lib/pm-utils/functions.do_suspend() to issue 'echo -n mem >/sys/power/state' alongside manually restoring the video mode helps.

  Nevertheless s2disk neither seems to be supported by the kernel(1) nor does it work by setting 'shutdown method = reboot' in s2disk.conf (2):
(1)# cat /sys/power/state
mem
(2)# s2disk
Speicherzugriffsfehler (mem acess error)

Comment 2 Jan Beulich 2008-10-10 11:33:44 UTC
Suspend to disk (hibernate) is simply not supported (and so far there hasn't been serious upstream attempts at getting this to work). Suspend to RAM is supported by hypervisor and kernel, but I'm unclear whether the reamining infrastructure is in place.

Jim, I assume you know the state of the Xen tools in this respect. If they have all that's needed, component should simply be changed to 'Basesystem'
Comment 3 James Song 2008-10-14 03:24:49 UTC
in xen, Do S3 and S4 in guest os:
       - Guest OS: do itself's  s3
S3 --  - Dom0:      do itself's  s3 by echo "mem" >/sys/power/state
       - Xen:  save page table, save time... and write something to slp_typ of BIOS register.
        
       - Gusest OS: save something something to it's img.
S4 -- - Dom0: shutdown
       - xen: shutdown
Comment 4 James Song 2008-10-23 03:56:43 UTC
talk about the policy of S3/S4 in Guest OS :

      S3 in Guest OS:
                   - Guest OS: do itself's  s3
           S3 --  - Dom0:      do itself's  s3 by echo "mem" >/sys/power/state
                   - Xen:  save page table, save time... and write something to slp_typ of
BIOS register.
    question:
       1,  If we run many VMs, Does other VM also go into S3 state?
       2
Comment 5 James Song 2008-10-23 04:04:55 UTC
sorry for last uncompleted commit!

talk about the policy of S3/S4 in Guest OS :

      My proposed S3 in Guest OS:
                   - Guest OS: do itself's  s3
           S3 --  - Dom0:      do itself's  s3 by echo "mem" >/sys/power/state
                   - Xen:  save page table, save time... and write something to
slp_typ of BIOS register.
    question:
       1,  If we run many VMs, Does other VM also go into S3 state?
       2,  If "1" does, Does Dom0's need to go into S3 state?
                  
      My proposed S4 in Guest OS:
       - Gusest OS: save something something to it's img.
S4 -- - Dom0: shutdown
       - xen: shutdown
    question:
       1,  Does Dom0 need do it's own S4? 
       

 If anyone has some suggestion, pls don't hesitate to share!

 -- Tx
 -- James



Comment 6 James Song 2008-10-28 03:18:28 UTC
Created attachment 248238 [details]
testS3
Comment 7 James Song 2008-10-28 03:19:16 UTC
Because I have commucate with team about what kind of S3 need in SLES. Someone wants to get the feature which sles can make physical machine go into S3 when no guest os any more. So that I have written a programme to realize this feature.I have test it in SLED 11, pls see attachment. For OpenSUSE I still want to write a patch to realize S3 from GuestOS,but I still not sure which the policy I'll select in case of more than one guest os in system. Otherwise we can define some policies left to user to choose.
Comment 9 Lance Gardner 2008-11-23 09:52:06 UTC
As seen below he powersave support is not built into the XEN kernel.

Is there any reason why?


# egrep "FREQ|Frequency" /boot/config-2.6.25.16-0.1-xen 

# CPU Frequency scaling



# egrep "FREQ|Frequency" /boot/config-2.6.25.16-0.1-default 

# CPU Frequency scaling
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set

Comment 10 Jan Beulich 2008-11-24 09:26:44 UTC
Because it doesn't (generally) work that way? That's being taken care of in 11.1/SLE11, where cpufreq handling happens in the hypervisor (but the repsective kernel config options continue to not be available).
Comment 11 Elmar Stellnberger 2008-11-26 17:49:17 UTC
Created attachment 255913 [details]
allow s2ram in spite of missing kernel support

  This patch alters /usr/lib/pm-utils/functions to issue a manual s2ram mainly by issuing "echo -n mem >/sys/power/state" if /usr/sbin/s2ram refuses to work because of missing kernel support for /proc/sys/kernel/acpi_video_flags.
  By now it is configured to call /usr/local/bin/video_post instead of vbetool post & vbetool vbemode set "$(state)". At me vbetool works well just as long as I do not use the xen-kernel. Nonetheless /usr/local/bin/video_post does its job.
Comment 12 Elmar Stellnberger 2008-11-26 17:52:28 UTC
Created attachment 255914 [details]
/usr/local/bin/video_post

Instead of running video_post, temporarily invoking X on an unused vt works as well (invoke and quit X directly afterwards).
Comment 13 Elmar Stellnberger 2008-11-30 18:39:51 UTC
Created attachment 256810 [details]
allow s2ram in spite of missing kernel support

The s2ram workaround must not be applied if no xen kernel is booted (crash). Apparently when using a xen kernel a totally different s2ram approach is required.
Comment 14 Elmar Stellnberger 2008-12-03 07:02:38 UTC
Created attachment 257583 [details]
allow s2ram in spite of missing kernel support

forgot to incorporate all changes into patch-file
Comment 15 Elmar Stellnberger 2009-02-03 11:24:37 UTC
.
Comment 16 Elmar Stellnberger 2009-09-09 09:42:51 UTC
  Unfortunately the posted s2ram-qirk does not work for Opensuse 11.2, MS6, any more. Support for sdisk is out of sight; VMWare does not install (Bug 537636).
 That is why I wanna propose better support for qemu-kvm, as this can provide all the desktop user needs: Bug 537082.
Comment 18 Chunyan Liu 2010-08-23 05:34:46 UTC
Close it since this feature is not supported by xen yet. It's better to submit a FEATURE if it's supposed to be important.