Package: uswsusp
Version: 0.8-1.1+b1
Severity: wishlist
Tags: patch
Hi,
There is a functionality overlay between pm-utils and uswsusp: when uswsusp is
installed, s2ram will be the program chosen by pm-utils for suspend-to-ram (aka
"suspend"). pm-utils takes a decision concerning video quirks and such
depending on many parameters (among them "use of kernel modesetting" which is
my reason for this bugreport). On my box, pm-utils decides not to activate any
video quirk because my video driver and setup (i915 on linux > 2.6.29 with kms
enabled) are well supported.
But when s2ram is launched, it will decide on his own to make a "vt switch",
where it is absolutely not needed.
I am in favour of shrinking down uswsusp to the things it can do best and let
others (aka pm-utils) decide for the needed quirks.
You'll find my patch attached, it just strips out everything related to "vt
switching" from s2ram-main.c. It "just works" for me.
Best regards,
OdyX
N.B. It seems that uswsusp is in need of help to triage and sort bugs out. I'll
see what I can do, probably later in the year. Maintainer, feel free to contact
me if you need help.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (750, 'unstable'), (700, 'testing-proposed-updates'), (700,
'testing'), (90, 'experimental'), (50, 'testing-proposed-updates'), (50,
'experimental'), (50, 'unstable'), (50, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-rc6-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages uswsusp depends on:
ii debconf [debconf-2.0] 1.5.26 Debian configuration management sy
ii libc6 2.9-12 GNU C Library: Shared libraries
ii libdirectfb-1.2-0 1.2.7-2 direct frame buffer graphics - sha
ii libgcc1 1:4.4.0-5 GCC support library
ii libgcrypt11 1.4.4-2 LGPL Crypto library - runtime libr
ii libglib2.0-0 2.20.1-2 The GLib library of C routines
ii libgpg-error0 1.6-1 library for common error values an
ii liblzo2-2 2.03-1 data compression library
ii libpci3 1:3.1.2-4 Linux PCI Utilities (shared librar
ii libsplashy1 0.3.13-5 Library to draw splash screen on b
ii libx86-1 1.1+ds1-2 x86 real-mode library
Versions of packages uswsusp recommends:
ii initramfs-tools 0.93.2 tools for generating an initramfs
ii mount 2.13.1.1-1 Tools for mounting and manipulatin
Versions of packages uswsusp suggests:
pn splashy <none> (no description available)
-- debconf information:
uswsusp/compute_checksum: false
uswsusp/no_snapshot:
uswsusp/suspend_loglevel:
uswsusp/no_swap:
uswsusp/resume_offset:
uswsusp/early_writeout: true
uswsusp/image_size: 966930186
uswsusp/compress: true
uswsusp/create_RSA_key: false
uswsusp/snapshot_device:
uswsusp/RSA_key_file: /etc/uswsusp.key
uswsusp/max_loglevel:
uswsusp/resume_device: /dev/mapper/Tamino-swap_1
uswsusp/shutdown_method: platform
uswsusp/encrypt: false
uswsusp/splash: true
uswsusp/RSA_key_bits: 1024
uswsusp/continue_without_swap: true
Index: uswsusp-0.8/s2ram-main.c
===================================================================
--- uswsusp-0.8.orig/s2ram-main.c 2009-05-27 08:57:28.000000000 +0200
+++ uswsusp-0.8/s2ram-main.c 2009-05-27 09:05:02.000000000 +0200
@@ -15,7 +15,6 @@
#ifndef S2RAM
#define S2RAM
#endif
-#include "vt.h"
#include "whitelist.h"
#include "s2ram.h"
#include "config_parser.h"
@@ -23,7 +22,6 @@
int main(int argc, char *argv[])
{
int i, ret = 0;
- int active_console = -1;
struct option options[] = {
{
"help\0\tthis text.",
@@ -84,11 +82,6 @@
if (ret)
goto out;
- /* switch to console 1 first, since we might be in X */
- active_console = fgconsole();
- printf("Switching from vt%d to vt1\n", active_console);
- chvt(1);
-
ret = s2ram_hacks();
if (ret)
goto out;
@@ -96,11 +89,5 @@
s2ram_resume();
out:
- /* if we switched consoles before suspend, switch back */
- if (active_console > 0) {
- printf("switching back to vt%d\n", active_console);
- chvt(active_console);
- }
-
return ret;
}