1 |
Alex Schuster posted on Wed, 16 Jun 2010 18:21:41 +0200 as excerpted: |
2 |
|
3 |
> Hi there! |
4 |
> |
5 |
> I already wrote about this on the gentoo-user list, but now that I'm on |
6 |
> amd64 this list is more appropiate. |
7 |
> |
8 |
> Any idea why hibernate-ram is not working? It looks good at first, but |
9 |
> when I resume, the display stays black. The numlock key ativates the |
10 |
> LED, but I could not switch to a text console. After Alt-SysRq-R, caps |
11 |
> and scroll lock flash, I guess that means kernel panic. Happened for the |
12 |
> two times I tried. I see nothing in syslog. |
13 |
> |
14 |
> With my 32bit system (almost identical to this 64bit one), I never had a |
15 |
> problem with this. I'm running tuxonice-sources-2.6.33-r2, and ati- |
16 |
> drivers-10.5. Kernel .config is here: |
17 |
> http://wonkology.org/~wonko/tmp/config-2.6.33-tuxonice-r2 |
18 |
> |
19 |
> Suspend to disk works sometimes, but not always. But I asked about this |
20 |
> on the TuxOnIce mailing list. |
21 |
|
22 |
If someone had a definitive answer to that question, that worked for |
23 |
everyone, he'd have the thanks of very many users indeed! |
24 |
|
25 |
First, a minor detour into definitions. Formerly, in the Linux world it |
26 |
was "suspend-to-disk" and "suspend-to-ram". However, AFAIK taking a hint |
27 |
from MS (which after all, a lot of new users are more familiar with than |
28 |
Linux), the community seems to have now agreed that the former "suspend-to- |
29 |
disk" should be referred to as "hibernate", while "suspend-to-RAM" will |
30 |
continue to be referred to as "suspend". IOW, "hibernate-ram" is a |
31 |
confusing term that shouldn't be used, as "hibernate" refers to the former |
32 |
"suspend-to-disk", while "suspend-ram" (or ultimately simply suspend, but |
33 |
it'll be quite some time before we get to that point, as it still refers |
34 |
to both at present) would refer to the RAM variant. So "hibernate-ram" |
35 |
then becomes a contradiction in terms and is simply confusing. |
36 |
|
37 |
So I assume you mean "suspend-to-ram", tho it really doesn't matter much |
38 |
for the suggestion below, which can be applied to both. |
39 |
|
40 |
One thing that's mentioned in the various documentation that I've read |
41 |
(both suspend/hibernate and general kernel/X mode discussion, including |
42 |
discussion of KMS, where the simplicity of KMS is considered a major |
43 |
advantage over the previous setup), that applies here as it appears you're |
44 |
not yet doing the workaround below, is that the interplay between X's |
45 |
video drivers and the kernel is exceedingly complex. As traditionally |
46 |
done, there's a very delicate dance between the kernel and X's userspace |
47 |
video drivers, with both effectively trying to control the same thing, and |
48 |
the possibility for all /sorts/ of race conditions and other such nasties |
49 |
to rear their ugly heads under various corner conditions on the various |
50 |
hardware -- and with suspend -- of both sorts -- being infamous for |
51 |
provoking exactly that sort of nasty. Thankfully, with the reasonably new |
52 |
KMS (kernel mode switching) functionality, more of the functionality is |
53 |
now in the kernel, with X's user-mode simply telling the kernel what |
54 |
resolution and etc it wants and the kernel now handling it in nearly all |
55 |
cases, but as I said, that's quite new, and thus, subject to its own bugs, |
56 |
tho at least in theory they should be easier to deal with than the |
57 |
delicate race conditions and etc that the old interface had. |
58 |
|
59 |
The suggestion is thus to switch out of X before invoking RAM-suspend or |
60 |
hibernate, in that way at least not mixing the complexities of suspend |
61 |
with the complexities of X mode graphics and the potential bugs there, |
62 |
because you're switching to the console before doing the suspend, and back |
63 |
to X only after the system has successfully returned from suspend. |
64 |
|
65 |
So that's what I'd suggest. At least for testing, you can simply switch |
66 |
to a text VT manually, before triggering the suspend (of whatever type). |
67 |
If that works, I think hibernate-script, the tux-on-ice solution I suspect |
68 |
you're using, has an option for that. |
69 |
|
70 |
FWIW, I run my own custom script here. It has a configurable "suspend- |
71 |
VT", which I have configured to VT-11 (VT-12 being the logging VT, 1-6 |
72 |
being text logins, and 7 being X, with VTs 8-10 still unused). But until |
73 |
I added support for that, I was switching VTs manually, before triggering |
74 |
the script. I run the script on both my netbook, where it gets a LOT of |
75 |
use in both disk and RAM modes, and on my main system, which I don't |
76 |
suspend that often. But I've never run tux-on-ice, so I've never had the |
77 |
need to add support for that. |
78 |
|
79 |
-- |
80 |
Duncan - List replies preferred. No HTML msgs. |
81 |
"Every nonfree program has a lord, a master -- |
82 |
and if you use the program, he is your master." Richard Stallman |