* [PATCH] 2.4.3-ac9 console unblank at resume fix
@ 2001-04-18 13:39 Mikael Pettersson
0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2001-04-18 13:39 UTC (permalink / raw)
To: alan; +Cc: benh, linux-kernel
Alan,
I think I've finally eliminated the X screen corruption my laptop
has been seeing at resume from suspend events.
The fix in -ac3 eliminated the corruption but left the console
blank if I exited X. The fix in -ac4 didn't actually work --
the corruptions resurfaced later. (Sorry about that.) I've tested
a lot of variations of it, but all had the same problem.
The new fix goes back to the original (exit early if not in text
mode), with one crucial change: console_blanked is NOT reset to zero.
This appears to have the desired effect: while X is running we
don't mess with the hardware, and the first unblank after X has
exited does the right thing. Works fine over here (so far..).
Patch below for -ac9, please apply.
[To recap: Dell Latitude, 2.4 kernel, XFree86-SVGA-3.3.6, APM,
no frame buffer device. After a few (1-3) days of use with
frequent suspend/resume cycles, the X screen would partially
wrap around after a resume. Restarting X would fix this temporarily,
but the next resume would see the same problem. Reboot, and I'd get
another few days before it happened again. 2.2 kernel was fine.]
/Mikael
--- linux-2.4.3-ac9/drivers/char/console.c.~1~ Wed Apr 18 13:50:00 2001
+++ linux-2.4.3-ac9/drivers/char/console.c Wed Apr 18 13:50:24 2001
@@ -2713,23 +2713,21 @@
printk("unblank_screen: tty %d not allocated ??\n", fg_console+1);
return;
}
+ currcons = fg_console;
+ if (vcmode != KD_TEXT)
+ return; /* but leave console_blanked != 0 */
console_timer.function = blank_screen;
if (blankinterval) {
mod_timer(&console_timer, jiffies + blankinterval);
}
- currcons = fg_console;
+
console_blanked = 0;
if (console_blank_hook)
console_blank_hook(0);
set_palette(currcons);
- if (sw->con_blank(vc_cons[currcons].d, 0)) {
- if (vcmode != KD_TEXT)
- return;
+ if (sw->con_blank(vc_cons[currcons].d, 0))
/* Low-level driver cannot restore -> do it ourselves */
update_screen(fg_console);
- }
- if (vcmode != KD_TEXT)
- return;
set_cursor(fg_console);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-18 13:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-18 13:39 [PATCH] 2.4.3-ac9 console unblank at resume fix Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®