linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
@ 2004-11-19  6:56 Benjamin Herrenschmidt
  2004-11-19  8:50 ` David Woodhouse
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19  6:56 UTC (permalink / raw)
  To: debian-powerpc@lists.debian.org, linuxppc-dev, gentoo-ppc-user

(Message cross-posted to several lists, please do _NOT_ reply to all of
them).

NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like
earlier iBooks, or Titanium PowerBooks, please test this patch as well
for regression. More specifically, test if sleep still works, X/DRI, and
backlight control as I have made significant changes to radeonfb in ways
that could affect those areas.

NOTE2: This is still quite experimental, be careful if something goes
wrong (like lots of oopses or crashes on wakeup), you'd rather
hard-restart the machine right away than let corrupted memory buffers be
written back to your disk ;)
 
First, let's give credit where it's due, as a lot of the work on the
original Aluminium PowerBook sleep code was done by Paul Mackerras,
happy owner of one of these beasts, and thanks to Rob Weir too who gave
me his iBook G4 for a few days, just long enough to get the stuff
working...

So here's the new patch, it replaces the previous one for Aluminium
PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
when that one is out (it's a bit late to get that merged with Linus,
2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.

The support for sleep on desktop G4s & dual CPU machines, including
support for "hotplug CPU" (allowing to put a CPU to sleep dynamically)
for dual machines isn't in this patch neither, it will be coming
spearately. It will only support one desktop video card at first anyway,
though it will be possible to extend that over time.

Get it at:

http://gate.crashing.org/~benh/albook-ibookg4-sleep.diff

Enjoy !

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  6:56 Benjamin Herrenschmidt
@ 2004-11-19  8:50 ` David Woodhouse
  2004-11-19 10:33   ` Benjamin Herrenschmidt
  2004-11-19 11:06 ` Gabriel Paubert
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 24+ messages in thread
From: David Woodhouse @ 2004-11-19  8:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Fri, 2004-11-19 at 17:56 +1100, Benjamin Herrenschmidt wrote:
> (Message cross-posted to several lists, please do _NOT_ reply to all of
> them).

I forwarded it to fedora-ppc@lists.infradead.org too.

Since I started using the previous patch and actually suspending, I've
been seeing the GNOME panel and window list die frequently, and
occasionally other X apps. When X apps have died which were started from
the command line it seemed to be a spurious SIGPIPE, strangely.

I don't _think_ I've ever seen it immediately after booting; only after
suspend/resume. But that could be just a coincidence. Likewise the way
it started when I added the sleep patch _could_ just be a coincidence --
I was still running Fedora rawhide and updating other packages (and
there were other kernel changes) at that time, so a lot of other things
changed too... but has anyone else seen similar behaviour?

-- 
dwmw2

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  8:50 ` David Woodhouse
@ 2004-11-19 10:33   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19 10:33 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linuxppc-dev list

On Fri, 2004-11-19 at 08:50 +0000, David Woodhouse wrote:
> On Fri, 2004-11-19 at 17:56 +1100, Benjamin Herrenschmidt wrote:
> > (Message cross-posted to several lists, please do _NOT_ reply to all of
> > them).
> 
> I forwarded it to fedora-ppc@lists.infradead.org too.
> 
> Since I started using the previous patch and actually suspending, I've
> been seeing the GNOME panel and window list die frequently, and
> occasionally other X apps. When X apps have died which were started from
> the command line it seemed to be a spurious SIGPIPE, strangely.
> 
> I don't _think_ I've ever seen it immediately after booting; only after
> suspend/resume. But that could be just a coincidence. Likewise the way
> it started when I added the sleep patch _could_ just be a coincidence --
> I was still running Fedora rawhide and updating other packages (and
> there were other kernel changes) at that time, so a lot of other things
> changed too... but has anyone else seen similar behaviour?

Try the new patch. Note that I posted a second one today, right after
the first one, that fixes a engine lockup bug (see my second mail).

The original patch had a bug where some of the CPU "HID" registers
weren't properly restored for 7447A type CPUs. If you had one of these,
it could explain the issue.

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  6:56 Benjamin Herrenschmidt
  2004-11-19  8:50 ` David Woodhouse
@ 2004-11-19 11:06 ` Gabriel Paubert
  2004-11-19 22:14   ` Benjamin Herrenschmidt
  2004-11-19 19:02 ` Olof Johansson
       [not found] ` <1100852423.3855.2.camel@gaston>
  3 siblings, 1 reply; 24+ messages in thread
From: Gabriel Paubert @ 2004-11-19 11:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Fri, Nov 19, 2004 at 05:56:50PM +1100, Benjamin Herrenschmidt wrote:
> NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like
> earlier iBooks, or Titanium PowerBooks, please test this patch as well
> for regression. More specifically, test if sleep still works, X/DRI, and
> backlight control as I have made significant changes to radeonfb in ways
> that could affect those areas.

Everytime my Pismo wakes up I have the following:

Badness in enable_irq at kernel/irq/manage.c:106
Call trace:
 [c0006db4] dump_stack+0x18/0x28
 [c0004dfc] check_bug_trap+0x84/0xac
 [c0004f84] ProgramCheckException+0x160/0x1a0
 [c00044e0] ret_from_except_full+0x0/0x4c
 [c002f8dc] enable_irq+0xa0/0xa8
 [c0205570] ohci_pci_resume+0xe4/0xfc
 [c01fc018] usb_hcd_pci_resume+0xb0/0x114
 [c013a9f0] pci_device_resume+0x4c/0x50
 [c0181474] resume_device+0x44/0x4c
 [c01815ac] dpm_resume+0x130/0x148
 [c01815fc] device_resume+0x38/0x78
 [c0424ac8] 0xc0424ac8
 [c0424fb0] 0xc0424fb0
 [c042581c] 0xc042581c
 [c0064680] sys_ioctl+0xdc/0x2f4
Badness in enable_irq at kernel/irq/manage.c:106
Call trace:
 [c0006db4] dump_stack+0x18/0x28
 [c0004dfc] check_bug_trap+0x84/0xac
 [c0004f84] ProgramCheckException+0x160/0x1a0
 [c00044e0] ret_from_except_full+0x0/0x4c
 [c002f8dc] enable_irq+0xa0/0xa8
 [c0205570] ohci_pci_resume+0xe4/0xfc
 [c01fc018] usb_hcd_pci_resume+0xb0/0x114
 [c013a9f0] pci_device_resume+0x4c/0x50
 [c0181474] resume_device+0x44/0x4c
 [c01815ac] dpm_resume+0x130/0x148
 [c01815fc] device_resume+0x38/0x78
 [c0424ac8] 0xc0424ac8
 [c0424fb0] 0xc0424fb0
 [c042581c] 0xc042581c
 [c0064680] sys_ioctl+0xdc/0x2f4

It happens when reenabling USB interrupts (before the recent 
irq consolidation it was a one line message about unbalanced
irq_enable IIRC). The appended patch fixes the problem for my 
machine, the explanation being that some higher level code now
does an explicit free_irq() before suspending and request_irq()
on resume (in drivers/usb/core/hcd-pci.c).

	Gabriel

===== drivers/usb/host/ohci-pci.c 1.33 vs edited =====
--- 1.33/drivers/usb/host/ohci-pci.c	2004-11-07 23:31:07 +01:00
+++ edited/drivers/usb/host/ohci-pci.c	2004-11-19 11:55:10 +01:00
@@ -119,14 +119,11 @@
 
 	/* let things settle down a bit */
 	msleep (100);
-	
-#ifdef CONFIG_PMAC_PBOOK
-	if (_machine == _MACH_Pmac)
-		disable_irq ((to_pci_dev(hcd->self.controller))->irq);
 
+#ifdef CONFIG_PMAC_PBOOK
 	{
-	   	struct device_node	*of_node;
- 
+		struct device_node	*of_node;
+
 		/* Disable USB PAD & cell clock */
 		of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
 		if (of_node)
@@ -164,13 +161,6 @@
 	retval = ohci_hub_resume (hcd);
 	usb_unlock_device (hcd->self.root_hub);
 #endif
-
-	if (retval == 0) {
-#ifdef CONFIG_PMAC_PBOOK
-		if (_machine == _MACH_Pmac)
-			enable_irq (to_pci_dev(hcd->self.controller)->irq);
-#endif
-	}
 	return retval;
 }
 

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19  6:56 Benjamin Herrenschmidt
  2004-11-19  8:50 ` David Woodhouse
  2004-11-19 11:06 ` Gabriel Paubert
@ 2004-11-19 19:02 ` Olof Johansson
       [not found] ` <1100852423.3855.2.camel@gaston>
  3 siblings, 0 replies; 24+ messages in thread
From: Olof Johansson @ 2004-11-19 19:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Fri, Nov 19, 2004 at 05:56:50PM +1100, Benjamin Herrenschmidt wrote:

> So here's the new patch, it replaces the previous one for Aluminium
> PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
> when that one is out (it's a bit late to get that merged with Linus,
> 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.

Seems to work well on my 1.2GHz 12" iBook. First attempt caused a
failure while I had the WUSB12 adapter plugged in (after reboot when the
device was reinitialized the keyboard stopped working and the mouse went
crazy). If I unplug the adapter before sleep, it seems to wakeup without
problem.

No observed problems with backlight or anything else either, but I
haven't been stress testing anything.

Good work, Ben!  I owe you a beer next time you're in Austin! :)

-Olof

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
@ 2004-11-19 22:10 Benjamin Herrenschmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19 22:10 UTC (permalink / raw)
  To: linuxppc-dev list


> So here's the new patch, it replaces the previous one for Aluminium
> PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
> when that one is out (it's a bit late to get that merged with Linus,
> 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
>
> .../...

Ok, I already found a bug, occasional lockups on boot and when setting
the backlight. I uploaded a new version at:

http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-19 11:06 ` Gabriel Paubert
@ 2004-11-19 22:14   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-19 22:14 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: linuxppc-dev list

On Fri, 2004-11-19 at 12:06 +0100, Gabriel Paubert wrote:
> On Fri, Nov 19, 2004 at 05:56:50PM +1100, Benjamin Herrenschmidt wrote:
> > NOTE: Owners of _OTHER_ Apple laptops that could already sleep, like
> > earlier iBooks, or Titanium PowerBooks, please test this patch as well
> > for regression. More specifically, test if sleep still works, X/DRI, and
> > backlight control as I have made significant changes to radeonfb in ways
> > that could affect those areas.
> 
> Everytime my Pismo wakes up I have the following:
> 
> Badness in enable_irq at kernel/irq/manage.c:106

 .../...

Yah, it's known, and harmless, just didn't find the time to fix it yet,
thanks for the patch. It's due to a change in the main OHCI code which
nowadaws frees and re-requests the interrupt on sleep.

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
@ 2004-11-20 21:47 Sean Neakums
  2004-11-20 22:08 ` Armando Di Cianno
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Sean Neakums @ 2004-11-20 21:47 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev

> http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff

I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
after resume I noticed that images (in Mozilla and the root window)
would become corrupted if obscured and made visible again, e.g. by
switching tabs, or by moving between a full and an empty workspace.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 21:47 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Sean Neakums
@ 2004-11-20 22:08 ` Armando Di Cianno
  2004-11-20 22:20   ` Michel Dänzer
  2004-11-20 22:22 ` Benjamin Herrenschmidt
  2004-11-21 19:34 ` David Woodhouse
  2 siblings, 1 reply; 24+ messages in thread
From: Armando Di Cianno @ 2004-11-20 22:08 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 811 bytes --]

On 2004-11-20 16:47:34 -0500 Sean Neakums <sneakums@zork.net> wrote:
> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> after resume I noticed that images (in Mozilla and the root window)
> would become corrupted if obscured and made visible again, e.g. by
> switching tabs, or by moving between a full and an empty workspace.

Just a note that I tried this with gentoo's 
gentoo-dev-sources-2.6.9-r3 and discovered the exact some symptoms.  
It mainly only seems to have corrupted the X root window, although 
some, but not all, images in a web page in firefox show similar 
distortions.  Currently my system is running XOrg 6.7.0.  I did not 
notice this problem with the first patch for sleep.

__Armando Di Cianno

[-- Attachment #1.2: RFC3156.txt --]
[-- Type: text/plain, Size: 65 bytes --]

RFC3156 defines security multipart formats for MIME with OpenPGP.

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:08 ` Armando Di Cianno
@ 2004-11-20 22:20   ` Michel Dänzer
  0 siblings, 0 replies; 24+ messages in thread
From: Michel Dänzer @ 2004-11-20 22:20 UTC (permalink / raw)
  To: Armando Di Cianno; +Cc: linuxppc-dev

On Sat, 2004-11-20 at 17:08 -0500, Armando Di Cianno wrote:
> On 2004-11-20 16:47:34 -0500 Sean Neakums <sneakums@zork.net> wrote:
> > I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> > Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> > after resume I noticed that images (in Mozilla and the root window)
> > would become corrupted if obscured and made visible again, e.g. by
> > switching tabs, or by moving between a full and an empty workspace.
>=20
> Just a note that I tried this with gentoo's=20
> gentoo-dev-sources-2.6.9-r3 and discovered the exact some symptoms. =20
> It mainly only seems to have corrupted the X root window, although=20
> some, but not all, images in a web page in firefox show similar=20
> distortions.  Currently my system is running XOrg 6.7.0.  I did not=20
> notice this problem with the first patch for sleep.

Sounds like the offscreen pixmap cache gets corrupted. The usual
question for this kind of problem: Does

grep APM /var/log/X{Free86,org}.0.log

show

(II) Open APM successful

?


--=20
Earthling Michel D=C3=A4nzer      |     Debian (powerpc), X and DRI develop=
er
Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=3Ddaenzer

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 21:47 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Sean Neakums
  2004-11-20 22:08 ` Armando Di Cianno
@ 2004-11-20 22:22 ` Benjamin Herrenschmidt
  2004-11-20 22:31   ` Armando Di Cianno
  2004-11-20 22:41   ` Sean Neakums
  2004-11-21 19:34 ` David Woodhouse
  2 siblings, 2 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-20 22:22 UTC (permalink / raw)
  To: Sean Neakums; +Cc: linuxppc-dev list

On Sat, 2004-11-20 at 21:47 +0000, Sean Neakums wrote:
> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff
> 
> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> after resume I noticed that images (in Mozilla and the root window)
> would become corrupted if obscured and made visible again, e.g. by
> switching tabs, or by moving between a full and an empty workspace.

Do you have APM emulation enabled in the kenrel config and do you
have /dev/apm_bios ? (check in X log that it properly opens the APM
device and gets notified of suspend and resume events).

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:22 ` Benjamin Herrenschmidt
@ 2004-11-20 22:31   ` Armando Di Cianno
  2004-11-20 22:41   ` Sean Neakums
  1 sibling, 0 replies; 24+ messages in thread
From: Armando Di Cianno @ 2004-11-20 22:31 UTC (permalink / raw)
  To: linuxppc-dev


[-- Attachment #1.1: Type: text/plain, Size: 1072 bytes --]

On 2004-11-20 17:22:19 -0500 Benjamin Herrenschmidt 
<benh@kernel.crashing.org> wrote:
> Do you have APM emulation enabled in the kenrel config and do you
> have /dev/apm_bios ? (check in X log that it properly opens the APM
> device and gets notified of suspend and resume events).

Michel Daenzer wrote:
> Sounds like the offscreen pixmap cache gets corrupted. The usual
> question for this kind of problem: Does
> grep APM /var/log/X{Free86,org}.0.log
> show
> (II) Open APM successful

nephiliah root # grep -i apm /usr/src/linux/.config
CONFIG_PMAC_APM_EMU=y

nephiliah root # grep APM /var/log/Xorg.0.log
(II) Open APM successful
(II) Open APM successful

Eyeballing the Xorg.0.log doesn't show any apm irregularities.  (I 
suspect the second "Open APM..." comes from when I just resumed.)

nephiliah root # ls -l /dev/apm_bios
lr-xr-xr-x  1 root root 13 Nov 19 19:57 /dev/apm_bios -> misc/apm_bios
nephiliah root # ls -l /dev/misc/apm_bios
crw-------  1 armando root 10, 134 Dec 31  1969 /dev/misc/apm_bios

Any other info I can offer to help?

__Armando Di Cianno

[-- Attachment #1.2: RFC3156.txt --]
[-- Type: text/plain, Size: 65 bytes --]

RFC3156 defines security multipart formats for MIME with OpenPGP.

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:22 ` Benjamin Herrenschmidt
  2004-11-20 22:31   ` Armando Di Cianno
@ 2004-11-20 22:41   ` Sean Neakums
  2004-11-20 22:44     ` Sean Neakums
  2004-11-20 22:52     ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 24+ messages in thread
From: Sean Neakums @ 2004-11-20 22:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Sat, 2004-11-20 at 21:47 +0000, Sean Neakums wrote:
>> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff
>> 
>> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
>> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
>> after resume I noticed that images (in Mozilla and the root window)
>> would become corrupted if obscured and made visible again, e.g. by
>> switching tabs, or by moving between a full and an empty workspace.
>
> Do you have APM emulation enabled in the kenrel config and do you
> have /dev/apm_bios ? (check in X log that it properly opens the APM
> device and gets notified of suspend and resume events).

It was built modular but not loaded, and /dev/apm_bios was present.
Having exited X, loaded the module and restarted X, I tried
suspend/resume again.  It worked well as before, but the corruption is
still present.  In XFree86.0.log, I now see a "(II) Open APM
successful" instead of "(WW) Open APM failed (/dev/apm_bios) (No such
device) ", but nothing that seems to relate to suspend/resume events.

The corruption doesn't appear immediately; it starts as a light
specking of the image and progressively getting worse with subsequent
redisplayings.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:41   ` Sean Neakums
@ 2004-11-20 22:44     ` Sean Neakums
  2004-11-20 22:52     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 24+ messages in thread
From: Sean Neakums @ 2004-11-20 22:44 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Sean Neakums <sneakums@zork.net> writes:

> The corruption doesn't appear immediately; it starts as a light
> specking of the image and progressively getting worse with subsequent
> redisplayings.

Also, restarting X does not get rid of the corruption.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:41   ` Sean Neakums
  2004-11-20 22:44     ` Sean Neakums
@ 2004-11-20 22:52     ` Benjamin Herrenschmidt
  2004-11-20 23:01       ` Sean Neakums
  1 sibling, 1 reply; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-20 22:52 UTC (permalink / raw)
  To: Sean Neakums; +Cc: linuxppc-dev list

On Sat, 2004-11-20 at 22:41 +0000, Sean Neakums wrote:

> It was built modular but not loaded, and /dev/apm_bios was present.
> Having exited X, loaded the module and restarted X, I tried
> suspend/resume again.  It worked well as before, but the corruption is
> still present.  In XFree86.0.log, I now see a "(II) Open APM
> successful" instead of "(WW) Open APM failed (/dev/apm_bios) (No such
> device) ", but nothing that seems to relate to suspend/resume events.
> 
> The corruption doesn't appear immediately; it starts as a light
> specking of the image and progressively getting worse with subsequent
> redisplayings.

No idea at this point. It doesn't happen on the albooks I could test
with here... Can you send me a snapshot of a corrupted screen ? Does
it still happen if you disable dynamic clocks ?
(radeonfb.default_dynclk=-1 on the kernel cmdline and Option
"DynamicClocks" "false" in X if you are using X.org). And if you disable
accel in X ? (Option "NoAccel" "true")

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 22:52     ` Benjamin Herrenschmidt
@ 2004-11-20 23:01       ` Sean Neakums
  2004-11-20 23:25         ` Sean Neakums
  0 siblings, 1 reply; 24+ messages in thread
From: Sean Neakums @ 2004-11-20 23:01 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Sat, 2004-11-20 at 22:41 +0000, Sean Neakums wrote:
>
>> It was built modular but not loaded, and /dev/apm_bios was present.
>> Having exited X, loaded the module and restarted X, I tried
>> suspend/resume again.  It worked well as before, but the corruption is
>> still present.  In XFree86.0.log, I now see a "(II) Open APM
>> successful" instead of "(WW) Open APM failed (/dev/apm_bios) (No such
>> device) ", but nothing that seems to relate to suspend/resume events.
>> 
>> The corruption doesn't appear immediately; it starts as a light
>> specking of the image and progressively getting worse with subsequent
>> redisplayings.
>
> No idea at this point. It doesn't happen on the albooks I could test
> with here... Can you send me a snapshot of a corrupted screen ?

Here is a (rather large) screen shot I took, showing the corrupted
root window image.

http://dasbistro.com/~sneakums/corruption.png

> Does it still happen if you disable dynamic clocks ?
> (radeonfb.default_dynclk=-1 on the kernel cmdline and Option
> "DynamicClocks" "false" in X if you are using X.org). And if you
> disable accel in X ? (Option "NoAccel" "true")

I'll try these out.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 23:01       ` Sean Neakums
@ 2004-11-20 23:25         ` Sean Neakums
  0 siblings, 0 replies; 24+ messages in thread
From: Sean Neakums @ 2004-11-20 23:25 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Sean Neakums <sneakums@zork.net> writes:

> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>> Does it still happen if you disable dynamic clocks ?
>> (radeonfb.default_dynclk=-1 on the kernel cmdline and Option
>> "DynamicClocks" "false" in X if you are using X.org). And if you
>> disable accel in X ? (Option "NoAccel" "true")
>
> I'll try these out.

With radeonfb.default_dynclk=-1 alone (using Debian's XFree86 4.3.0,
so no Option "DynamicClocks" "false"), the corruption is slower to
progress, but seems to be the same as the corruption seen with dynamic
clocks enabled.

With NoAccel alone, I do not yet see any corruption; I would expect to
have seen it by now, going by the previous tests.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
       [not found] ` <1100852423.3855.2.camel@gaston>
@ 2004-11-21  0:01   ` Benjamin Herrenschmidt
  2004-11-21  3:00     ` Armando Di Cianno
  2004-11-21 17:37     ` Olof Johansson
  0 siblings, 2 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-21  0:01 UTC (permalink / raw)
  To: debian-powerpc@lists.debian.org, linuxppc-dev list; +Cc: gentoo-ppc-user

On Fri, 2004-11-19 at 19:20 +1100, Benjamin Herrenschmidt wrote:
> On Fri, 2004-11-19 at 17:56 +1100, Benjamin Herrenschmidt wrote:
> > So here's the new patch, it replaces the previous one for Aluminium
> > PowerBooks, and is still against 2.6.9. I'll do something against 2.6.10
> > when that one is out (it's a bit late to get that merged with Linus,
> > 2.6.10 is in freeze mode now) and I hope to get all of that in 2.6.11.
> >
> > .../...
> 
> Ok, I already found a bug, occasional lockups on boot and when setting
> the backlight. I uploaded a new version at:

Here's a 3rd version. It may or may not help, as I didn't have a chance
to test this one on either albook or ibook g4 yet. I added saving and
restoring of a few more registers that may fix the Xv problem (or not...
depends what X does at this point) and eventually some corruption
problem (the bandwidth related registers weren't restored).

It also adds an unrelated fix to the cpufreq code for powerbooks using
PMU-based frequency switching which would occasionally cause hangs at
boot.

http://gate.crashing.org/~benh/albook-ibookg4-sleep-3.diff

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21  0:01   ` Benjamin Herrenschmidt
@ 2004-11-21  3:00     ` Armando Di Cianno
  2004-11-21  7:11       ` Benjamin Herrenschmidt
  2004-11-21 17:37     ` Olof Johansson
  1 sibling, 1 reply; 24+ messages in thread
From: Armando Di Cianno @ 2004-11-21  3:00 UTC (permalink / raw)
  To: linuxppc-dev

On 2004-11-20 19:01:08 -0500 Benjamin Herrenschmidt 
<benh@kernel.crashing.org> wrote:
> Here's a 3rd version. It may or may not help, as I didn't have a 
> chance
> to test this one on either albook or ibook g4 yet. I added saving and
> restoring of a few more registers that may fix the Xv problem (or 
> not...
> depends what X does at this point) and eventually some corruption
> problem (the bandwidth related registers weren't restored).
> 
> It also adds an unrelated fix to the cpufreq code for powerbooks using
> PMU-based frequency switching which would occasionally cause hangs at
> boot.

Using 'NoAccel' in xorg.conf seems to hide the symptoms of the bug, or 
remove the bug.

However, without that option, with this patch, the problem seems "less 
bad", if that's even possible.  It takes longer for the root window to 
get "ridiculously speckled."  Not sure if that info helps at all. :-)

Not sure if I mentioned that, the first patch (the one sent a couple 
weeks ago) did not seem to have this problem.

Thanks,
__Armando Di Cianno

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21  3:00     ` Armando Di Cianno
@ 2004-11-21  7:11       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-21  7:11 UTC (permalink / raw)
  To: Armando Di Cianno; +Cc: linuxppc-dev list

On Sat, 2004-11-20 at 22:00 -0500, Armando Di Cianno wrote:

> Using 'NoAccel' in xorg.conf seems to hide the symptoms of the bug, or 
> remove the bug.
> 
> However, without that option, with this patch, the problem seems "less 
> bad", if that's even possible.  It takes longer for the root window to 
> get "ridiculously speckled."  Not sure if that info helps at all. :-)
> 
> Not sure if I mentioned that, the first patch (the one sent a couple 
> weeks ago) did not seem to have this problem.

Yes, you did mention it, which is weird. I'll have to spend some time
comparing the 2 versions and see if I can spot something.

Ben

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21  0:01   ` Benjamin Herrenschmidt
  2004-11-21  3:00     ` Armando Di Cianno
@ 2004-11-21 17:37     ` Olof Johansson
  2004-11-21 21:36       ` Benjamin Herrenschmidt
  2004-11-22  8:25       ` David Woodhouse
  1 sibling, 2 replies; 24+ messages in thread
From: Olof Johansson @ 2004-11-21 17:37 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Sun, Nov 21, 2004 at 11:01:08AM +1100, Benjamin Herrenschmidt wrote:
> > Ok, I already found a bug, occasional lockups on boot and when setting
> > the backlight. I uploaded a new version at:
> 
> Here's a 3rd version. It may or may not help, as I didn't have a chance
> to test this one on either albook or ibook g4 yet. I added saving and
> restoring of a few more registers that may fix the Xv problem (or not...
> depends what X does at this point) and eventually some corruption
> problem (the bandwidth related registers weren't restored).

This one caused problems for me. Looks like the backlight got turned off
at boot, I had to sleep it and wake it up to get it back.


-Olof

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-20 21:47 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Sean Neakums
  2004-11-20 22:08 ` Armando Di Cianno
  2004-11-20 22:22 ` Benjamin Herrenschmidt
@ 2004-11-21 19:34 ` David Woodhouse
  2 siblings, 0 replies; 24+ messages in thread
From: David Woodhouse @ 2004-11-21 19:34 UTC (permalink / raw)
  To: Sean Neakums; +Cc: linuxppc-dev

On Sat, 2004-11-20 at 21:47 +0000, Sean Neakums wrote:
> > http://gate.crashing.org/~benh/albook-ibookg4-sleep-2.diff
> 
> I tried this on my 15" AlBook (one of the new 1.5GHz ones), applied to
> Debian's 2.6.9.  It suspended and resumed fine (and quickly!), but
> after resume I noticed that images (in Mozilla and the root window)
> would become corrupted if obscured and made visible again, e.g. by
> switching tabs, or by moving between a full and an empty workspace.

I've seen similar behaviour in firefox on a 17" AlBook with Fedora Core
3. I can't remember if it was with Ben's first or second patch. Neither
can I reproduce it now with the second version.

-- 
dwmw2

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21 17:37     ` Olof Johansson
@ 2004-11-21 21:36       ` Benjamin Herrenschmidt
  2004-11-22  8:25       ` David Woodhouse
  1 sibling, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-21 21:36 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev list

On Sun, 2004-11-21 at 11:37 -0600, Olof Johansson wrote:
> On Sun, Nov 21, 2004 at 11:01:08AM +1100, Benjamin Herrenschmidt wrote:
> > > Ok, I already found a bug, occasional lockups on boot and when setting
> > > the backlight. I uploaded a new version at:
> > 
> > Here's a 3rd version. It may or may not help, as I didn't have a chance
> > to test this one on either albook or ibook g4 yet. I added saving and
> > restoring of a few more registers that may fix the Xv problem (or not...
> > depends what X does at this point) and eventually some corruption
> > problem (the bandwidth related registers weren't restored).
> 
> This one caused problems for me. Looks like the backlight got turned off
> at boot, I had to sleep it and wake it up to get it back.

There have been no change regarding backlight at boot, could just be
some latent problem... Next time it happens, test what happens if turn
the backlight all the way down to 0 (with the backlight keys), wait a
bit, then back up.

Ben.

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

* Re: TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based)
  2004-11-21 17:37     ` Olof Johansson
  2004-11-21 21:36       ` Benjamin Herrenschmidt
@ 2004-11-22  8:25       ` David Woodhouse
  1 sibling, 0 replies; 24+ messages in thread
From: David Woodhouse @ 2004-11-22  8:25 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev

On Sun, 2004-11-21 at 11:37 -0600, Olof Johansson wrote: 
> On Sun, Nov 21, 2004 at 11:01:08AM +1100, Benjamin Herrenschmidt wrote:
> > > Ok, I already found a bug, occasional lockups on boot and when setting
> > > the backlight. I uploaded a new version at:
> > 
> > Here's a 3rd version. It may or may not help, as I didn't have a chance
> > to test this one on either albook or ibook g4 yet. I added saving and
> > restoring of a few more registers that may fix the Xv problem (or not...
> > depends what X does at this point) and eventually some corruption
> > problem (the bandwidth related registers weren't restored).
> 
> This one caused problems for me. Looks like the backlight got turned off
> at boot, I had to sleep it and wake it up to get it back.

I've seen that since the first version. I also have to restart
pbbuttonsd to make it work again after sleep. I keep logging in on tty1
to run 'fblevel 15'.

Actually the backlight tends to turn off some time later, too. It's not
just that it's off after sleep.

-- 
dwmw2

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

end of thread, other threads:[~2004-11-22  8:29 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-20 21:47 TEST: Sleep suppport for iBook G4 & Aluminium PowerBooks (ATI based) Sean Neakums
2004-11-20 22:08 ` Armando Di Cianno
2004-11-20 22:20   ` Michel Dänzer
2004-11-20 22:22 ` Benjamin Herrenschmidt
2004-11-20 22:31   ` Armando Di Cianno
2004-11-20 22:41   ` Sean Neakums
2004-11-20 22:44     ` Sean Neakums
2004-11-20 22:52     ` Benjamin Herrenschmidt
2004-11-20 23:01       ` Sean Neakums
2004-11-20 23:25         ` Sean Neakums
2004-11-21 19:34 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-11-19 22:10 Benjamin Herrenschmidt
2004-11-19  6:56 Benjamin Herrenschmidt
2004-11-19  8:50 ` David Woodhouse
2004-11-19 10:33   ` Benjamin Herrenschmidt
2004-11-19 11:06 ` Gabriel Paubert
2004-11-19 22:14   ` Benjamin Herrenschmidt
2004-11-19 19:02 ` Olof Johansson
     [not found] ` <1100852423.3855.2.camel@gaston>
2004-11-21  0:01   ` Benjamin Herrenschmidt
2004-11-21  3:00     ` Armando Di Cianno
2004-11-21  7:11       ` Benjamin Herrenschmidt
2004-11-21 17:37     ` Olof Johansson
2004-11-21 21:36       ` Benjamin Herrenschmidt
2004-11-22  8:25       ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).