Resume from suspend-to-ram
I have already posted the following message to LKML. However, since there was lot of discussion on this topic in this mailing list, I am posting here too.
I have Dell Latitude D600 laptop with Radeon R250 Lf (Mobility 9000 M9) video card. I have been trying to get suspend-to-ram work with this laptop since 2.5.70 or so. The problem almost always was that if frame buffer (I have tried radeon and vesa) is used, resume won't finish - it would hang right after pressing power button and if plain console is used resume works fine, but the LCD stays off.
Since new radeonfb has suspend/resume driver model, I thought I might give it a try, but still the laptop would hang during resume. With a bit of trial and error (and some guess work), I got the laptop to resume successfully with the following patch.
radeon_pm.c 2004-02-20 15:12:23.000000000 -0500 renamed from radeon_pm.c.orig 2004-02-20 15:11:18.000000000 -0500 +5 -3
@@ -907,11 +907,13 @@ /* Restore display & engine */ radeonfb_set_par(info); - fb_pan_display(info, &info->var); - fb_set_cmap(&info->cmap, 1, info); + /* fb_pan_display(info, &info->var); + * fb_set_cmap(&info->cmap, 1, info); + */ /* Refresh */ - fb_set_suspend(info, 0); + /* fb_set_suspend(info, 0); + */ /* Unblank */ rinfo->lock_blank = 0;
Right now after resume, console still remains blank, but X restores the screen properly. Note that since frame buffer is not restored properly, the console is pretty much useless, but it is not a problem for me as I use X all the time.
I have used this patch with kernel 2.6.3-mm2. I haven't tried 2.6.3, but I think it may work with 2.6.3 too.
I am also attaching config.bz2 and /etc/acpi/sleep (the script used to suspend the laptop).
I am not subscribed to LKML, so please CC me.
Re: Resume from suspend-to-ram (radeon)
Ben,
has radeon_pm.c suspend/resume worked under other conditions?
thanks,
-Len
Quoted 42 lines · Giridhar Pemmasani
I have already posted the following message to LKML. However, since there was lot of discussion on this topic in this mailing list, I am posting here too.
I have Dell Latitude D600 laptop with Radeon R250 Lf (Mobility 9000 M9) video card. I have been trying to get suspend-to-ram work with this laptop since 2.5.70 or so. The problem almost always was that if frame buffer (I have tried radeon and vesa) is used, resume won't finish - it would hang right after pressing power button and if plain console is used resume works fine, but the LCD stays off.
Since new radeonfb has suspend/resume driver model, I thought I might give it a try, but still the laptop would hang during resume. With a bit of trial and error (and some guess work), I got the laptop to resume successfully with the following patch.
radeon_pm.c 2004-02-20 15:12:23.000000000 -0500 renamed from radeon_pm.c.orig 2004-02-20 15:11:18.000000000 -0500 +5
-3@@ -907,11 +907,13 @@ /* Restore display & engine */ radeonfb_set_par(info); - fb_pan_display(info, &info->var); - fb_set_cmap(&info->cmap, 1, info); + /* fb_pan_display(info, &info->var); + * fb_set_cmap(&info->cmap, 1, info); + */ /* Refresh */ - fb_set_suspend(info, 0); + /* fb_set_suspend(info, 0); + */ /* Unblank */ rinfo->lock_blank = 0;Right now after resume, console still remains blank, but X restores the screen properly. Note that since frame buffer is not restored properly, the console is pretty much useless, but it is not a problem for me as I use X all the time.
Quoted 8 lines
I have used this patch with kernel 2.6.3-mm2. I haven't tried 2.6.3, but I think it may work with 2.6.3 too.
I am also attaching config.bz2 and
/etc/acpi/sleep(the script used to suspend the laptop).I am not subscribed to LKML, so please CC me.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Resume from suspend-to-ram (radeon)
Couple of more details (hope they help):
New radeonfb suspend/resume code turns the LCD on but the system hangs during fb resume. With the changes I made, the LCD turns on but the screen remains blank. X with int10 POST restores the screen properly.
It turns out that I don't have to remove radeon (drm module), intel_agp and agpgart modules before suspend (and insert during resume). The only subsystems that cause problems are ALSA and USB; once these modules are removed, everything works fine. Apparently OSS sound module i810_audio (for 82801DB audio controller) suspends/resumes properly so now I am using it instead of ALSA.
Signature · 8 lines
Giri ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
A message that is not in the archive (sent off-list or not yet received): 20040223074227.80AE57831D-Yo/[email protected]
Re: Resume from suspend-to-ram (radeon)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Quoted 3 lines · Giridhar Pemmasani
New radeonfb suspend/resume code turns the LCD on but the system hangs during fb resume. With the changes I made, the LCD turns on but the screen remains blank. X with int10 POST restores the screen properly.
I haven't tried S3/S4 yet, but I suppose the problem will be similar on my ATI Radeon 9600 M10 NP laptop. Simple question: in which way X restores the screen? I mean, I've seen other posts on other mailing-lists about POST command which can be restore LCD after resume, but I don't know how I can do it.. Could explain me or provide some docs?
Another simple question: is there a documentation about 'radeonfb'? If I compile it in the kernel, I've no problem, but as modules I get this error:
radeonfb: Unknown symbol fb_find_mode
Quoted 6 lines
It turns out that I don't have to remove radeon (drm module),
intel_agpand agpgart modules before suspend (and insert during resume). The only subsystems that cause problems are ALSA and USB; once these modules are removed, everything works fine. Apparently OSS sound modulei810_audio(for 82801DB audio controller) suspends/resumes properly so now I am using it instead of ALSA.
One possible solution for 'intel8x0' suspend/resume problem is here
http://sourceforge.net/mailarchive/forum.php?thread_id=4107033&forum_id=1752
Thx, bye,
Gismo / Luca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
iD8DBQFAar1KVAp7Xm10JmkRAuROAJ4mwFi3ZPEAbR52IjVdvjWBdfp1ogCfcNXG 1HPpWGxh0ElrX7CSxRE7LQ0=
=mFJl
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Resume from suspend-to-ram (radeon)
Hi.
Get Charles Botha's DRI resume patches. I've just begun to use a Radeon 9600, and have successfully suspended and resumed (suspend2) a couple of times now with SMP (P4), Highmem (1GB) and a Radeon 9600. It is possible! Just be sure to prepare and install your kernel and its modules first, then do Charles' install script afterwards.
(I'm not removing any of the related modules prior to suspending).
Regards,
Nigel
Signature · 15 lines
Nigel Cunningham C/- Westminster Presbyterian Church Belconnen 61 Templeton Street, Cook, ACT 2614. +61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home) Evolution (n): A hypothetical process whereby infinitely improbable events occur with alarming frequency, order arises from chaos, and no one is given credit. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): 1080781821.3066.5.camel-632l8fqo88ezhJTzJkPP2xCuuivNXqWP@public.gmane.org
Re: Resume from suspend-to-ram (radeon)
Hi Nigel,
Thanks for the information (and of course your work with swsuspend2)!
I am a bit confused about what I need to do to get swsusp2 working with radeon+agpgart+dri. I am using XFree86 4.4.0 with 2.6.5-rc3-mm2. If I understand correctly, Charles Botha's patches are already in XFree86 4.4.0 and latest DRI. So do I need to do any patching or the setup I have will work if I use swsusp2?
Thanks again,
Giri
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): 20040401040507.0AAC477A2B-Yo/[email protected]
Re: Resume from suspend-to-ram (radeon)
Hi.
I'm using XFree 4.3, and thus needed the patch. Since you're running 4.4, I would guess that the Radeon part should work out of the box. When I didn't have Charles' patches applied, everything else resumed okay, but the X server was messed up to the extent that the mouse and keyboard were useless. (I could ssh in though). Is this what you're getting?
Regards,
Nigel
Quoted 12 lines · Giridhar Pemmasani
Hi Nigel,
Thanks for the information (and of course your work with swsuspend2)!
I am a bit confused about what I need to do to get swsusp2 working with radeon+agpgart+dri. I am using XFree86 4.4.0 with 2.6.5-rc3-mm2. If I understand correctly, Charles Botha's patches are already in XFree86 4.4.0 and latest DRI. So do I need to do any patching or the setup I have will work if I use swsusp2?
Thanks again,
Giri
Signature · 15 lines
Nigel Cunningham C/- Westminster Presbyterian Church Belconnen 61 Templeton Street, Cook, ACT 2614. +61 (2) 6251 7727(wk); +61 (2) 6253 0250 (home) Evolution (n): A hypothetical process whereby infinitely improbable events occur with alarming frequency, order arises from chaos, and no one is given credit. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
Re: Resume from suspend-to-ram (radeon)
In reply to a message not in the archiveHi,
I have slightly different experiances with suspend to ram and the radeon card on my Acer Travelmate 803 notebook:
Quoted 4 lines
Quoted 3 lines · Giridhar Pemmasani
New radeonfb suspend/resume code turns the LCD on but the system hangs during fb resume. With the changes I made, the LCD turns on but the screen remains blank. X with int10 POST restores the screen properly.
The radeonfb resume does not crash, but when fbcon is loaded something fails. Compile radeonfb(original version, 2.6.4 kernel) and frame buffer console as modules, disable video mode selection support and load only radeonfb(NOT fbcon) and the system will resume with backlight on and a black screen. At least my device does in single user mode.
I use plain text console and X with int10 POST patch. This gives me the console back when resuming(X has to soft-boot the V-Bios).
Quoted 4 lines
One possible solution for 'intel8x0' suspend/resume problem is here
http://sourceforge.net/mailarchive/forum.php?thread_id=4107033&forum_id=175
2
i810_audio doesn't work for me too. Any call to pci_enable_device(), pci_write_config_byte/word/dword() and pci_restore_state() causes a system(bios?) lockup. This only concerns the audio card, and strangely I can change the pci settings with setpci and bring my card back, i810_audio unload of course.
I think oss has a better sound quality, especially with a high volume.
Cheers,
Stefan
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Resume from suspend-to-ram (radeon)
Hi!
Quoted 11 lines
Quoted 3 lines
Quoted 3 lines
New radeonfb suspend/resume code turns the LCD on but the system hangs during fb resume. With the changes I made, the LCD turns on but the screen remains blank. X with int10 POST restores the screen properly.
The radeonfb resume does not crash, but when fbcon is loaded something fails. Compile
radeonfb(original version, 2.6.4 kernel)and frame buffer console as modules, disable video mode selection support and load only radeonfb(NOT fbcon) and the system will resume with backlight on and a black screen. At least my device does in single user mode.I use plain text console and X with int10 POST patch. This gives me the console back when resuming(X has to soft-boot the V-Bios).
Perhaps some hints how to do this should be added to Documentation/power/video.txt?
Pavel
Signature · 9 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
A message that is not in the archive (sent off-list or not yet received): 20040420101720.GA2314-I/[email protected]
Re: Resume from suspend-to-ram (radeon)
Hi,
Quoted 6 lines
Quoted 6 lines
The radeonfb resume does not crash, but when fbcon is loaded something fails. Compile
radeonfb(original version, 2.6.4 kernel)and frame buffer console as modules, disable video mode selection support and load only radeonfb(NOT fbcon) and the system will resume with backlight on and a black screen. At least my device does in single user mode.
Quoted 7 lines
Quoted 2 lines
I use plain text console and X with int10 POST patch. This gives me the console back when resuming(X has to soft-boot the V-Bios).
Perhaps some hints how to do this should be added to
Documentation/power/video.txt?Pavel
Patching X11 or that radeonfb crashes on resume?
I wrote a howto about S3 on the Acer TM 800 which covers the radeon problem:
http://www.doesi.gmxhome.de/linux/tm800s3/s3.html
/Stefan
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297