Hello community,
here is the log from the commit of package suspend
checked in at Mon Jul 30 18:57:34 CEST 2007.
--------
--- arch/i386/suspend/suspend.changes 2007-07-20 14:43:27.000000000 +0200
+++ /mounts/work_src_done/STABLE/suspend/suspend.changes 2007-07-30 14:23:05.000000000 +0200
@@ -1,0 +2,10 @@
+Mon Jul 30 14:20:12 CEST 2007 - seife@suse.de
+
+- update to current cvs:
+ - whitelist updates
+ - some small changes in button handling during suspend to disk,
+ press "r" for reboot instead of shutdown
+- suspend framebuffers during suspend to RAM, might help with some
+ of those NOFB entries.
+
+-------------------------------------------------------------------
Old:
----
suspend-0.50.20070719.tar.bz2
New:
----
suspend-0.50.20070730.tar.bz2
suspend-s2ram-suspend-fbcon.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ suspend.spec ++++++
--- /var/tmp/diff_new_pack.y31099/_old 2007-07-30 18:57:09.000000000 +0200
+++ /var/tmp/diff_new_pack.y31099/_new 2007-07-30 18:57:09.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package suspend (Version 0.50.20070719)
+# spec file for package suspend (Version 0.50.20070730)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,8 +12,8 @@
Name: suspend
BuildRequires: gnutls-devel libx86-devel pciutils-devel splashy-devel
-Version: 0.50.20070719
-Release: 2
+Version: 0.50.20070730
+Release: 1
Summary: A Set Of Tools To Support Sleep Modes
License: GPL v2 or later
URL: http://sourceforge.net/projects/suspend
@@ -26,6 +26,7 @@
Patch2: suspend-susescripts.diff
Patch3: suspend-default-compress.diff
Patch4: suspend-disable-bootsplash.diff
+Patch5: suspend-s2ram-suspend-fbcon.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
Supplements: powersave
@@ -50,6 +51,7 @@
%patch2 -p0
%patch3 -p0
%patch4 -p0
+%patch5 -p0
cp %{S:3} scripts/
#cp -vb --suffix=-0.5 %{S:99} whitelist.c
@@ -97,6 +99,13 @@
%doc doc/installation-on-SUSE-10.1.txt scripts/
%changelog
+* Mon Jul 30 2007 - seife@suse.de
+- update to current cvs:
+ - whitelist updates
+ - some small changes in button handling during suspend to disk,
+ press "r" for reboot instead of shutdown
+- suspend framebuffers during suspend to RAM, might help with some
+ of those NOFB entries.
* Fri Jul 20 2007 - hmacht@suse.de
- build with splashy support
- enable dynamic linking for the resume binary
++++++ suspend-0.50.20070719.tar.bz2 -> suspend-0.50.20070730.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-0.50.20070719/Makefile new/suspend-0.50.20070730/Makefile
--- old/suspend-0.50.20070719/Makefile 2007-05-15 21:32:48.000000000 +0200
+++ new/suspend-0.50.20070730/Makefile 2007-07-29 14:44:30.000000000 +0200
@@ -4,8 +4,9 @@
#CONFIG_UDEV=yes
#CONFIG_RESUME_DYN=yes
-SUSPEND_DIR=/usr/local/sbin
-RESUME_DIR=/usr/local/lib/suspend
+PREFIX=/usr/local
+SUSPEND_DIR=$(PREFIX)/sbin
+RESUME_DIR=$(PREFIX)/lib/suspend
CONFIG_DIR=/etc
RESUME_DEVICE=
BOOT_DIR=/boot
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-0.50.20070719/splash.c new/suspend-0.50.20070730/splash.c
--- old/suspend-0.50.20070719/splash.c 2007-05-12 22:37:47.000000000 +0200
+++ new/suspend-0.50.20070730/splash.c 2007-07-29 14:46:16.000000000 +0200
@@ -51,13 +51,13 @@
return ret;
}
-static int key_pressed(const char key)
+static char key_pressed(void)
{
char c;
- if (read(0, &c, 1) > 0 && c == key)
- return 1;
+ if (read(0, &c, 1) == 0)
+ return 0;
- return 0;
+ return c;
}
static void restore_abort(struct termios *oldtrm)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-0.50.20070719/splash.h new/suspend-0.50.20070730/splash.h
--- old/suspend-0.50.20070719/splash.h 2007-05-12 22:37:47.000000000 +0200
+++ new/suspend-0.50.20070730/splash.h 2007-07-29 14:46:16.000000000 +0200
@@ -25,7 +25,7 @@
void (*read_password) (char *, int);
int (*dialog) (const char *);
int (*prepare_abort) (struct termios *, struct termios *);
- int (*key_pressed) (const char key);
+ char (*key_pressed) (void);
void (*restore_abort) (struct termios *);
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-0.50.20070719/suspend.c new/suspend-0.50.20070730/suspend.c
--- old/suspend-0.50.20070719/suspend.c 2007-05-13 22:16:53.000000000 +0200
+++ new/suspend-0.50.20070730/suspend.c 2007-07-29 14:48:10.000000000 +0200
@@ -80,8 +80,12 @@
static char early_writeout;
static char splash_param;
#define SHUTDOWN_LEN 16
-static char shutdown_method[SHUTDOWN_LEN] = "platform";
-static int use_platform_suspend;
+static char shutdown_method_value[SHUTDOWN_LEN] = "";
+static enum {
+ SHUTDOWN_METHOD_SHUTDOWN,
+ SHUTDOWN_METHOD_PLATFORM,
+ SHUTDOWN_METHOD_REBOOT
+} shutdown_method = SHUTDOWN_METHOD_PLATFORM;
static int suspend_swappiness = SUSPEND_SWAPPINESS;
static struct splash splash;
@@ -160,7 +164,7 @@
{
.name = "shutdown method",
.fmt = "%s",
- .ptr = shutdown_method,
+ .ptr = shutdown_method_value,
.len = SHUTDOWN_LEN,
},
};
@@ -489,11 +493,18 @@
if (!(nr_pages % m)) {
printf("\b\b\b\b%3d%%", nr_pages / m);
splash.progress(20 + (nr_pages / m) * 0.75);
- if (abort_possible &&
- splash.key_pressed(ABORT_KEY_CODE)) {
- printf(" aborted!\n");
- return -EINTR;
+ switch (splash.key_pressed()) {
+ case ABORT_KEY_CODE:
+ if (abort_possible) {
+ printf(" aborted!\n");
+ return -EINTR;
+ }
+ break;
+ case REBOOT_KEY_CODE:
+ printf (" reboot enabled\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+ shutdown_method = SHUTDOWN_METHOD_REBOOT;
+ break;
}
}
if (!(nr_pages % writeout_rate))
@@ -597,8 +608,6 @@
header->image_flags |= IMAGE_COMPRESSED;
max_block_size += sizeof(short);
}
- if (use_platform_suspend)
- header->image_flags |= PLATFORM_SUSPEND;
#ifdef CONFIG_ENCRYPT
if (encrypt) {
@@ -649,6 +658,14 @@
gettimeofday(&begin, NULL);
error = save_image(&handle, header->pages - 1);
}
+
+ /*
+ * NOTICE:
+ * This should be after save_image() as
+ * the user may modify the behavior
+ */
+ if (shutdown_method == SHUTDOWN_METHOD_PLATFORM)
+ header->image_flags |= PLATFORM_SUSPEND;
}
if (!error) {
error = flush_swap_writer(&handle);
@@ -728,9 +745,9 @@
static void suspend_shutdown(int snapshot_fd)
{
- if (!strcmp(shutdown_method, "reboot")) {
+ if (shutdown_method == SHUTDOWN_METHOD_REBOOT) {
reboot();
- } else if (use_platform_suspend) {
+ } else if (shutdown_method == SHUTDOWN_METHOD_PLATFORM) {
int ret = platform_enter(snapshot_fd);
if (ret < 0)
suspend_error("pm_ops->enter failed, calling power_off.");
@@ -739,7 +756,8 @@
/* Signature is on disk, it is very dangerous to continue now.
* We'd do resume with stale caches on next boot. */
fprintf(stderr,"Powerdown failed. That's impossible.\n");
- while(1);
+ while(1)
+ sleep (60);
}
int suspend_system(int snapshot_fd, int resume_fd)
@@ -769,12 +787,12 @@
if (error)
goto Unfreeze;
- if (use_platform_suspend) {
+ if (shutdown_method == SHUTDOWN_METHOD_PLATFORM) {
int ret = platform_prepare(snapshot_fd);
if (ret < 0) {
suspend_error("pm_ops->prepare failed, using "
"'shutdown mode = shutdown'.");
- use_platform_suspend = 0;
+ shutdown_method = SHUTDOWN_METHOD_SHUTDOWN;
}
}
@@ -832,7 +850,7 @@
/* We get here during the resume or when we failed to suspend.
* Remember, suspend_shutdown() never returns!
*/
- if (use_platform_suspend)
+ if (shutdown_method == SHUTDOWN_METHOD_PLATFORM)
platform_finish(snapshot_fd);
Unfreeze:
@@ -1318,7 +1336,15 @@
if (early_writeout != 'n' && early_writeout != 'N')
early_writeout = 1;
- use_platform_suspend = !strcmp(shutdown_method, "platform");
+ if (!strcmp (shutdown_method_value, "shutdown")) {
+ shutdown_method = SHUTDOWN_METHOD_SHUTDOWN;
+ }
+ else if (!strcmp (shutdown_method_value, "platform")) {
+ shutdown_method = SHUTDOWN_METHOD_PLATFORM;
+ }
+ else if (!strcmp (shutdown_method_value, "reboot")) {
+ shutdown_method = SHUTDOWN_METHOD_REBOOT;
+ }
page_size = getpagesize();
buffer_size = BUFFER_PAGES * page_size;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-0.50.20070719/swsusp.h new/suspend-0.50.20070730/swsusp.h
--- old/suspend-0.50.20070719/swsusp.h 2007-03-16 17:02:23.000000000 +0100
+++ new/suspend-0.50.20070730/swsusp.h 2007-07-29 14:46:16.000000000 +0200
@@ -216,3 +216,5 @@
#define ABORT_KEY_CODE 127
#define ABORT_KEY_NAME "backspace"
+#define REBOOT_KEY_CODE 'r'
+#define REBOOT_KEY_NAME "r"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-0.50.20070719/whitelist.c new/suspend-0.50.20070730/whitelist.c
--- old/suspend-0.50.20070719/whitelist.c 2007-07-19 17:41:09.000000000 +0200
+++ new/suspend-0.50.20070730/whitelist.c 2007-07-30 11:57:05.000000000 +0200
@@ -94,6 +94,8 @@
{ "ASUSTeK Computer Inc. ", "S5N ", "", "", S3_BIOS|S3_MODE },
/* ASUS V6V, Johannes Engel */
{ "ASUSTeK Computer INC.", "V6V", "", "", S3_MODE },
+ /* Kanru Chen */
+ { "ASUSTeK Computer INC.", "W3A", "", "", S3_BIOS|S3_MODE },
/* ASUS W5A, Riccardo Sama' */
{ "ASUSTeK Computer Inc. ", "W5A ", "", "", S3_BIOS|S3_MODE },
/* ASUS M2400N, Daniel Gollub */
@@ -103,6 +105,12 @@
/* ASUS a7v600 motherboard, has no usable sys_* entries besides bios_version :-(
reported by James Spencer */
{ "", "", "", "ASUS A7V600 ACPI BIOS Revision *", S3_BIOS|S3_MODE },
+ /* ASUS M2N-E motherboars, not much usable in DMI :-(
+ reported by Ingo */
+ { "", "", "", "ASUS M2N-E ACPI BIOS Revision *", 0 },
+ /* another ASUS Mainboard, reported by mailinglist@prodigy7.de */
+ { "", "", "", "ASUS M2N32-SLI DELUXE ACPI BIOS Revision 1201", VBE_POST|VBE_MODE },
+ { "", "", "", "ASUS M2N32-SLI DELUXE ACPI BIOS Revision 1101", VBE_POST|VBE_MODE },
/* Mark Stillwell */
{ "AVERATEC", "3700 Series", "", "", S3_BIOS|S3_MODE },
/* Ross Patterson */
@@ -214,6 +222,8 @@
{ "FUJITSU SIEMENS", "AMILO Pro V2040", "", "", 0 },
/* / https://bugzilla.novell.com/show_bug.cgi?id=279944 */
{ "FUJITSU SIEMENS", "AMILO Pro V3205", "", "", S3_BIOS|S3_MODE },
+ /* Alexandr Kara */
+ { "FUJITSU SIEMENS", "AMILO Pro Edition V3405", "", "", S3_BIOS|S3_MODE },
/* Steffen */
{ "FUJITSU SIEMENS", "AMILO PRO V8010 *", "", "", VBE_POST|VBE_MODE },
/* */
@@ -247,6 +257,8 @@
/* Josef Zenisek */
{ "Gigabyte Technology Co., Ltd.", "945GZM-S2", "", "", 0 },
+ /* Robert Hart */
+ { "Hewlett-Packard", "HP Pavilion dv2500 Notebook PC", "", "", 0 },
/* Marcos Pinto , HP dv6000 */
{ "Hewlett-Packard", "EW434AVABA *", "", "", S3_BIOS|S3_MODE },
/* hp compaq nc2400, tested by seife. sometimes has keyboard problems after resume */
@@ -277,6 +289,8 @@
{ "Hewlett-Packard ", "Compaq nx 7010 (PG588EA#*","", "", S3_BIOS },
/* Valent Turkovic */
{ "Hewlett-Packard", "HP Compaq nx7300 (RU374ES#*", "", "", VBE_POST|VBE_MODE },
+ /* Slawomir Skrzyniarz */
+ { "Hewlett-Packard", "HP Compaq nx7400 (RH412EA#)", "", "", VBE_POST|VBE_MODE },
/* Michael Meskes , this is a NX 7400 */
{ "Hewlett-Packard", "", "", "68YGU*", VBE_POST },
{ "Hewlett-Packard", "HP Compaq nx8220 *", "", "", VBE_SAVE|NOFB },
@@ -378,10 +392,14 @@
{ "LENOVO", "", "ThinkPad T60p", "", S3_BIOS|S3_MODE },
/* T60 From: Jeff Nichols and Kristofer Hallgren */
{ "LENOVO", "", "ThinkPad T60", "", S3_BIOS|S3_MODE },
+ /* T61, Joe Nahmias , debian bug #432018 */
+ { "LENOVO", "7658*", "", "", S3_BIOS|S3_MODE },
/* T61 with NVidia card, https://bugzilla.novell.com/show_bug.cgi?id=290618 */
{ "LENOVO", "7663*", "", "", S3_MODE },
- /* X61s, Hendrik-Jan Heins */
- { "LENOVO", "7669*", "", "", S3_BIOS|VBE_MODE },
+ /* X61s, Hendrik-Jan Heins . Probably does not restore the
+ framebuffer mode correctly, but S3_MODE as well as VBE_MODE seem to fail
+ sometimes on x86_64 on this machine :-( */
+ { "LENOVO", "7669*", "", "", S3_BIOS },
/* T61, intel card 32bit works with S3_MODE, but 64bit needs VBE_MODE */
{ "LENOVO", "8895*", "", "", S3_BIOS|VBE_MODE },
/* Paul Wilkinson */
@@ -462,6 +480,8 @@
/* Bram Senders */
{ "TOSHIBA", "SP4600", "Version 1.0", "", 0 },
{ "TOSHIBA", "TECRA S3", "", "", 0 },
+ /* From: a v */
+ { "TOSHIBA", "TECRA8100", "", "", S3_MODE },
/* Stefan Seyfried has one of those :-) S3_BIOS leads to "melting screen" */
{ "TOSHIBA", "TECRA 8200", "", "", S3_MODE },
{ "Samsung", "SQ10", "", "", VBE_POST|VBE_SAVE },
++++++ suspend-s2ram-suspend-fbcon.diff ++++++
Index: s2ram-x86.c
===================================================================
RCS file: /cvsroot/suspend/suspend/s2ram-x86.c,v
retrieving revision 1.6
diff -u -p -r1.6 s2ram-x86.c
--- s2ram-x86.c 19 Jul 2007 13:28:47 -0000 1.6
+++ s2ram-x86.c 30 Jul 2007 09:41:21 -0000
@@ -10,6 +10,9 @@
#include
#include
#include
+#include
+#include
+#include
#include
@@ -124,6 +127,42 @@ static int machine_match(void)
return -1;
}
+static void fbcon_state(int state)
+{
+ DIR *d;
+ FILE *f;
+ struct dirent *entry;
+ char statefile[255];
+
+ if ((d = opendir("/sys/class/graphics")) == NULL)
+ return;
+ while ((entry = readdir(d)) != NULL) {
+ if (entry->d_name[0] == '.')
+ continue;
+ snprintf(statefile, 255, "/sys/class/graphics/%s/state", entry->d_name);
+ if (!access(statefile, W_OK)) {
+ printf("fbcon %s state %d\n", entry->d_name, state);
+ f = fopen(statefile, "w");
+ if (!f) {
+ printf("s2ram: cannot write to %s\n", statefile);
+ continue;
+ }
+ fprintf(f, "%d", state);
+ fclose(f);
+ }
+ }
+}
+
+static void suspend_fbcon(void)
+{
+ fbcon_state(1);
+}
+
+static void resume_fbcon(void)
+{
+ fbcon_state(0);
+}
+
int s2ram_check(int id)
{
int ret = S2RAM_OK;
@@ -252,6 +291,7 @@ int s2ram_hacks(void)
return 1;
}
+ suspend_fbcon();
return 0;
}
@@ -304,6 +344,7 @@ void s2ram_resume(void)
printf("Calling set_vbe_mode\n");
do_set_mode(vbe_mode, 0);
}
+ resume_fbcon();
if (flags & RADEON_OFF) {
printf("Calling radeon_cmd_light(1)\n");
radeon_cmd_light(1);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org