[linux-pm] [PATCH 2/2] Fix console handling during suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2006-06-13 at 14:40 -0700, Linus Torvalds wrote:
> The old code was terminally broken, and would do extremely bad things if 
> you used netconsole, for example. Like sending out packets when the device 
> had already been suspended etc.
> 
> The new version may not be perfect either, but it seems fundamentally like 
> a better design: we just hold on to the primary console semaphore over the 
> whole suspend event, forcing printk() to just buffer up its data until we 
> can show it again. The code is also much simpler and more obvious.
> 
> This can potentially make debugging harder when something goes wrong at 
> suspend time and a visible printk would have given us a hint _what_ went 
> wrong, but on the other hand, it makes fewer things go wrong. Oopses will 
> punch through the semaphore anyway, so serious problems aren't affected by 
> this.

While the idea is nice for kernel console, we still need the console
switch for X. Unless you have some kind of APM emulation (which we do
have on ppc) in which case X should get notified of suspend and resume,
and will try to save/restore itself properly, not switching consoles is
a guarantee of X blowing up in many situations. (Your patch as-is broke
suspend/resume on pretty much all powermacs for example with X).

It's especially bad if you use things like AGP and DRI... 

Ben.




[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux