* [PATCH] swsusp bootsplash support
@ 2004-07-08 11:05 Erik Rigtorp
2004-07-08 13:39 ` Christoph Hellwig
0 siblings, 1 reply; 22+ messages in thread
From: Erik Rigtorp @ 2004-07-08 11:05 UTC (permalink / raw)
To: linux-kernel; +Cc: pavel
This patch adds support for bootsplash to swsusp. The code interfacing to
bootsplash needs some more work, currently it's more or less ripped from
swsusp2. Some more code could probably be moved into console.c instead.
Erik
diff -Nru linux-2.6.7/kernel/power/console.c linux-2.6.7-swsusp/kernel/power/console.c
--- linux-2.6.7/kernel/power/console.c 2004-06-16 07:18:37.000000000 +0200
+++ linux-2.6.7-swsusp/kernel/power/console.c 2004-07-07 15:41:27.000000000 +0200
@@ -8,6 +8,7 @@
#include <linux/kbd_kern.h>
#include <linux/console.h>
#include "power.h"
+#include "splash.h"
static int new_loglevel = 10;
static int orig_loglevel;
@@ -30,13 +31,24 @@
return 1;
}
- set_console(SUSPEND_CONSOLE);
+ if (splash_is_on(SUSPEND_SPLASH_CONSOLE))
+ set_console(SUSPEND_SPLASH_CONSOLE);
+ else
+ set_console(SUSPEND_CONSOLE);
release_console_sem();
- if (vt_waitactive(SUSPEND_CONSOLE)) {
- pr_debug("Suspend: Can't switch VCs.");
- return 1;
+ if (splash_is_on(SUSPEND_SPLASH_CONSOLE)) {
+ if (vt_waitactive(SUSPEND_SPLASH_CONSOLE)) {
+ pr_debug("Suspend: Can't switch VCs.");
+ return 1;
+ }
+ } else {
+ if (vt_waitactive(SUSPEND_CONSOLE)) {
+ pr_debug("Suspend: Can't switch VCs.");
+ return 1;
+ }
}
+
orig_kmsg = kmsg_redirect;
kmsg_redirect = SUSPEND_CONSOLE;
#endif
diff -Nru linux-2.6.7/kernel/power/Makefile linux-2.6.7-swsusp/kernel/power/Makefile
--- linux-2.6.7/kernel/power/Makefile 2004-06-16 07:19:52.000000000 +0200
+++ linux-2.6.7-swsusp/kernel/power/Makefile 2004-07-04 22:14:44.000000000 +0200
@@ -1,5 +1,5 @@
obj-y := main.o process.o console.o pm.o
-obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
+obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o splash.o
obj-$(CONFIG_PM_DISK) += disk.o pmdisk.o
obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
diff -Nru linux-2.6.7/kernel/power/splash.c linux-2.6.7-swsusp/kernel/power/splash.c
--- linux-2.6.7/kernel/power/splash.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.7-swsusp/kernel/power/splash.c 2004-07-07 15:12:28.000000000 +0200
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 1998-2001 Gabor Kuti <seasons@fornax.hu>
+ * Copyright (C) 1998,2001,2002 Pavel Machek <pavel@suse.cz>
+ * Copyright (C) 2002-2003 Florent Chabaud <fchabaud@free.fr>
+ * Copyright (C) 2002-2004 Nigel Cunningham <ncunningham@users.sourceforge.net>
+ * Copyright (C) 2004 Erik Rigtorp <erik@rigtorp.com>
+ */
+
+#include <linux/suspend.h>
+#include <linux/console.h>
+#include <linux/interrupt.h>
+#include <linux/bitops.h>
+#include <linux/proc_fs.h>
+#include "../../drivers/video/console/fbcon.h"
+
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_BOOTSPLASH)
+
+extern struct display fb_display[MAX_NR_CONSOLES];
+
+static inline struct splash_data * get_splash_data(int consolenr)
+{
+ BUG_ON(consolenr >= MAX_NR_CONSOLES);
+
+ if (vc_cons[consolenr].d)
+ return vc_cons[consolenr].d->vc_splash_data;
+
+ return NULL;
+}
+
+int splash_is_on(int consolenr)
+{
+ struct splash_data *info = get_splash_data(consolenr);
+
+ if (info)
+ return ((info->splash_state & 1) == 1);
+
+ return 0;
+}
+
+static struct proc_dir_entry * find_proc_dir_entry(const char *name,
+ struct proc_dir_entry *parent)
+{
+ struct proc_dir_entry **p;
+ int len;
+
+ len = strlen(name);
+ for (p = &parent->subdir; *p; p=&(*p)->next ) {
+ if (proc_match(len, name, *p)) {
+ return *p;
+ }
+ }
+ return NULL;
+}
+
+/* FIXME: we only care about bootsplash under 2.6, is this nescesaary then? */
+/* splash_write_proc.
+ *
+ * Write to Bootsplash's proc entry. We need this to work when /proc
+ * hasn't been mounted yet and / can't be mounted. In addition, we
+ * want it to work despite the fact that bootsplash (under 2.4 at least)
+ * removes its proc entry when it shouldn't. We therefore use
+ * our proc.c find_proc_dir_entry routine to get the location of the
+ * write routine once (boot time & at start of each resume), and keep it.
+ */
+
+void splash_write_proc(const char *buffer, unsigned long count)
+{
+ static write_proc_t * write_routine;
+ struct proc_dir_entry * proc_entry;
+
+ if (in_interrupt())
+ return;
+
+ if (unlikely(!write_routine)) {
+ proc_entry = find_proc_dir_entry("splash", &proc_root);
+ if (proc_entry)
+ write_routine = proc_entry->write_proc;
+ }
+
+ if (write_routine)
+ write_routine(NULL, buffer, count, NULL);
+}
+
+/* Set the progress bar position for a splash screen. */
+int splash_set_progress(unsigned long value, unsigned long maximum)
+{
+ char buf[15];
+ int length, bitshift = generic_fls(maximum) - 16;
+
+ if (in_interrupt())
+ return 0;
+
+ if (value > maximum)
+ value = maximum;
+
+ /* Avoid math problems - we can't do 64 bit math here */
+ if (bitshift > 0) {
+ maximum = maximum >> bitshift;
+ value = value >> bitshift;
+ }
+
+ length = sprintf(buf, "show %lu", value * 65534 / maximum);
+ splash_write_proc(buf, length);
+
+ return 0;
+}
+
+EXPORT_SYMBOL(splash_is_on);
+EXPORT_SYMBOL(splash_write_proc);
+EXPORT_SYMBOL(splash_set_progress);
+
+#endif
diff -Nru linux-2.6.7/kernel/power/splash.h linux-2.6.7-swsusp/kernel/power/splash.h
--- linux-2.6.7/kernel/power/splash.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.7-swsusp/kernel/power/splash.h 2004-07-07 14:28:21.000000000 +0200
@@ -0,0 +1,21 @@
+#ifndef _SPLASH_H
+#define _SPLASH_H
+
+#define SUSPEND_SPLASH_CONSOLE 0
+
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_BOOTSPLASH)
+
+int splash_is_on(int consolenr);
+void splash_write_proc(const char *buffer, unsigned long count);
+int splash_set_progress(unsigned long value, unsigned long maximum);
+
+#else
+#define splash_is_on(consolenr) (0)
+#define splash_set_progress(...) do { } while(0)
+#define splash_write_proc(...) do { } while(0)
+#endif
+
+#define splash_set_verbose() splash_write_proc("verbose\n", 9);
+#define splash_set_silent() splash_write_proc("silent\n", 8);
+
+#endif
diff -Nru linux-2.6.7/kernel/power/swsusp.c linux-2.6.7-swsusp/kernel/power/swsusp.c
--- linux-2.6.7/kernel/power/swsusp.c 2004-06-16 07:19:02.000000000 +0200
+++ linux-2.6.7-swsusp/kernel/power/swsusp.c 2004-07-07 15:33:01.000000000 +0200
@@ -69,6 +69,7 @@
#include <asm/io.h>
#include "power.h"
+#include "splash.h"
unsigned char software_suspend_enabled = 0;
@@ -312,11 +313,15 @@
if (!buffer)
return -ENOMEM;
-
+
printk( "Writing data to swap (%d pages): ", nr_copy_pages );
for (i=0; i<nr_copy_pages; i++) {
- if (!(i%100))
+ if (!(i%100)) {
+ if (splash_is_on(SUSPEND_SPLASH_CONSOLE))
+ splash_set_progress(i, nr_copy_pages);
printk( "." );
+ }
+
if (!(entry = get_swap_page()).val)
panic("\nNot enough swapspace when writing data" );
@@ -829,6 +834,12 @@
}
if (pm_prepare_console())
printk( "%sCan't allocate a console... proceeding\n", name_suspend);
+
+ if (splash_is_on(SUSPEND_SPLASH_CONSOLE)) {
+ splash_set_progress(0, 1);
+ splash_set_silent();
+ }
+
if (!prepare_suspend_processes()) {
/* At this point, all user processes and "dangerous"
@@ -855,6 +866,10 @@
software_suspend_enabled = 1;
MDELAY(1000);
pm_restore_console();
+
+ if (splash_is_on(SUSPEND_SPLASH_CONSOLE))
+ splash_set_verbose();
+
return res;
}
@@ -1067,6 +1082,9 @@
printk( "%sSignature found, resuming\n", name_resume );
MDELAY(1000);
+ if (pm_prepare_console())
+ printk("swsusp: Can't allocate a console... proceeding\n");
+
if (bdev_read_page(bdev, next.val, cur)) return -EIO;
if (sanity_check(&cur->sh)) /* Is this same machine? */
return -EPERM;
@@ -1100,8 +1118,12 @@
printk( "Reading image data (%d pages): ", nr_copy_pages );
for(i=0; i < nr_copy_pages; i++) {
swp_entry_t swap_address = (pagedir_nosave+i)->swap_address;
- if (!(i%100))
+ if (!(i%100)) {
+ if (splash_is_on(SUSPEND_SPLASH_CONSOLE))
+ splash_set_progress(i, nr_copy_pages);
printk( "." );
+ }
+
/* You do not need to check for overlaps...
... check_pagedir already did this work */
if (bdev_read_page(bdev, swp_offset(swap_address) * PAGE_SIZE, (char *)((pagedir_nosave+i)->address)))
@@ -1190,9 +1212,6 @@
}
MDELAY(1000);
- if (pm_prepare_console())
- printk("swsusp: Can't allocate a console... proceeding\n");
-
if (!resume_file[0] && resume_status == RESUME_SPECIFIED) {
printk( "suspension device unspecified\n" );
return -EINVAL;
@@ -1206,7 +1225,6 @@
panic("This never returns");
read_failure:
- pm_restore_console();
return 0;
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 11:05 [PATCH] swsusp bootsplash support Erik Rigtorp
@ 2004-07-08 13:39 ` Christoph Hellwig
2004-07-08 20:48 ` Pavel Machek
0 siblings, 1 reply; 22+ messages in thread
From: Christoph Hellwig @ 2004-07-08 13:39 UTC (permalink / raw)
To: Erik Rigtorp; +Cc: linux-kernel, pavel
On Thu, Jul 08, 2004 at 01:05:49PM +0200, Erik Rigtorp wrote:
> This patch adds support for bootsplash to swsusp. The code interfacing to
> bootsplash needs some more work, currently it's more or less ripped from
> swsusp2. Some more code could probably be moved into console.c instead.
CONFIG_BOOTSPALSH (foruntatley) isn't in mainline, so while you're of course
free to keep this patch around it has no business at all in mainline.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 13:39 ` Christoph Hellwig
@ 2004-07-08 20:48 ` Pavel Machek
2004-07-08 21:04 ` Christoph Hellwig
0 siblings, 1 reply; 22+ messages in thread
From: Pavel Machek @ 2004-07-08 20:48 UTC (permalink / raw)
To: Christoph Hellwig, Erik Rigtorp, linux-kernel, pavel
Hi!
> > This patch adds support for bootsplash to swsusp. The code interfacing to
> > bootsplash needs some more work, currently it's more or less ripped from
> > swsusp2. Some more code could probably be moved into console.c instead.
>
> CONFIG_BOOTSPALSH (foruntatley) isn't in mainline, so while you're of course
> free to keep this patch around it has no business at all in mainline.
The patch was not intended for mainline... But it will be usefull anyway as big distros
want this kind of stuff....
Perhaps CONFIG_BOOTSPLASH should be in mainline after all?
I really don't want to see 2 different incompatible sets
of hooks into swsusp....
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 20:48 ` Pavel Machek
@ 2004-07-08 21:04 ` Christoph Hellwig
2004-07-08 22:52 ` Pavel Machek
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Christoph Hellwig @ 2004-07-08 21:04 UTC (permalink / raw)
To: Pavel Machek; +Cc: Erik Rigtorp, linux-kernel, pavel
> Perhaps CONFIG_BOOTSPLASH should be in mainline after all?
> I really don't want to see 2 different incompatible sets
> of hooks into swsusp....
No. This stuff has no business in the kernel, paint your fancy graphics
ontop of fbdev. And the SuSE bootsplash patch is utter crap, I mean what
do you have to smoke to put a jpeg decoder into the kernel?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 21:04 ` Christoph Hellwig
@ 2004-07-08 22:52 ` Pavel Machek
2004-07-08 22:55 ` Christoph Hellwig
2004-07-09 8:36 ` Erik Rigtorp
2004-07-09 14:48 ` Stefan Reinauer
2 siblings, 1 reply; 22+ messages in thread
From: Pavel Machek @ 2004-07-08 22:52 UTC (permalink / raw)
To: Christoph Hellwig, Erik Rigtorp, linux-kernel
Hi!
> > Perhaps CONFIG_BOOTSPLASH should be in mainline after all?
> > I really don't want to see 2 different incompatible sets
> > of hooks into swsusp....
>
> No. This stuff has no business in the kernel, paint your fancy graphics
> ontop of fbdev. And the SuSE bootsplash patch is utter crap, I mean what
> do you have to smoke to put a jpeg decoder into the kernel?
No idea; smoking is prohibited in SuSE offices, so someone external
had to do that ;-).
I have not seen SuSE version of bootsplash... I do not want to
see. But this way, SuSE has its own crappy bootsplash, RedHat probably
too, Mandrake probably too, etc.
And now, SUSE will want splash over swsusp, RedHat probably too,
Madrake probably too, etc. I do not want to deal with 3 different sets
of hooks into swsusp.
Now.. Perhaps cleaned-up bootsplash could find its way into
kernel. That would at least turn down ammount of crap in
distributions. At least there would be unified way to turn that thing
off...
Or at least standartized hooks for various splashes, so that I do not
have to deal with 3 different sets?
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 22:52 ` Pavel Machek
@ 2004-07-08 22:55 ` Christoph Hellwig
2004-07-08 23:23 ` Dave Jones
2004-07-09 5:15 ` Pavel Machek
0 siblings, 2 replies; 22+ messages in thread
From: Christoph Hellwig @ 2004-07-08 22:55 UTC (permalink / raw)
To: Pavel Machek; +Cc: Christoph Hellwig, Erik Rigtorp, linux-kernel
On Fri, Jul 09, 2004 at 12:52:16AM +0200, Pavel Machek wrote:
> I have not seen SuSE version of bootsplash... I do not want to
> see. But this way, SuSE has its own crappy bootsplash, RedHat probably
> too, Mandrake probably too, etc.
Red Hat gets it right and uses a program that's using fbdev. They also
have no swsusp support, which makes quite a lot of sense given how much
in flux the code still is.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 22:55 ` Christoph Hellwig
@ 2004-07-08 23:23 ` Dave Jones
2004-07-09 5:15 ` Pavel Machek
1 sibling, 0 replies; 22+ messages in thread
From: Dave Jones @ 2004-07-08 23:23 UTC (permalink / raw)
To: Christoph Hellwig, Pavel Machek, Erik Rigtorp, linux-kernel
On Thu, Jul 08, 2004 at 11:55:01PM +0100, Christoph Hellwig wrote:
> On Fri, Jul 09, 2004 at 12:52:16AM +0200, Pavel Machek wrote:
> > I have not seen SuSE version of bootsplash... I do not want to
> > see. But this way, SuSE has its own crappy bootsplash, RedHat probably
> > too, Mandrake probably too, etc.
>
> Red Hat gets it right and uses a program that's using fbdev.
That program is called X 8-)
Dave
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 22:55 ` Christoph Hellwig
2004-07-08 23:23 ` Dave Jones
@ 2004-07-09 5:15 ` Pavel Machek
2004-07-09 11:55 ` Dave Jones
1 sibling, 1 reply; 22+ messages in thread
From: Pavel Machek @ 2004-07-09 5:15 UTC (permalink / raw)
To: Christoph Hellwig, Erik Rigtorp, linux-kernel
Hi!
> > I have not seen SuSE version of bootsplash... I do not want to
> > see. But this way, SuSE has its own crappy bootsplash, RedHat probably
> > too, Mandrake probably too, etc.
>
> Red Hat gets it right and uses a program that's using fbdev. They also
> have no swsusp support, which makes quite a lot of sense given how much
> in flux the code still is.
Okay, if redhat is actually doing it right, there's no reason for
encouraging the wrong thing.
But I guess swsusp is going to make this more "interesting" as
progressbar is nice to have there, and userland can not help at that
point.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 21:04 ` Christoph Hellwig
2004-07-08 22:52 ` Pavel Machek
@ 2004-07-09 8:36 ` Erik Rigtorp
2004-07-09 14:48 ` Stefan Reinauer
2 siblings, 0 replies; 22+ messages in thread
From: Erik Rigtorp @ 2004-07-09 8:36 UTC (permalink / raw)
To: Christoph Hellwig, Pavel Machek, linux-kernel, pavel
On Thu, Jul 08, 2004 at 10:04:03PM +0100, Christoph Hellwig wrote:
> No. This stuff has no business in the kernel, paint your fancy graphics
> ontop of fbdev. And the SuSE bootsplash patch is utter crap, I mean what
> do you have to smoke to put a jpeg decoder into the kernel?
Well how are you going to be alble to watch pr0n att kernel boot without a
jpeg decoder? :) The problem is that it's hard to have a X server running
when suspending. An ascii progress bar could work.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 5:15 ` Pavel Machek
@ 2004-07-09 11:55 ` Dave Jones
2004-07-09 12:19 ` Nigel Cunningham
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Dave Jones @ 2004-07-09 11:55 UTC (permalink / raw)
To: Pavel Machek; +Cc: Christoph Hellwig, Erik Rigtorp, linux-kernel
On Fri, Jul 09, 2004 at 07:15:28AM +0200, Pavel Machek wrote:
> But I guess swsusp is going to make this more "interesting" as
> progressbar is nice to have there, and userland can not help at that
> point.
Personally I'd prefer the effort went into making suspend actually
work on more machines rather than painting eyecandy for the minority
of machines it currently works on.
Dave
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 11:55 ` Dave Jones
@ 2004-07-09 12:19 ` Nigel Cunningham
2004-07-09 14:27 ` Bartlomiej Zolnierkiewicz
2004-07-09 15:56 ` Erik Rigtorp
2004-07-10 12:34 ` Pavel Machek
2 siblings, 1 reply; 22+ messages in thread
From: Nigel Cunningham @ 2004-07-09 12:19 UTC (permalink / raw)
To: Dave Jones
Cc: Pavel Machek, Christoph Hellwig, Erik Rigtorp,
Linux Kernel Mailing List
Hi.
On Fri, 2004-07-09 at 21:55, Dave Jones wrote:
> Personally I'd prefer the effort went into making suspend actually
> work on more machines rather than painting eyecandy for the minority
> of machines it currently works on.
That's happening. I'm hoping to merge Suspend2 within the week. It has
support for SMP, Highmem (4GB), preempt, PPC (courtesy Steve & Ben),
X86-64 (being finished by 'Disconnect' right now), x86, image
compression and bootsplash. An NFS image writer is also planned.
Regards,
Nigel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 12:19 ` Nigel Cunningham
@ 2004-07-09 14:27 ` Bartlomiej Zolnierkiewicz
2004-07-09 22:00 ` Nigel Cunningham
0 siblings, 1 reply; 22+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-07-09 14:27 UTC (permalink / raw)
To: ncunningham, Dave Jones
Cc: Pavel Machek, Christoph Hellwig, Erik Rigtorp,
Linux Kernel Mailing List
Hi,
On Friday 09 of July 2004 14:19, Nigel Cunningham wrote:
> Hi.
>
> On Fri, 2004-07-09 at 21:55, Dave Jones wrote:
> > Personally I'd prefer the effort went into making suspend actually
> > work on more machines rather than painting eyecandy for the minority
> > of machines it currently works on.
>
> That's happening. I'm hoping to merge Suspend2 within the week. It has
> support for SMP, Highmem (4GB), preempt, PPC (courtesy Steve & Ben),
> X86-64 (being finished by 'Disconnect' right now), x86, image
> compression and bootsplash. An NFS image writer is also planned.
Can I find suspend2 broken on individual patches somewhere?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-08 21:04 ` Christoph Hellwig
2004-07-08 22:52 ` Pavel Machek
2004-07-09 8:36 ` Erik Rigtorp
@ 2004-07-09 14:48 ` Stefan Reinauer
2004-07-09 15:01 ` Dave Jones
2004-07-09 20:44 ` Diego Calleja García
2 siblings, 2 replies; 22+ messages in thread
From: Stefan Reinauer @ 2004-07-09 14:48 UTC (permalink / raw)
To: Christoph Hellwig, Pavel Machek, Erik Rigtorp, linux-kernel,
pavel
* Christoph Hellwig <hch@infradead.org> [040708 23:04]:
> No. This stuff has no business in the kernel, paint your fancy graphics
> ontop of fbdev. And the SuSE bootsplash patch is utter crap, I mean what
> do you have to smoke to put a jpeg decoder into the kernel?
Christoph, don't assume drugs just because you lack a little fantasy ;)
I agee with kernel 2.6 one could do a lot better due to proper initramfs
handling, but in kernel 2.4 there was no decent way of placing userspace
code early enough to be executed before framebuffer initialization.
On the other hand, the jpeg decoder is 8k object size - less than the
dozens of gzip/gunzip algorithms in the kernel, so complaining sounds a
little foolish to me. If you just want to bitch, go and critizise that
with 1024x768 the bootsplash patch eats 1.5MB of memory permanently.
THAT would make sense, if anything.
Whether one wants retro text messages or a graphical bootup mechanism is
sure a philosophical thing. IMHO starting X that early is not an option.
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 14:48 ` Stefan Reinauer
@ 2004-07-09 15:01 ` Dave Jones
2004-07-09 20:44 ` Diego Calleja García
1 sibling, 0 replies; 22+ messages in thread
From: Dave Jones @ 2004-07-09 15:01 UTC (permalink / raw)
To: Stefan Reinauer
Cc: Christoph Hellwig, Pavel Machek, Erik Rigtorp, linux-kernel,
pavel
On Fri, Jul 09, 2004 at 04:48:59PM +0200, Stefan Reinauer wrote:
> On the other hand, the jpeg decoder is 8k object size - less than the
> dozens of gzip/gunzip algorithms in the kernel, so complaining sounds a
> little foolish to me.
The zlibs should be consolidated these days, I remember an effort
about 18 months back to do so at least. Did any new ones get introduced
since then ?
> Whether one wants retro text messages or a graphical bootup mechanism is
> sure a philosophical thing. IMHO starting X that early is not an option.
It works surprisingly well.
Dave
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 11:55 ` Dave Jones
2004-07-09 12:19 ` Nigel Cunningham
@ 2004-07-09 15:56 ` Erik Rigtorp
2004-07-12 13:43 ` Jan Rychter
2004-07-10 12:34 ` Pavel Machek
2 siblings, 1 reply; 22+ messages in thread
From: Erik Rigtorp @ 2004-07-09 15:56 UTC (permalink / raw)
To: Dave Jones, Pavel Machek, Christoph Hellwig, linux-kernel
On Fri, Jul 09, 2004 at 12:55:31PM +0100, Dave Jones wrote:
> Personally I'd prefer the effort went into making suspend actually
> work on more machines rather than painting eyecandy for the minority
> of machines it currently works on.
Miniority? Well both swsusp and pmdisk has worked on the majority of
machines I've come across. From what I understand swsusp works on almost all
x86 uniprocessor machines and that's a lot of machines. Some drivers are a
hassle though.
Erik
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 14:48 ` Stefan Reinauer
2004-07-09 15:01 ` Dave Jones
@ 2004-07-09 20:44 ` Diego Calleja García
2004-07-09 21:49 ` Erik Rigtorp
1 sibling, 1 reply; 22+ messages in thread
From: Diego Calleja García @ 2004-07-09 20:44 UTC (permalink / raw)
To: Stefan Reinauer; +Cc: hch, pavel, erik, linux-kernel, pavel
El Fri, 9 Jul 2004 16:48:59 +0200 Stefan Reinauer <stepan@openbios.org> escribió:
> Whether one wants retro text messages or a graphical bootup mechanism is
> sure a philosophical thing. IMHO starting X that early is not an option.
Is really neccesary to use a X server? Why not just modify the init scripts to
use fbi to show a image? Is not that the kernel takes a lot of time to boot and
run init - even windows XP shows an ascii bar while it loads their kernel,
that period of time doesn't takes too much time and it doesn't annoy anyone.
You could switch off the printk output too, so the users doesn't see any
kernel message at all while init runs and the scripts puts the image in the
framebuffer console.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 20:44 ` Diego Calleja García
@ 2004-07-09 21:49 ` Erik Rigtorp
0 siblings, 0 replies; 22+ messages in thread
From: Erik Rigtorp @ 2004-07-09 21:49 UTC (permalink / raw)
To: Diego Calleja García
Cc: Stefan Reinauer, hch, pavel, linux-kernel, pavel
On Fri, Jul 09, 2004 at 10:44:00PM +0200, Diego Calleja García wrote:
> Is really neccesary to use a X server? Why not just modify the init scripts to
> use fbi to show a image? Is not that the kernel takes a lot of time to boot and
> run init - even windows XP shows an ascii bar while it loads their kernel,
So you know the internals of the NT kernel? That bar is probably just the
bootloader loading the kernel from disk :).
> that period of time doesn't takes too much time and it doesn't annoy anyone.
> You could switch off the printk output too, so the users doesn't see any
> kernel message at all while init runs and the scripts puts the image in the
> framebuffer console.
That is the "clean" approach, but what I wanted was something nice to look
at while booting or suspending my laptop. Whether it be a retro ascii thingy
or a fancy graphical thingy doesn't really matter.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 14:27 ` Bartlomiej Zolnierkiewicz
@ 2004-07-09 22:00 ` Nigel Cunningham
0 siblings, 0 replies; 22+ messages in thread
From: Nigel Cunningham @ 2004-07-09 22:00 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Dave Jones, Pavel Machek, Christoph Hellwig, Erik Rigtorp,
Linux Kernel Mailing List
Hi.
That patches are available from swsusp.sf.net (look in the 'Test
patches' section at the bottom of the download page for the latest
patches I've released). The .tar.gz's contain everything needed for
suspend, plus other patches that might be helpful to the user. They
should be applied to a vanilla kernel in order. They aren't yet broken
up into separate patches for merging. That will be my task next week.
Regards,
Nigel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 11:55 ` Dave Jones
2004-07-09 12:19 ` Nigel Cunningham
2004-07-09 15:56 ` Erik Rigtorp
@ 2004-07-10 12:34 ` Pavel Machek
2004-07-14 11:27 ` Jan Rychter
2 siblings, 1 reply; 22+ messages in thread
From: Pavel Machek @ 2004-07-10 12:34 UTC (permalink / raw)
To: Dave Jones, Pavel Machek, Christoph Hellwig, Erik Rigtorp,
linux-kernel
Hi!
> > But I guess swsusp is going to make this more "interesting" as
> > progressbar is nice to have there, and userland can not help at that
> > point.
>
> Personally I'd prefer the effort went into making suspend actually
> work on more machines rather than painting eyecandy for the minority
> of machines it currently works on.
Actually, it does work on most of UP/IDE machines by now.
Remaining problems tend to be unsupported drivers. I can't help
with devices I do not have, unfortunately, so there's little I can do.
I'm working on smp support just now... But some progress indication is
must have in future - we had people going "ouch I thought it is stuck"
when they in fact needed to wait 30seconds.
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-12 13:43 ` Jan Rychter
@ 2004-07-12 3:21 ` Eric Altendorf
0 siblings, 0 replies; 22+ messages in thread
From: Eric Altendorf @ 2004-07-12 3:21 UTC (permalink / raw)
To: Jan Rychter; +Cc: linux-kernel
On Monday 12 July 2004 06:43, Jan Rychter wrote:
...
> upgrade kernels, you don't much care. But if you use a laptop and
> you actually care about opening it and getting a stable, working
> environment within 20s, trust me -- software suspend becomes more
> important to you than all the scheduler improvements in the world.
>
> I would gladly trade all the performance improvements of the last
> couple of years for a stable, working swsusp2 and a USB subsystem
> which doesn't a) prohibit my CPU from using C3 sleep and b) crash
> and burn regularly bringing the whole machine down with it.
I'll second this. I moved to 2.6 because I needed a slew of drivers
that were difficult to patch into 2.4 or out of date or etc.
However, I haven't had a working 2.6 swsusp for probably 4 months or
so (since I stopped using the 2.6.3 version after it ate my ext3
journal on my root partition).
I suppose I could look at going back to 2.4....
--
Eric Altendorf // http://www.speedtoys.com/~eric
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-09 15:56 ` Erik Rigtorp
@ 2004-07-12 13:43 ` Jan Rychter
2004-07-12 3:21 ` Eric Altendorf
0 siblings, 1 reply; 22+ messages in thread
From: Jan Rychter @ 2004-07-12 13:43 UTC (permalink / raw)
To: linux-kernel
>>>>> "Erik" == Erik Rigtorp <erik@rigtorp.com> writes:
Erik> On Fri, Jul 09, 2004 at 12:55:31PM +0100, Dave Jones wrote:
>> Personally I'd prefer the effort went into making suspend actually
>> work on more machines rather than painting eyecandy for the minority
>> of machines it currently works on.
Erik> Miniority? Well both swsusp and pmdisk has worked on the majority
Erik> of machines I've come across. From what I understand swsusp works
Erik> on almost all x86 uniprocessor machines and that's a lot of
Erik> machines. Some drivers are a hassle though.
FWIW, I have been using Nigel's swsusp2 for a long time now on a 2.4
kernel. It has been exceptionally well-behaved and stable. And it's an
extremely important part of my Linux world. I will not move to 2.6
unless I'm sure swsusp2 will work well.
In fact, it seems to me that many kernel developers underestimate the
importance of software suspend to actual real Linux users. I guess when
you reboot your monster PC rig five times a day to upgrade kernels, you
don't much care. But if you use a laptop and you actually care about
opening it and getting a stable, working environment within 20s, trust
me -- software suspend becomes more important to you than all the
scheduler improvements in the world.
I would gladly trade all the performance improvements of the last couple
of years for a stable, working swsusp2 and a USB subsystem which doesn't
a) prohibit my CPU from using C3 sleep and b) crash and burn regularly
bringing the whole machine down with it.
--J.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] swsusp bootsplash support
2004-07-10 12:34 ` Pavel Machek
@ 2004-07-14 11:27 ` Jan Rychter
0 siblings, 0 replies; 22+ messages in thread
From: Jan Rychter @ 2004-07-14 11:27 UTC (permalink / raw)
To: linux-kernel
>>>>> "Pavel" == Pavel Machek <pavel@suse.cz> writes:
Pavel> Hi!
> But I guess swsusp is going to make this more "interesting" as
> progressbar is nice to have there, and userland can not help at that
> point.
>>
>> Personally I'd prefer the effort went into making suspend actually
>> work on more machines rather than painting eyecandy for the minority
>> of machines it currently works on.
Pavel> Actually, it does work on most of UP/IDE machines by now.
Pavel> Remaining problems tend to be unsupported drivers. I can't help
Pavel> with devices I do not have, unfortunately, so there's little I
Pavel> can do.
[...]
Just to clarify -- in one of my previous posts I said that swsusp2 works
very well for me. I meant *swsusp2*, not swsusp. It is unfortunate that
the two projects are so similarly named. They are very different from
the user perspective.
--J.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2004-07-13 23:29 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-08 11:05 [PATCH] swsusp bootsplash support Erik Rigtorp
2004-07-08 13:39 ` Christoph Hellwig
2004-07-08 20:48 ` Pavel Machek
2004-07-08 21:04 ` Christoph Hellwig
2004-07-08 22:52 ` Pavel Machek
2004-07-08 22:55 ` Christoph Hellwig
2004-07-08 23:23 ` Dave Jones
2004-07-09 5:15 ` Pavel Machek
2004-07-09 11:55 ` Dave Jones
2004-07-09 12:19 ` Nigel Cunningham
2004-07-09 14:27 ` Bartlomiej Zolnierkiewicz
2004-07-09 22:00 ` Nigel Cunningham
2004-07-09 15:56 ` Erik Rigtorp
2004-07-12 13:43 ` Jan Rychter
2004-07-12 3:21 ` Eric Altendorf
2004-07-10 12:34 ` Pavel Machek
2004-07-14 11:27 ` Jan Rychter
2004-07-09 8:36 ` Erik Rigtorp
2004-07-09 14:48 ` Stefan Reinauer
2004-07-09 15:01 ` Dave Jones
2004-07-09 20:44 ` Diego Calleja García
2004-07-09 21:49 ` Erik Rigtorp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox