public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Resume from suspend-to-ram
@ 2004-02-20 20:46 Giridhar Pemmasani
  2004-02-23  7:00 ` Resume from suspend-to-ram (radeon) Len Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Giridhar Pemmasani @ 2004-02-20 20:46 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

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.orig    2004-02-20 15:11:18.000000000 -0500
+++ radeon_pm.c 2004-02-20 15:12:23.000000000 -0500
@@ -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.


[-- Attachment #2: config.bz2 --]
[-- Type: application/x-bzip2, Size: 5471 bytes --]

[-- Attachment #3: sleep --]
[-- Type: application/x-shellscript, Size: 799 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
  2004-02-20 20:46 Resume from suspend-to-ram Giridhar Pemmasani
@ 2004-02-23  7:00 ` Len Brown
       [not found]   ` <1077519609.12675.63.camel-D2Zvc0uNKG8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Len Brown @ 2004-02-23  7:00 UTC (permalink / raw)
  To: Giridhar Pemmasani; +Cc: ACPI Developers, benh-t6+wdnd7Ef+CjzjZhc0bXmD2FQJk+8+b

Ben,
has radeon_pm.c suspend/resume worked under other conditions?

thanks,
-Len

On Fri, 2004-02-20 at 15:46, Giridhar Pemmasani wrote:
> 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.orig    2004-02-20 15:11:18.000000000 -0500
> +++ radeon_pm.c 2004-02-20 15:12:23.000000000 -0500
> @@ -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.
> 



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]   ` <1077519609.12675.63.camel-D2Zvc0uNKG8@public.gmane.org>
@ 2004-02-23  7:42     ` Giridhar Pemmasani
       [not found]       ` <20040223074227.80AE57831D-Yo/1PYb2HdawRS80dfYGFoIJIQD0bWaD@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Giridhar Pemmasani @ 2004-02-23  7:42 UTC (permalink / raw)
  To: Len Brown; +Cc: ACPI Developers, benh-t6+wdnd7Ef+CjzjZhc0bXmD2FQJk+8+b


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.

-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]       ` <20040223074227.80AE57831D-Yo/1PYb2HdawRS80dfYGFoIJIQD0bWaD@public.gmane.org>
@ 2004-03-31 12:44         ` Luca Capello
       [not found]           ` <406ABD4A.10408-wlebWZzHoyE@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Luca Capello @ 2004-03-31 12:44 UTC (permalink / raw)
  To: Giridhar Pemmasani; +Cc: ML ACPI-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

on 02/23/04 08:42, Giridhar Pemmasani wrote:
> 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

> 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.
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]           ` <406ABD4A.10408-wlebWZzHoyE@public.gmane.org>
@ 2004-04-01  1:10             ` Nigel Cunningham
       [not found]               ` <1080781821.3066.5.camel-632l8fqo88ezhJTzJkPP2xCuuivNXqWP@public.gmane.org>
  2004-04-02 15:24             ` Stefan Dösinger
  1 sibling, 1 reply; 10+ messages in thread
From: Nigel Cunningham @ 2004-04-01  1:10 UTC (permalink / raw)
  To: Luca Capello; +Cc: Giridhar Pemmasani, ML ACPI-devel

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
-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]               ` <1080781821.3066.5.camel-632l8fqo88ezhJTzJkPP2xCuuivNXqWP@public.gmane.org>
@ 2004-04-01  4:04                 ` Giridhar Pemmasani
       [not found]                   ` <20040401040507.0AAC477A2B-Yo/1PYb2HdawRS80dfYGFoIJIQD0bWaD@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Giridhar Pemmasani @ 2004-04-01  4:04 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Luca Capello, ML ACPI-devel


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]                   ` <20040401040507.0AAC477A2B-Yo/1PYb2HdawRS80dfYGFoIJIQD0bWaD@public.gmane.org>
@ 2004-04-01  6:03                     ` Nigel Cunningham
  0 siblings, 0 replies; 10+ messages in thread
From: Nigel Cunningham @ 2004-04-01  6:03 UTC (permalink / raw)
  To: Giridhar Pemmasani; +Cc: Luca Capello, ML ACPI-devel

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

On Thu, 2004-04-01 at 14:04, Giridhar Pemmasani wrote:
> 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
-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]           ` <406ABD4A.10408-wlebWZzHoyE@public.gmane.org>
  2004-04-01  1:10             ` Nigel Cunningham
@ 2004-04-02 15:24             ` Stefan Dösinger
       [not found]               ` <200404021524.46611.stefandoesinger-RbZlAiThDcE@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Dösinger @ 2004-04-02 15:24 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Luca Capello, Giridhar Pemmasani

Hi,
I have slightly different experiances with suspend to ram and the radeon card 
on my Acer Travelmate 803 notebook:
> on 02/23/04 08:42, Giridhar Pemmasani wrote:
> > 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).

> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]               ` <200404021524.46611.stefandoesinger-RbZlAiThDcE@public.gmane.org>
@ 2004-04-20 10:17                 ` Pavel Machek
       [not found]                   ` <20040420101720.GA2314-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2004-04-20 10:17 UTC (permalink / raw)
  To: Stefan Dösinger
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Luca Capello,
	Giridhar Pemmasani

Hi!
> > > 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
-- 
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Resume from suspend-to-ram (radeon)
       [not found]                   ` <20040420101720.GA2314-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2004-04-23 12:08                     ` Stefan Dösinger
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Dösinger @ 2004-04-23 12:08 UTC (permalink / raw)
  To: Pavel Machek
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Luca Capello,
	Giridhar Pemmasani

Hi,

> > 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
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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-23 12:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-20 20:46 Resume from suspend-to-ram Giridhar Pemmasani
2004-02-23  7:00 ` Resume from suspend-to-ram (radeon) Len Brown
     [not found]   ` <1077519609.12675.63.camel-D2Zvc0uNKG8@public.gmane.org>
2004-02-23  7:42     ` Giridhar Pemmasani
     [not found]       ` <20040223074227.80AE57831D-Yo/1PYb2HdawRS80dfYGFoIJIQD0bWaD@public.gmane.org>
2004-03-31 12:44         ` Luca Capello
     [not found]           ` <406ABD4A.10408-wlebWZzHoyE@public.gmane.org>
2004-04-01  1:10             ` Nigel Cunningham
     [not found]               ` <1080781821.3066.5.camel-632l8fqo88ezhJTzJkPP2xCuuivNXqWP@public.gmane.org>
2004-04-01  4:04                 ` Giridhar Pemmasani
     [not found]                   ` <20040401040507.0AAC477A2B-Yo/1PYb2HdawRS80dfYGFoIJIQD0bWaD@public.gmane.org>
2004-04-01  6:03                     ` Nigel Cunningham
2004-04-02 15:24             ` Stefan Dösinger
     [not found]               ` <200404021524.46611.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-04-20 10:17                 ` Pavel Machek
     [not found]                   ` <20040420101720.GA2314-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-04-23 12:08                     ` Stefan Dösinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox